Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

ctservice.h File Reference

#include <chameleon/chameleon.h>
#include <chameleon/cryp.h>
#include <chameleon/ipcmessage.h>
#include <chameleon/conf.h>

Go to the source code of this file.

Classes

struct  CTSERVICEDATASTRUCT
struct  CTSERVICEREQUESTSTRUCT

Defines

#define CTSERVICE_MSGCODE_BF   0x10001
#define CTSERVICE_MSGCODE_BF_VERSION   0x00100
#define CTSERVICE_MSGCODE_RQ_EXCHANGE_KEYS   0x10002
#define CTSERVICE_MSGCODE_RQ_EXCHANGE_KEYS_VERSION   0x00101
#define CTSERVICE_MSGCODE_RP_EXCHANGE_KEYS   0x10003
#define CTSERVICE_MSGCODE_RP_EXCHANGE_KEYS_VERSION   0x00100
#define CTSERVICE_MSGCODE_RQ_SESSION_KEY   0x10004
#define CTSERVICE_MSGCODE_RQ_SESSION_KEY_VERSION   0x00100
#define CTSERVICE_MSGCODE_RP_SESSION_KEY   0x10005
#define CTSERVICE_MSGCODE_RP_SESSION_KEY_VERSION   0x00100
#define CTSERVICE_MSGCODE_RP_ERROR   0x10006
#define CTSERVICE_MSGCODE_RP_ERROR_VERSION   0x00100
#define CTSERVICE_MSGCODE_RQ_OPEN   0x10007
#define CTSERVICE_MSGCODE_RQ_OPEN_VERSION   0x00100
#define CTSERVICE_MSGCODE_RP_OPEN   0x10008
#define CTSERVICE_MSGCODE_RP_OPEN_VERSION   0x00100
#define CTSERVICE_ERROR_TYPE   "CTService"
#define CTSERVICE_SUCCESS   0
#define CTSERVICE_ERROR_DRIVER   1
#define CTSERVICE_ERROR_INVALID   2
#define CTSERVICE_ERROR_BUFFER   3
#define CTSERVICE_ERROR_NO_REQUEST   5
#define CTSERVICE_ERROR_NO_MESSAGE   6
#define CTSERVICE_ERROR_BAD_CHANNEL_STATUS   7
#define CTSERVICE_ERROR_BAD_MESSAGE_VERSION   8
#define CTSERVICE_ERROR_BAD_MESSAGE_CODE   9
#define CTSERVICE_ERROR_BAD_BUFFERSIZE   10
#define CTSERVICE_ERROR_NO_COMMANDS   11
#define CTSERVICE_ERROR_NO_CONFIG   12
#define CTSERVICE_ERROR_UNREACHABLE   13
#define CTSERVICE_ERROR_NO_MESSAGELAYER   14
#define CTSERVICE_ERROR_NO_CLIENT   15
#define CTSERVICE_ERROR_REMOTE   16
#define CTSERVICE_ERROR_NO_TRANSPORT_LAYER   17
#define CTSERVICE_ERROR_BAD_CONFIG   18
#define CTSERVICE_ERROR_SYSTEM_ERROR   19
#define CTSERVICE_ERROR_EXPIRED   20
#define CTSERVICE_ERROR_INTERRUPTED   21
#define CTSERVICE_ERROR_INTERNAL   22
#define CTSERVICE_ERROR_NO_SERVICE   23
#define CTSERVICE_ERROR_CARD_REMOVED   100
#define CTSERVICE_ERROR_CARD_LOCKED   101
#define CTSERVICE_DEFAULT_PORT   32891
#define CTSERVICE_DEFAULT_ACCESS   "777"

Typedefs

typedef CTSERVICEREQUESTSTRUCT CTSERVICEREQUEST
typedef CTSERVICEDATASTRUCT CTSERVICEDATA

Enumerations

enum  CTSERVICE_CHANNEL_STATE { ChannelClosed = 0, ChannelOpening, ChannelOpen }

