36 #include <sys/types.h> 46 #define BLANK_LINE() \ 56 #define STRINGIFY(a) #a 59 #define CHECK_CDEFINE(a) \ 60 printf(" CLASSERT("#a" == "STRINGIFY(a) ");\n") 62 #define CHECK_CVALUE(a) \ 63 printf(" CLASSERT("#a" == %lld);\n", (long long)a) 65 #define CHECK_DEFINE(a) \ 67 printf(" LASSERTF("#a" == "STRINGIFY(a) \ 68 ",\" found %%lld\\n\",\n " \ 69 "(long long)"#a");\n"); \ 72 #define CHECK_VALUE(a) \ 74 printf(" LASSERTF("#a \ 75 " == %lld, \" found %%lld\\n\",\n "\ 76 "(long long)"#a");\n", (long long)a); \ 79 #define CHECK_VALUE_64(a) \ 81 printf(" LASSERTF("#a \ 82 " == %lldULL, \" found %%lld\\n\",\n "\ 83 "(long long)"#a");\n", (long long)a); \ 86 #define CHECK_MEMBER_OFFSET(s,m) \ 88 CHECK_VALUE((int)offsetof(struct s, m)); \ 91 #define CHECK_MEMBER_SIZEOF(s,m) \ 93 CHECK_VALUE((int)sizeof(((struct s *)0)->m)); \ 96 #define CHECK_MEMBER(s,m) \ 98 CHECK_MEMBER_OFFSET(s, m); \ 99 CHECK_MEMBER_SIZEOF(s, m); \ 102 #define CHECK_STRUCT(s) \ 104 COMMENT("Checks for struct "#s); \ 105 CHECK_VALUE((int)sizeof(struct s)); \ 109 check_constants (
void)
111 COMMENT (
"Constants...");
118 CHECK_DEFINE (MAX_READERNAME);
123 COMMENT (
"enum pcsc_msg_commands");
149 COMMENT (
"Types...");
256 main(
int argc,
char **argv)
261 printf (
"#include <sys/types.h>\n" 262 "#include <time.h>\n" 263 "#include <stddef.h>\n\n" 264 "#include \"PCSC/pcsclite.h\"\n" 265 "#include \"pcscd.h\"\n" 266 "#include \"readerfactory.h\"\n" 267 "#include \"eventhandler.h\"\n" 268 "#include \"winscard_msg.h\"\n\n" 269 "#include \"lassert.h\"\n\n" 270 "int pcsc_assert_wire_constants(void);\n" 271 "int pcsc_assert_wire_constants(void)\n" 281 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.