41#ifndef __winscard_msg_h__
42#define __winscard_msg_h__
50#define PROTOCOL_VERSION_MAJOR 4
52#define PROTOCOL_VERSION_MINOR 5
148 char szReader[MAX_READERNAME];
149 uint32_t dwShareMode;
150 uint32_t dwPreferredProtocols;
152 uint32_t dwActiveProtocol;
164 uint32_t dwShareMode;
165 uint32_t dwPreferredProtocols;
166 uint32_t dwInitialization;
167 uint32_t dwActiveProtocol;
179 uint32_t dwDisposition;
202 uint32_t dwDisposition;
236 uint32_t ioSendPciProtocol;
237 uint32_t ioSendPciLength;
238 uint32_t cbSendLength;
239 uint32_t ioRecvPciProtocol;
240 uint32_t ioRecvPciLength;
241 uint32_t pcbRecvLength;
253 uint32_t dwControlCode;
254 uint32_t cbSendLength;
255 uint32_t cbRecvLength;
256 uint32_t dwBytesReturned;
276 uint32_t readerEvents;
286 int32_t ListenExistingSocket(
int fd);
289 char *getSocketName(
void);
293 uint64_t buffer_size, int32_t filedes,
long timeOut);
295 uint64_t size,
void *data);
297 LONG
MessageSend(
void *buffer, uint64_t buffer_size, int32_t filedes);
This keeps a list of defines for pcsc-lite.
#define MAX_BUFFER_SIZE
Maximum Tx/Rx Buffer for short APDU.
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.
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.
int32_t major
IPC major PROTOCOL_VERSION_MAJOR.
int32_t minor
IPC minor PROTOCOL_VERSION_MINOR.
Information contained in CMD_WAIT_READER_STATE_CHANGE Messages.
uint32_t timeOut
timeout in ms
LONG MessageSend(void *buffer, uint64_t buffer_size, int32_t filedes)
Sends a menssage from client to server or vice-versa.
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.
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.
LONG MessageSendWithHeader(uint32_t command, uint32_t dwClientID, uint64_t size, void *data)
Wrapper for the MessageSend() function.
void ClientCloseSession(uint32_t)
Closes the socket used by the client to communicate with the server.
int32_t ClientSetupSession(uint32_t *)
Prepares a communication channel for the client to talk to the server.
pcsc_msg_commands
Commands available to use in the field sharedSegmentMsg.command.
@ 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()
@ CMD_GET_READER_EVENTS
get the number of reader events
@ 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()
INTERNAL int32_t InitializeSocket(void)
Prepares the communication channel used by the server to talk to the clients.
INTERNAL int32_t ProcessEventsServer(uint32_t *pdwClientID)
Looks for messages sent by clients.
This keeps a list of Windows(R) types.