00001
00002
00003
00004 #ifndef _ASM_H_
00005 #define _ASM_H_
00006
00007 #include "config.h"
00008 #include "../mc_list/list.h"
00009 #include "asm_node.h"
00010
00011 #ifdef MC_SECURITY
00012
00013 AP_QUEUE_DECL_TEMPLATE
00014 (
00015 asm_queue,
00016 asm_node
00017 );
00018
00019 AP_QUEUE_GENERIC_DECL_TEMPLATE
00020 (
00021 asm_queue,
00022 SearchAddr,
00023 asm_node_p,
00024 struct sockaddr_in*
00025 );
00026
00027 AP_QUEUE_GENERIC_DECL_TEMPLATE
00028 (
00029 asm_queue,
00030 RemoveAddr,
00031 int,
00032 struct sockaddr_in*
00033 );
00034
00035 typedef struct mc_asm_s
00036 {
00037 struct mc_platform_s* mc_platform;
00038 THREAD_T thread;
00039 asm_node_p home_encryption_info;
00040
00041
00042 int waiting;
00043 MUTEX_T* waiting_lock;
00044 COND_T* waiting_cond;
00045
00046
00047
00048
00049
00050 message_queue_p lost_message_queue;
00051 } mc_asm_t;
00052 typedef mc_asm_t* mc_asm_p;
00053
00054 struct mc_platform_s;
00055 int
00056 asm_Destroy
00057 (
00058 mc_asm_p mc_asm
00059 );
00060
00061 mc_asm_p
00062 asm_Initialize
00063 (
00064 struct mc_platform_s* mc_platform
00065 );
00066
00067 struct message_s;
00068 int
00069 asm_SendEncryptionData
00070 (
00071 mc_asm_p security_manager,
00072 const char* address
00073 );
00074
00075 void
00076 asm_Start(struct mc_platform_s* mc_platform);
00077
00078 #ifndef _WIN32
00079 void*
00080 asm_Thread(void* arg);
00081 #else
00082 DWORD WINAPI
00083 asm_Thread(LPVOID arg);
00084 #endif
00085
00086 #endif
00087 #endif