From 6c3b18bfbef4b1b98dc036cf18ea1e015369e655 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 15 Jan 2012 10:35:45 +0100 Subject: [PATCH] mncc: Use stdint.h from C++, copy newer version of OpenBSC's mncc.h * Use stdint.h... with the latest C++ spec there should even be a cstdint include * Update... including the version number and extended hello packet --- mncc.h | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/mncc.h b/mncc.h index fac7145..35e16fc 100644 --- a/mncc.h +++ b/mncc.h @@ -1,4 +1,6 @@ +#include + #define MNCC_SETUP_REQ 0x0101 #define MNCC_SETUP_IND 0x0102 #define MNCC_SETUP_RSP 0x0103 @@ -146,11 +148,11 @@ enum { struct gsm_mncc { /* context based information */ - u_int32_t msg_type; - u_int32_t callref; + uint32_t msg_type; + uint32_t callref; /* which fields are present */ - u_int32_t fields; + uint32_t fields; /* data derived informations (MNCC_F_ based) */ struct gsm_mncc_bearer_cap bearer_cap; @@ -182,13 +184,23 @@ struct gsm_mncc { }; struct gsm_data_frame { - u_int32_t msg_type; - u_int32_t callref; + uint32_t msg_type; + uint32_t callref; unsigned char data[0]; }; -#define MNCC_SOCK_VERSION 1 +#define MNCC_SOCK_VERSION 2 struct gsm_mncc_hello { - u_int32_t msg_type; - u_int32_t version; + uint32_t msg_type; + uint32_t version; + + /* send the sizes of the structs */ + uint32_t mncc_size; + uint32_t data_frame_size; + + /* send some offsets */ + uint32_t called_offset; + uint32_t signal_offset; + uint32_t emergency_offset; + uint32_t lchan_type_offset; }; -- 2.13.6