|
The IFDHCreateChannelByName() function opens a communication channel with a card terminal specified by devicename. This function can use open(2) or other system call to open the device and establish a communication path. The caller of this function (smart card framework) assigns a logical unit number Lun per card terminal and slot and passes this value to IFDHCreateChannelByName().
If the IFD handler supports multiple terminals with one instance of the handler (as indicated by capability TAG_IFD_SIMULTANEOUS_ACCESS), it communicates with the card terminal corresponding to this Lun.
If the IFD handler supports only one terminal with one slot per instance, it can choose to ignore the Lun.
The Logical Unit Number, Lun is encoded as 0xXXXXYYYY, where
-
YYYY
- represents the lower 16 bits that correspond to the slot number for terminals with multiple slots. Most of the readers have only one slot, in which case YYYY is 0.
-
XXXX
- represents the next 16 bits that correspond to the card terminal and can range between 0 and a number returned by TAG_IFD_SUMULTANEOUS_ACCESS.
|