Functions

ERRORCODE CTService_ModuleInit ()
ERRORCODE CTService_ModuleFini ()
CTSERVICEDATACTService_PeerData_new ()
void CTService_PeerData_free (CTSERVICEDATA *pd)
CTSERVICEREQUESTCTService_Request_new ()
void CTService_Request_free (CTSERVICEREQUEST *rq)
IPCMESSAGECTService_Request_NextResponse (CTSERVICEREQUEST *rq)
IPCMESSAGECTService_Request_PeekResponse (CTSERVICEREQUEST *rq)
IPCMESSAGECTService_EncryptMessage (CTSERVICEDATA *pd, IPCMESSAGE *msg)
IPCMESSAGECTService_DecryptMessage (CTSERVICEDATA *pd, IPCMESSAGE *msg)
void CTService_Request_AddRequest (CTSERVICEREQUEST *req, CTSERVICEREQUEST **head)
void CTService_Request_RemoveRequest (CTSERVICEREQUEST *req, CTSERVICEREQUEST **head)
CTSERVICEREQUESTCTService_Request_FindRequest (int id, CTSERVICEREQUEST **head)
IPCMESSAGECTService_Message_Create (int msgCode, int msgVersion, int msgId, int msgReply, int msgSize)
CTSERVICEREQUESTCTService_Request_Create (int serviceid, int msgCode, int msgVersion, int msgId, int msgReply, int msgSize)
ERRORCODE CTService_CheckMsgCodeAndVersion (IPCMESSAGE *msg, int msgCode, int msgVersion)
unsigned int Debug_CreateKeyFingerprint (CRYP_RSAKEY *key1)
unsigned int Debug_DataFingerPrint (const char *data, int size)


Define Documentation

#define CTSERVICE_DEFAULT_ACCESS   "777"
 

#define CTSERVICE_DEFAULT_PORT   32891
 

#define CTSERVICE_ERROR_BAD_BUFFERSIZE   10
 

#define CTSERVICE_ERROR_BAD_CHANNEL_STATUS   7
 

#define CTSERVICE_ERROR_BAD_CONFIG   18
 

#define CTSERVICE_ERROR_BAD_MESSAGE_CODE   9
 

#define CTSERVICE_ERROR_BAD_MESSAGE_VERSION   8
 

#define CTSERVICE_ERROR_BUFFER   3
 

#define CTSERVICE_ERROR_CARD_LOCKED   101
 

#define CTSERVICE_ERROR_CARD_REMOVED   100
 

#define CTSERVICE_ERROR_DRIVER   1
 

#define CTSERVICE_ERROR_EXPIRED   20
 

#define CTSERVICE_ERROR_INTERNAL   22
 

#define CTSERVICE_ERROR_INTERRUPTED   21
 

#define CTSERVICE_ERROR_INVALID   2
 

#define CTSERVICE_ERROR_NO_CLIENT   15
 

#define CTSERVICE_ERROR_NO_COMMANDS   11
 

#define CTSERVICE_ERROR_NO_CONFIG   12
 

#define CTSERVICE_ERROR_NO_MESSAGE   6
 

#define CTSERVICE_ERROR_NO_MESSAGELAYER   14
 

#define CTSERVICE_ERROR_NO_REQUEST   5
 

#define CTSERVICE_ERROR_NO_SERVICE   23
 

#define CTSERVICE_ERROR_NO_TRANSPORT_LAYER   17
 

#define CTSERVICE_ERROR_REMOTE   16
 

#define CTSERVICE_ERROR_SYSTEM_ERROR   19
 

#define CTSERVICE_ERROR_TYPE   "CTService"
 

#define CTSERVICE_ERROR_UNREACHABLE   13
 

#define CTSERVICE_MSGCODE_BF   0x10001
 

#define CTSERVICE_MSGCODE_BF_VERSION   0x00100
 

#define CTSERVICE_MSGCODE_RP_ERROR   0x10006
 

