Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > ed9fe908e8304375d99a386ba3861200 > files > 82

openct-0.6.20-1mdv2010.1.x86_64.rpm

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
      FilesTools – OpenCT
    </title><style type="text/css">
           @import url(trac.css);
          </style></head><body><div id="content" class="wiki">
      <div class="wikipage searchable">
        
          <h1 id="FilesandToolsinOpenCT">Files and Tools in OpenCT</h1>
<p>
OpenCT needs a config file. It is recommended to configure openct with "--sysconfdir=/etc" so the usual name is /etc/openct.conf.
</p>
<p>
OpenCT needs a directory -- /var/run/openct -- for it's files and sockets.
During bootup OpenCT will create the file -- /var/run/openct/status -- for coordination of all tools.
For each reader there will be a process called "ifdhandler" and a socket in this directory, the name
for the first reader is usualy "0", for the second "1" and so on.
</p>
<p>
If the environment variable OPENCT_SOCKETDIR is set, that directory will be used instead of /var/run/openct.
On Solaris the files are placed in UTDEVROOT/openct/ directory if the environment variable UTDEVROOT is set.
</p>
<p>
OpenCT needs an init.d script to be run at bootup and at shutdown. The script is usualy called /etc/init.d/openct
and there are symlinks in the /etc/rc*.d/ directories pointing to it.
</p>
<p>
On linux systems with hotplugging, OpenCT also has these files:
</p>
<ul><li>/etc/hotplug/usb/openct.usermap -- tells the hotplug system which devices OpenCT knows about.
</li><li>/etc/hotplug/usb/openct -- script called by hotplug for each device added or removed.
</li></ul><p>
Recently some linux distribution changed the tool for hotplug event handling from "hotplug" shell scripts towards udev or hald. Hald is suggested by some developers, but there is not enough documentation so we don't know how to use it. Also hald seems to miss some features hotplug and udev have. Using udev is supported by OpenCT. You will need these files:
</p>
<ul><li>/etc/udev/rules.d/95-openct.rules -- tells udev which devices OpenCT knows about and to run
</li><li>/etc/hotplug/usb/openct -- script run by udev for each device added or remove. 
</li></ul><p>
The hotplug script is a generic script that works in both situations without changes.
</p>
<p>
OpenCT is shipped with these tools:
</p>
<ul><li>openct-tool -- lists all readers, their names, the atr, waits for a reader or card etc. great for debugging.
</li><li>openct-control -- usualy only called by the init.d script on boot and shutdown
</li><li>ifdhandler -- does all the work in the background, called by openct-control or the hotplug script.
</li></ul><p>
OpenCT is shipped with two plugins/drivers/shared objects:
</p>
<ul><li>libopenctapi.so -- a shared object in CT-API format, you can use this with every ct-api aware application.
</li><li>openct-ifd.so -- a shared object in Ifdhandler v2 format, to be used by pcsc-lite as reader.
</li></ul><h2 id="Sharedlibrary">Shared library</h2>
<p>
If you want to write an application to use openct directly, you can do so using the shared library libopenct.so.
OpenCT also has header files for you in $(prefix)/include/openct/ and it comes with a pkg-config file "libopenct.pc",
see the pkg-config documentation how to use it in your Makefile or autoconf configure.in file. This should make
linking with OpenCT easy, please send us some feedback.
</p>

        
        
      </div>
    </div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>