1 #include "config.h" 2 3 #include <razorback/debug.h> 4 #include <razorback/messages.h> 5 #include <razorback/log.h> 6 7 #include "messages/core.h" 8 #include "messages/cnc/core.h" 9 10 SO_PUBLIC struct Message * MessageGo_Initialize(const uuid_t p_uuidSourceNugget,const uuid_t p_uuidDestNugget)11MessageGo_Initialize ( 12 const uuid_t p_uuidSourceNugget, 13 const uuid_t p_uuidDestNugget) 14 { 15 struct Message *msg; 16 if ((msg = Message_Create_Directed(MESSAGE_TYPE_GO, MESSAGE_VERSION_1, 0, p_uuidSourceNugget, p_uuidDestNugget)) == NULL) 17 return NULL; 18 19 msg->destroy = Message_Destroy; 20 msg->deserialize = Message_Deserialize_Empty; 21 msg->serialize = Message_Serialize_Empty; 22 return msg; 23 } 24 25 static struct MessageHandler handler = { 26 MESSAGE_TYPE_GO, 27 Message_Serialize_Empty, 28 Message_Deserialize_Empty, 29 Message_Destroy 30 }; 31 32 // core.h 33 void Message_CnC_Go_Init(void)34Message_CnC_Go_Init(void) 35 { 36 Message_Register_Handler(&handler); 37 } 38