Logo Search packages:      
Sourcecode: pcsc-lite version File versions

pcscd.h

Go to the documentation of this file.
/*
 * MUSCLE SmartCard Development ( http://www.linuxnet.com )
 *
 * Copyright (C) 2006
 *  Ludovic Rousseau <ludovic.rousseau@free.fr>
 *
 * $Id$
 */

/**
 * @file
 * @brief This keeps a list of defines for pcsc-lite.
 */

#ifndef __pcscd_h__
#define __pcscd_h__

00018 #define SCARD_SCOPE_GLOBAL          0x0003      /**< Scope is global */

00020 #define SCARD_RESET                 0x0001      /**< Card was reset */
00021 #define SCARD_INSERTED              0x0002      /**< Card was inserted */
00022 #define SCARD_REMOVED               0x0004      /**< Card was removed */

00024 #define BLOCK_STATUS_RESUME         0x00FF      /**< Normal resume */
00025 #define BLOCK_STATUS_BLOCKING       0x00FA      /**< Function is blocking */

#define PCSCLITE_CONFIG_DIR         "/etc"

#define PCSCLITE_IPC_DIR            USE_IPCDIR
#define PCSCLITE_RUN_PID            PCSCLITE_IPC_DIR "/pcscd.pid"

#define PCSCLITE_READER_CONFIG            PCSCLITE_CONFIG_DIR "/reader.conf"
#define PCSCLITE_PUBSHM_FILE        PCSCLITE_IPC_DIR "/pcscd.pub"
#define PCSCLITE_CSOCK_NAME         PCSCLITE_IPC_DIR "/pcscd.comm"
#define PCSCLITE_EVENTS_DIR         PCSCLITE_IPC_DIR "/pcscd.events"

00037 #define PCSCLITE_SVC_IDENTITY       0x01030000  /**< Service ID */

00039 #define PCSCLITE_INFINITE_TIMEOUT   4320000           /**< 50 day infinite t/o */

00041 #define PCSCLITE_VERSION_NUMBER           "1.5.3"     /**< Current version */
00042 #define PCSCLITE_CLIENT_ATTEMPTS    120         /**< Attempts to reach sv */
00043 #define PCSCLITE_MCLIENT_ATTEMPTS   20          /**< Attempts to reach sv */
00044 #define PCSCLITE_STATUS_POLL_RATE   400000            /**< Status polling rate */
00045 #define PCSCLITE_LOCK_POLL_RATE           100000            /**< Lock polling rate */
00046 #define PCSCLITE_MSG_KEY_LEN        16          /**< App ID key length */
00047 #define PCSCLITE_RW_ATTEMPTS        100         /**< Attempts to rd/wrt */

/** Maximum applications */
00050 #define PCSCLITE_MAX_APPLICATIONS               16
/** Maximum contexts by application */
00052 #define PCSCLITE_MAX_APPLICATION_CONTEXTS       16
/** Maximum of applications contexts that pcscd can accept */
00054 #define PCSCLITE_MAX_APPLICATIONS_CONTEXTS \
      PCSCLITE_MAX_APPLICATIONS * PCSCLITE_MAX_APPLICATION_CONTEXTS
/** Maximum channels on a reader context */
00057 #define PCSCLITE_MAX_READER_CONTEXT_CHANNELS          16
/** Maximum channels on an application context */
00059 #define PCSCLITE_MAX_APPLICATION_CONTEXT_CHANNELS     16

/* PCSCLITE_MAX_READERS is deprecated
 * use PCSCLITE_MAX_READERS_CONTEXTS instead */
/* extern int PCSCLITE_MAX_READERS __attribute__ ((deprecated)); */

00065 #define PCSCLITE_MAX_THREADS        16    /**< Stat change threads */
00066 #define PCSCLITE_STATUS_WAIT        200000      /**< Status Change Sleep */
00067 #define PCSCLITE_TRANSACTION_TIMEOUT      40    /**< Transaction timeout */
#define MAX_LIBNAME                 100
#define MAX_DEVICENAME        255

/*
 * The message and buffer sizes must be multiples of 16.
 * The max message size must be at least large enough
 * to accomodate the transmit_struct
 */
00076 #define PCSCLITE_MAX_MESSAGE_SIZE   2048  /**< Transport msg len */
00077 #define MAX_BUFFER_SIZE             264   /**< Maximum Tx/Rx Buffer for short APDU */
00078 #define MAX_BUFFER_SIZE_EXTENDED    (4 + 3 + (1<<16) + 3)   /**< enhanced (64K + APDU + Lc + Le) Tx/Rx Buffer */
00079 #define PCSCLITE_SERVER_ATTEMPTS    5     /**< Attempts to reach cl */

#endif

Generated by  Doxygen 1.6.0   Back to index