pcscdaemon.c File Reference

This is the main pcscd daemon. More...

#include "config.h"
#include <time.h>
#include <syslog.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include "misc.h"
#include "pcsclite.h"
#include "debuglog.h"
#include "winscard_msg.h"
#include "winscard_svc.h"
#include "sys_generic.h"
#include "thread_generic.h"
#include "hotplug.h"
#include "readerfactory.h"
#include "configfile.h"
#include "powermgt_generic.h"

Go to the source code of this file.

Defines

#define TRUE   1
#define FALSE   0
#define PID_ASCII_SIZE   11
#define OPT_STRING   "c:fdhvaeCH"

Functions

void SVCServiceRunLoop (void)
 The Server's Message Queue Listener function.
void SVCClientCleanup (psharedSegmentMsg)
void at_exit (void)
void clean_temp_files (void)
void signal_reload (int sig)
void signal_trap (int)
void print_version (void)
void print_usage (char const *const)
pid_t GetDaemonPid (void)
int SendHotplugSignal (void)
int main (int argc, char **argv)

Variables

char AraKiri = FALSE
static char Init = TRUE
int HPForceReaderPolling = 0
PCSCLITE_MUTEX usbNotifierMutex


Detailed Description

This is the main pcscd daemon.

The function main() starts up the communication environment.
Then an endless loop is calld to look for Client connections. For each Client connection a call to CreateContextThread() is done.

Definition in file pcscdaemon.c.


Function Documentation

void SVCServiceRunLoop ( void   ) 

The Server's Message Queue Listener function.

An endless loop calls the function SHMProcessEventsServer() to check for messages sent by clients. If the message is valid, CreateContextThread() is called to serve this request.

Definition at line 141 of file pcscdaemon.c.

References AraKiri, ContextsInitialize(), CreateContextThread(), HPRegisterForHotplugEvents(), HPSearchHotPluggables(), HPStopHotPluggables(), Log1, Log2, PCSC_LOG_CRITICAL, PCSC_LOG_DEBUG, PCSC_LOG_ERROR, PMRegisterForPowerEvents(), RFCleanupReaders(), SCARD_S_SUCCESS, SHMInitializeCommonSegment(), SHMProcessEventsServer(), SYS_MutexInit(), SYS_Sleep(), TRUE, and usbNotifierMutex.

Referenced by main().


Generated on Mon Aug 27 13:45:37 2007 for pcsc-lite by  doxygen 1.5.2