41 #ifndef __winscard_msg_h__
42 #define __winscard_msg_h__
50 #define PROTOCOL_VERSION_MAJOR 4
52 #define PROTOCOL_VERSION_MINOR 6
54 #define PROTOCOL_VERSION_MINOR_CLIENT_BACKWARD 4
56 #define PROTOCOL_VERSION_MINOR_SERVER_BACKWARD 4
104 CMD_GET_READERS_STATE_SIZE = 0x16,
154 char szReader[MAX_READERNAME];
155 uint32_t dwShareMode;
156 uint32_t dwPreferredProtocols;
158 uint32_t dwActiveProtocol;
170 uint32_t dwShareMode;
171 uint32_t dwPreferredProtocols;
172 uint32_t dwInitialization;
173 uint32_t dwActiveProtocol;
185 uint32_t dwDisposition;
208 uint32_t dwDisposition;
242 uint32_t ioSendPciProtocol;
243 uint32_t ioSendPciLength;
244 uint32_t cbSendLength;
245 uint32_t ioRecvPciProtocol;
246 uint32_t ioRecvPciLength;
247 uint32_t pcbRecvLength;
259 uint32_t dwControlCode;
260 uint32_t cbSendLength;
261 uint32_t cbRecvLength;
262 uint32_t dwBytesReturned;
282 uint32_t readerEvents;
292 int32_t ListenExistingSocket(
int fd);
295 char *getSocketName(
void);
299 uint64_t buffer_size, int32_t filedes,
long timeOut);
301 uint64_t size,
void *data);
303 LONG
MessageSend(
void *buffer, uint64_t buffer_size, int32_t filedes);
used by SCardBeginTransaction()
contained in SCARD_CONNECT Messages.
wait for a reader state change
contained in SCARD_CANCEL Messages.
contained in SCARD_TRANSMIT Messages.
void ClientCloseSession(uint32_t)
Closes the socket used by the client to communicate with the server.
contained in SCARD_END_TRANSACTION Messages.
int32_t ClientSetupSession(uint32_t *)
Prepares a communication channel for the client to talk to the server.
#define MAX_BUFFER_SIZE
Maximum Tx/Rx Buffer for short APDU.
get the client/server protocol version
used by SCardEstablishContext()
int32_t minor
IPC minor PROTOCOL_VERSION_MINOR.
used by SCardEndTransaction()
get the readers state array
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.
LONG MessageSendWithHeader(uint32_t command, uint32_t dwClientID, uint64_t size, void *data)
Wrapper for the MessageSend() function.
Information transmitted in CMD_VERSION Messages.
used by SCardReleaseContext()
contained in SCARD_STATUS Messages.
contained in SCARD_RECONNECT Messages.
uint32_t timeOut
timeout in ms
contained in SCARD_GET_ATTRIB and Messages.
get the number of reader events
Information contained in CMD_WAIT_READER_STATE_CHANGE Messages.
INTERNAL int32_t InitializeSocket(void)
Prepares the communication channel used by the server to talk to the clients.
pcsc_msg_commands
Commands available to use in the field sharedSegmentMsg.command.
This keeps a list of defines for pcsc-lite.
LONG MessageReceiveTimeout(uint32_t command, void *buffer, uint64_t buffer_size, int32_t filedes, long timeOut)
Called by the Client to get the response from the server or vice-versa.
stop waiting for a reader state change
This keeps a list of Windows(R) types.
LONG MessageSend(void *buffer, uint64_t buffer_size, int32_t filedes)
Sends a menssage from client to server or vice-versa.
used by SCardListReaders()
INTERNAL int32_t ProcessEventsServer(uint32_t *pdwClientID)
Looks for messages sent by clients.
used by SCardDisconnect()
contained in SCARD_CONTROL Messages.
LONG MessageReceive(void *buffer, uint64_t buffer_size, int32_t filedes)
Called by the Client to get the response from the server or vice-versa.
int32_t major
IPC major PROTOCOL_VERSION_MAJOR.