37#include "PCSC/pcsclite.h"
50 printf(" /* "c" */\n"); \
53#define STRINGIFY(a) #a
56#define CHECK_CDEFINE(a) \
57 printf(" CLASSERT("#a" == "STRINGIFY(a) ");\n")
59#define CHECK_CVALUE(a) \
60 printf(" CLASSERT("#a" == %lld);\n", (long long)a)
62#define CHECK_DEFINE(a) \
64 printf(" LASSERTF("#a" == "STRINGIFY(a) \
65 ",\" found %%lld\\n\",\n " \
66 "(long long)"#a");\n"); \
69#define CHECK_VALUE(a) \
71 printf(" LASSERTF("#a \
72 " == %lld, \" found %%lld\\n\",\n "\
73 "(long long)"#a");\n", (long long)a); \
76#define CHECK_VALUE_64(a) \
78 printf(" LASSERTF("#a \
79 " == %lldULL, \" found %%lld\\n\",\n "\
80 "(long long)"#a");\n", (long long)a); \
83#define CHECK_MEMBER_OFFSET(s,m) \
85 CHECK_VALUE((int)offsetof(struct s, m)); \
88#define CHECK_MEMBER_SIZEOF(s,m) \
90 CHECK_VALUE((int)sizeof(((struct s *)0)->m)); \
93#define CHECK_MEMBER(s,m) \
95 CHECK_MEMBER_OFFSET(s, m); \
96 CHECK_MEMBER_SIZEOF(s, m); \
99#define CHECK_STRUCT(s) \
101 COMMENT("Checks for struct "#s); \
102 CHECK_VALUE((int)sizeof(struct s)); \
106check_constants (
void)
108 COMMENT (
"Constants...");
115 CHECK_DEFINE (MAX_READERNAME);
120 COMMENT (
"enum pcsc_msg_commands");
146 COMMENT (
"Types...");
253main(
int argc,
char **argv)
258 printf (
"#include <sys/types.h>\n"
259 "#include <time.h>\n"
260 "#include <stddef.h>\n\n"
261 "#include \"PCSC/pcsclite.h\"\n"
262 "#include \"pcscd.h\"\n"
263 "#include \"readerfactory.h\"\n"
264 "#include \"eventhandler.h\"\n"
265 "#include \"winscard_msg.h\"\n\n"
266 "#include \"lassert.h\"\n\n"
267 "int pcsc_assert_wire_constants(void);\n"
268 "int pcsc_assert_wire_constants(void)\n"
278 printf (
"return 0;\n");
This handles card insertion/removal events, updates ATR, protocol, and status information.
#define MAX_ATR_SIZE
Maximum ATR size.
#define MAX_BUFFER_SIZE
Maximum Tx/Rx Buffer for short APDU.
This keeps track of a list of currently available reader structures.
contained in SCARD_BEGIN_TRANSACTION Messages.
contained in SCARD_CANCEL Messages.
contained in SCARD_CONNECT Messages.
contained in SCARD_CONTROL Messages.
contained in SCARD_DISCONNECT Messages.
contained in SCARD_END_TRANSACTION Messages.
Information contained in SCARD_ESTABLISH_CONTEXT Messages.
contained in SCARD_GET_ATTRIB and Messages.
Define an exported public reader state structure so each application gets instant notification of cha...
contained in SCARD_RECONNECT Messages.
Information contained in SCARD_RELEASE_CONTEXT Messages.
contained in SCARD_STATUS Messages.
contained in SCARD_TRANSMIT Messages.
Information transmitted in CMD_VERSION Messages.
This defines some structures and #defines to be used over the transport layer.
#define PROTOCOL_VERSION_MAJOR
Major version of the current message protocol.
#define PROTOCOL_VERSION_MINOR
Minor version of the current message protocol.
@ SCARD_DISCONNECT
used by SCardDisconnect()
@ SCARD_SET_ATTRIB
used by SCardSetAttrib()
@ SCARD_RELEASE_CONTEXT
used by SCardReleaseContext()
@ CMD_STOP_WAITING_READER_STATE_CHANGE
stop waiting for a reader state change
@ CMD_GET_READERS_STATE
get the readers state
@ SCARD_GET_STATUS_CHANGE
not used
@ SCARD_CONTROL
used by SCardControl()
@ CMD_VERSION
get the client/server protocol version
@ CMD_WAIT_READER_STATE_CHANGE
wait for a reader state change
@ SCARD_RECONNECT
used by SCardReconnect()
@ SCARD_STATUS
used by SCardStatus()
@ SCARD_GET_ATTRIB
used by SCardGetAttrib()
@ SCARD_BEGIN_TRANSACTION
used by SCardBeginTransaction()
@ SCARD_TRANSMIT
used by SCardTransmit()
@ SCARD_LIST_READERS
used by SCardListReaders()
@ SCARD_END_TRANSACTION
used by SCardEndTransaction()
@ SCARD_CANCEL
used by SCardCancel()
@ SCARD_CANCEL_TRANSACTION
not used
@ SCARD_CONNECT
used by SCardConnect()
@ SCARD_ESTABLISH_CONTEXT
used by SCardEstablishContext()