Struct kard::ccid::Header [] [src]

#[repr(C, packed)]
pub struct Header { pub bMessageType: MessageType, pub dwLength: u32, pub bSlot: u8, pub bSeq: u8, pub abRFU: [u8; 3], }

Generic CCID message header

Fields

The message type (bMessageType) identifies the message.

The length field (dwLength) is the length of the message not including the 10-byte header.

Identifies the slot number for this command

The slot number (bSlot) identifies which ICC slot is being addressed by the message, if the CCID supports multiple slots. The slot number is zero-relative, and is in the range of zero to FFh.

Sequence number for command

The sequence number (bSeq) is a monotonically increasing by one counter of bulk messages sent to the CCID. Because the response to a command always uses the exact same sequence number contained in the command, the host can use the sequence number in a response message to verify that a particular response is the one expected in reply to a particular command. This sequence number is not related to any interaction between the CCID and the ICC itself, but simply tracks the USB bulk message exchanges between the host and the CCID. The initial value of the sequence number is not important, but typically starts at zero.

Reserved for Future Use