20 #ifndef __winscard_msg_h__
21 #define __winscard_msg_h__
26 #define PROTOCOL_VERSION_MAJOR 4
28 #define PROTOCOL_VERSION_MINOR 2
123 char szReader[MAX_READERNAME];
124 uint32_t dwShareMode;
125 uint32_t dwPreferredProtocols;
127 uint32_t dwActiveProtocol;
139 uint32_t dwShareMode;
140 uint32_t dwPreferredProtocols;
141 uint32_t dwInitialization;
142 uint32_t dwActiveProtocol;
154 uint32_t dwDisposition;
177 uint32_t dwDisposition;
211 uint32_t ioSendPciProtocol;
212 uint32_t ioSendPciLength;
213 uint32_t cbSendLength;
214 uint32_t ioRecvPciProtocol;
215 uint32_t ioRecvPciLength;
216 uint32_t pcbRecvLength;
228 uint32_t dwControlCode;
229 uint32_t cbSendLength;
230 uint32_t cbRecvLength;
231 uint32_t dwBytesReturned;
258 char *getSocketName(
void);
262 uint64_t buffer_size, int32_t filedes,
long timeOut);
264 uint64_t size,
void *data);
266 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.
contained in SCARD_END_TRANSACTION Messages.
INTERNAL int ClientCloseSession(uint32_t dwClientID)
Closes the socket used by the client to communicate with the server.
#define MAX_BUFFER_SIZE
Maximum Tx/Rx Buffer for short APDU.
INTERNAL int32_t ListenExistingSocket(int fd)
Acquires a socket passed in from systemd.
get the client/server protocol version
used by SCardEstablishContext()
INTERNAL LONG MessageSendWithHeader(uint32_t command, uint32_t dwClientID, uint64_t size, void *data_void)
Wrapper for the MessageSend() function.
int32_t minor
IPC minor PROTOCOL_VERSION_MINOR.
used by SCardEndTransaction()
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.
INTERNAL LONG MessageReceive(void *buffer_void, uint64_t buffer_size, int32_t filedes)
Called by the Client to get the reponse from the server or vice-versa.
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.
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.
stop waiting for a reader state change
INTERNAL int ClientSetupSession(uint32_t *pdwClientID)
Prepares a communication channel for the client to talk to the server.
used by SCardListReaders()
INTERNAL LONG MessageSend(void *buffer_void, uint64_t buffer_size, int32_t filedes)
Sends a menssage from client to server or vice-versa.
INTERNAL int32_t ProcessEventsServer(uint32_t *pdwClientID)
Looks for messages sent by clients.
used by SCardDisconnect()
contained in SCARD_CONTROL Messages.
int32_t major
IPC major PROTOCOL_VERSION_MAJOR.
INTERNAL LONG MessageReceiveTimeout(uint32_t command, void *buffer_void, uint64_t buffer_size, int32_t filedes, long timeOut)
Called by the Client to get the reponse from the server or vice-versa.