33 #include <sys/types.h> 43 #define BLANK_LINE() \ 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)); \ 106 check_constants (
void)
108 COMMENT (
"Constants...");
115 CHECK_DEFINE (MAX_READERNAME);
120 COMMENT (
"enum pcsc_msg_commands");
146 COMMENT (
"Types...");
253 main(
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");
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.