19 #define BLANK_LINE() \ 29 #define STRINGIFY(a) #a 32 #define CHECK_CDEFINE(a) \ 33 printf(" CLASSERT("#a" == "STRINGIFY(a) ");\n") 35 #define CHECK_CVALUE(a) \ 36 printf(" CLASSERT("#a" == %lld);\n", (long long)a) 38 #define CHECK_DEFINE(a) \ 40 printf(" LASSERTF("#a" == "STRINGIFY(a) \ 41 ",\" found %%lld\\n\",\n " \ 42 "(long long)"#a");\n"); \ 45 #define CHECK_VALUE(a) \ 47 printf(" LASSERTF("#a \ 48 " == %lld, \" found %%lld\\n\",\n "\ 49 "(long long)"#a");\n", (long long)a); \ 52 #define CHECK_VALUE_64(a) \ 54 printf(" LASSERTF("#a \ 55 " == %lldULL, \" found %%lld\\n\",\n "\ 56 "(long long)"#a");\n", (long long)a); \ 59 #define CHECK_MEMBER_OFFSET(s,m) \ 61 CHECK_VALUE((int)offsetof(struct s, m)); \ 64 #define CHECK_MEMBER_SIZEOF(s,m) \ 66 CHECK_VALUE((int)sizeof(((struct s *)0)->m)); \ 69 #define CHECK_MEMBER(s,m) \ 71 CHECK_MEMBER_OFFSET(s, m); \ 72 CHECK_MEMBER_SIZEOF(s, m); \ 75 #define CHECK_STRUCT(s) \ 77 COMMENT("Checks for struct "#s); \ 78 CHECK_VALUE((int)sizeof(struct s)); \ 82 check_constants (
void)
84 COMMENT (
"Constants...");
91 CHECK_DEFINE (MAX_READERNAME);
96 COMMENT (
"enum pcsc_msg_commands");
122 COMMENT (
"Types...");
229 main(
int argc,
char **argv)
234 printf (
"#include <sys/types.h>\n" 235 "#include <time.h>\n" 236 "#include <stddef.h>\n\n" 237 "#include \"PCSC/pcsclite.h\"\n" 238 "#include \"pcscd.h\"\n" 239 "#include \"readerfactory.h\"\n" 240 "#include \"eventhandler.h\"\n" 241 "#include \"winscard_msg.h\"\n\n" 242 "#include \"lassert.h\"\n\n" 243 "int pcsc_assert_wire_constants(void);\n" 244 "int pcsc_assert_wire_constants(void)\n" 254 printf (
"return 0;\n");
used by SCardBeginTransaction()
contained in SCARD_CONNECT Messages.
wait for a reader state change
contained in SCARD_CANCEL Messages.
contained in SCARD_TRANSMIT Messages.
contained in SCARD_END_TRANSACTION Messages.
#define MAX_BUFFER_SIZE
Maximum Tx/Rx Buffer for short APDU.
get the client/server protocol version
used by SCardEstablishContext()
used by SCardEndTransaction()
#define PROTOCOL_VERSION_MAJOR
Major version of the current message protocol.
contained in SCARD_DISCONNECT Messages.
Information contained in SCARD_RELEASE_CONTEXT Messages.
contained in SCARD_BEGIN_TRANSACTION Messages.
Information contained in SCARD_ESTABLISH_CONTEXT Messages.
Information transmitted in CMD_VERSION Messages.
used by SCardReleaseContext()
contained in SCARD_STATUS Messages.
contained in SCARD_RECONNECT Messages.
contained in SCARD_GET_ATTRIB and Messages.
This defines some structures and #defines to be used over the transport layer.
This handles card insertion/removal events, updates ATR, protocol, and status information.
This keeps a list of defines for pcsc-lite.
stop waiting for a reader state change
#define PROTOCOL_VERSION_MINOR
Minor version of the current message protocol.
This keeps a list of defines for pcsc-lite.
Define an exported public reader state structure so each application gets instant notification of cha...
used by SCardListReaders()
used by SCardDisconnect()
contained in SCARD_CONTROL Messages.
This keeps track of a list of currently available reader structures.
#define MAX_ATR_SIZE
Maximum ATR size.