gsm: Verify the MNCC_VERSION of the BSC/MS and close the socket on mismatch
[lcr.git] / mncc.h
diff --git a/mncc.h b/mncc.h
index 14dd6d4..16509bd 100644 (file)
--- a/mncc.h
+++ b/mncc.h
@@ -62,6 +62,8 @@
 #define GSM_TCH_FRAME_AMR      0x0303
 #define GSM_BAD_FRAME          0x03ff
 
+#define MNCC_SOCKET_HELLO      0x0400
+
 #define GSM_MAX_FACILITY       128
 #define GSM_MAX_SSVERSION      128
 #define GSM_MAX_USERUSER       128
@@ -192,12 +194,17 @@ struct gsm_data_frame {
 };
 
 struct gsm_mncc_rtp {
-       uint32_t        msg_type;
-       uint32_t        callref;
-       uint32_t        ip;
-       uint16_t        port;
-       uint32_t        payload_type;
-       uint32_t        payload_msg_type;
+       u_int32_t       msg_type;
+       u_int32_t       callref;
+       u_int32_t       ip;
+       u_int16_t       port;
+       u_int32_t       payload_type;
+       u_int32_t       payload_msg_type;
 };
 
 
+#define MNCC_SOCK_VERSION      1
+struct gsm_mncc_hello {
+       u_int32_t       msg_type;
+       u_int32_t       version;
+};