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