49#include <sys/socket.h>
59#ifdef HAVE_SYS_FILIO_H
83#define member_size(type, member) sizeof(((type *)0)->member)
85char *getSocketName(
void)
130 Log2(PCSC_LOG_CRITICAL,
"Error: create on client socket: %s",
143 Log3(PCSC_LOG_CRITICAL,
"Error: connect to client socket %s: %s",
152 Log3(PCSC_LOG_CRITICAL,
"Error: cannot retrieve socket %s flags: %s",
160 Log3(PCSC_LOG_CRITICAL,
"Error: cannot set socket %s nonblocking: %s",
276 retval = SCardCheckDaemonAvailability();
289 Log2(PCSC_LOG_INFO,
"Command 0x%X not yet finished", command);
295 Log2(PCSC_LOG_ERROR,
"select returns with failure: %s",
432 Log2(PCSC_LOG_ERROR,
"select returns with failure: %s",
523 Log2(PCSC_LOG_ERROR,
"select returns with failure: %s",
#define SCARD_W_SECURITY_VIOLATION
Access was denied because of a security violation.
#define SCARD_S_SUCCESS
No error was encountered.
#define SCARD_F_COMM_ERROR
An internal communications error has been detected.
#define SCARD_E_TIMEOUT
The user-specified timeout value has expired.
#define SCARD_E_NO_SERVICE
The Smart card resource manager is not running.
This keeps a list of defines for pcsc-lite.
@ POWER_STATE_POWERED
powered
This handles abstract system level calls.
long int time_sub(struct timeval *a, struct timeval *b)
return the difference (as long int) in µs between 2 struct timeval r = a - b
This handles smart card reader communications.
INTERNAL int ClientSetupSession(uint32_t *pdwClientID)
Prepares a communication channel for the client to talk to the server.
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 response from the server or vice-versa.
INTERNAL LONG MessageSendWithHeader(uint32_t command, uint32_t dwClientID, uint64_t size, void *data_void)
Wrapper for the MessageSend() function.
INTERNAL LONG MessageSend(void *buffer_void, uint64_t buffer_size, int32_t filedes)
Sends a menssage from client to server or vice-versa.
INTERNAL void ClientCloseSession(uint32_t dwClientID)
Closes the socket used by the client to communicate with the server.
INTERNAL LONG MessageReceive(void *buffer_void, uint64_t buffer_size, int32_t filedes)
Called by the Client to get the response from the server or vice-versa.
This defines some structures and #defines to be used over the transport layer.