#define CTSERVICE_MSGCODE_RP_ERROR_VERSION   0x00100
 

#define CTSERVICE_MSGCODE_RP_EXCHANGE_KEYS   0x10003
 

#define CTSERVICE_MSGCODE_RP_EXCHANGE_KEYS_VERSION   0x00100
 

#define CTSERVICE_MSGCODE_RP_OPEN   0x10008
 

#define CTSERVICE_MSGCODE_RP_OPEN_VERSION   0x00100
 

#define CTSERVICE_MSGCODE_RP_SESSION_KEY   0x10005
 

#define CTSERVICE_MSGCODE_RP_SESSION_KEY_VERSION   0x00100
 

#define CTSERVICE_MSGCODE_RQ_EXCHANGE_KEYS   0x10002
 

#define CTSERVICE_MSGCODE_RQ_EXCHANGE_KEYS_VERSION   0x00101
 

#define CTSERVICE_MSGCODE_RQ_OPEN   0x10007
 

#define CTSERVICE_MSGCODE_RQ_OPEN_VERSION   0x00100
 

#define CTSERVICE_MSGCODE_RQ_SESSION_KEY   0x10004
 

#define CTSERVICE_MSGCODE_RQ_SESSION_KEY_VERSION   0x00100
 

#define CTSERVICE_SUCCESS   0
 


Typedef Documentation

typedef struct CTSERVICEDATASTRUCT CTSERVICEDATA
 

typedef struct CTSERVICEREQUESTSTRUCT CTSERVICEREQUEST
 


Enumeration Type Documentation

enum CTSERVICE_CHANNEL_STATE
 

Enumeration values:
ChannelClosed 
ChannelOpening 
ChannelOpen 


Function Documentation

ERRORCODE CTService_CheckMsgCodeAndVersion IPCMESSAGE msg,
int  msgCode,
int  msgVersion
 

IPCMESSAGE* CTService_DecryptMessage CTSERVICEDATA pd,
IPCMESSAGE msg
 

This function decrypts the given message.

Returns:
encrypted message
Parameters:
pd pointer to service data
msg pointer to the encrypted message (will not be taken over!)

IPCMESSAGE* CTService_EncryptMessage CTSERVICEDATA pd,
IPCMESSAGE msg
 

This function encrypts the given message.

Returns:
encrypted message
Parameters:
pd pointer to service data
msg pointer to the raw message (will not be taken over!)

IPCMESSAGE* CTService_Message_Create int  msgCode,
int  msgVersion,
int  msgId,
int  msgReply,
int  msgSize
 

ERRORCODE CTService_ModuleFini  ) 
 

ERRORCODE CTService_ModuleInit  ) 
 

void CTService_PeerData_free CTSERVICEDATA pd  ) 
 

CTSERVICEDATA* CTService_PeerData_new  ) 
 

void CTService_Request_AddRequest CTSERVICEREQUEST req,
CTSERVICEREQUEST **  head
 

CTSERVICEREQUEST* CTService_Request_Create int  serviceid,
int  msgCode,
int  msgVersion,
int  msgId,
int  msgReply,
int  msgSize
 

CTSERVICEREQUEST* CTService_Request_FindRequest int  id,
CTSERVICEREQUEST **  head
 

void CTService_Request_free CTSERVICEREQUEST rq  ) 
 

CTSERVICEREQUEST* CTService_Request_new  ) 
 

IPCMESSAGE* CTService_Request_NextResponse CTSERVICEREQUEST rq  ) 
 

IPCMESSAGE* CTService_Request_PeekResponse CTSERVICEREQUEST rq  ) 
 

void CTService_Request_RemoveRequest CTSERVICEREQUEST req,
CTSERVICEREQUEST **  head
 

unsigned int Debug_CreateKeyFingerprint CRYP_RSAKEY key1  ) 
 

unsigned int Debug_DataFingerPrint const char *  data,
int  size
 


Generated on Mon Jan 5 20:56:28 2004 for libchipcard by doxygen 1.3.4