protocol.h
00001
00002
00003
00004
00005
00006
00007
00008 #ifndef OPENCT_PROTOCOL_H
00009 #define OPENCT_PROTOCOL_H
00010
00011 #ifdef __cplusplus
00012 extern "C" {
00013 #endif
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #define CT_CMD_STATUS 0x00
00024 #define CT_CMD_LOCK 0x01
00025 #define CT_CMD_UNLOCK 0x02
00026 #define CT_CMD_RESET 0x10
00027 #define CT_CMD_REQUEST_ICC 0x11
00028 #define CT_CMD_EJECT_ICC 0x12
00029 #define CT_CMD_OUTPUT 0x13
00030 #define CT_CMD_PERFORM_VERIFY 0x14
00031 #define CT_CMD_CHANGE_PIN 0x15
00032 #define CT_CMD_MEMORY_READ 0x16
00033 #define CT_CMD_MEMORY_WRITE 0x17
00034 #define CT_CMD_INPUT 0x18
00035 #define CT_CMD_TRANSACT_OLD 0x20
00036 #define CT_CMD_TRANSACT 0x21
00037 #define CT_CMD_SET_PROTOCOL 0x22
00038
00039 #define CT_UNIT_ICC1 0x00
00040 #define CT_UNIT_ICC2 0x01
00041 #define CT_UNIT_ICC3 0x02
00042 #define CT_UNIT_ICC4 0x03
00043 #define CT_UNIT_READER 0x10
00044 #define CT_UNIT_DISPLAY 0x11
00045 #define CT_UNIT_KEYPAD 0x12
00046
00047
00048
00049
00050 #define CT_TAG_READER_NAME 0x00
00051 #define CT_TAG_READER_UNITS 0x01
00052 #define CT_TAG_CARD_STATUS 0x02
00053 #define CT_TAG_ATR 0x03
00054 #define CT_TAG_LOCK 0x04
00055 #define CT_TAG_CARD_RESPONSE 0x05
00056 #define CT_TAG_TIMEOUT 0x80
00057 #define CT_TAG_MESSAGE 0x81
00058 #define CT_TAG_LOCKTYPE 0x82
00059 #define CT_TAG_PIN_DATA 0x83
00060 #define CT_TAG_CARD_REQUEST 0x84
00061 #define CT_TAG_ADDRESS 0x85
00062 #define CT_TAG_DATA 0x86
00063 #define CT_TAG_COUNT 0x87
00064 #define CT_TAG_PROTOCOL 0x88
00065
00066 #define __CT_TAG_LARGE 0x40
00067
00068 #ifdef __cplusplus
00069 }
00070 #endif
00071
00072 #endif