laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/mncc-python/+/36320?usp=email )


Change subject: update to MNCC V8 support
......................................................................

update to MNCC V8 support

This updates the mncc.h to V8 with GCR support, as introduced
in Change-ID I705c860e51637b4537cad65a330ecbaaca96dd5b of osmo-msc

Change-Id: Ia27956e42c6c2f494d59b89f42345462c86b10d2
---
M mncc.h
M mncc.py
2 files changed, 39 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/mncc-python refs/changes/20/36320/1

diff --git a/mncc.h b/mncc.h
index 394399f..ee8b1d7 100644
--- a/mncc.h
+++ b/mncc.h
@@ -1,7 +1,7 @@
 /* This file contains sections copied from
  * libosmocore/include/osmocom/gsm/protocol/gsm_04_08.h,
  * libosmocore/include/osmocom/gsm/mncc.h and
- * openbsc/include/openbsc/mncc.h
+ * osmo-msc/include/osmocom/msc/mncc.h
  */

 #include <stdint.h>
@@ -114,6 +114,15 @@
        GSM48_BCAP_SV_AMR_OH    = 11,   /*!< GSM HR V6 (OHR AMR) */
 };

+/*! Parsed representation of Global Call Reference, 3GPP TS 29.205 Table B 
2.1.9.1. */
+struct osmo_gcr_parsed {
+       uint8_t net[5];  /** Network ID, ITU-T Q.1902.3 */
+       uint8_t net_len; /** length (3-5 octets) of gsm29205_gcr#net */
+       uint16_t node;   /** Node ID */
+       uint8_t cr[5];   /** Call Reference ID */
+};
+
+

 #define GSM_MAX_FACILITY       128
 #define GSM_MAX_SSVERSION      128
@@ -308,6 +317,7 @@
        unsigned char   lchan_type;
        unsigned char   lchan_mode;

+       struct osmo_gcr_parsed gcr;
        char            sdp[1024];
 };

@@ -317,7 +327,7 @@
        unsigned char   data[0];
 };

-#define MNCC_SOCK_VERSION      7
+#define MNCC_SOCK_VERSION      8
 struct gsm_mncc_hello {
        uint32_t        msg_type;
        uint32_t        version;
diff --git a/mncc.py b/mncc.py
index e22fb74..9f95a71 100644
--- a/mncc.py
+++ b/mncc.py
@@ -188,7 +188,7 @@
 MNCC_F_CCCAP = 0x0800 # macro
 MNCC_F_KEYPAD = 0x1000 # macro
 MNCC_F_SIGNAL = 0x2000 # macro
-MNCC_SOCK_VERSION = 7 # macro
+MNCC_SOCK_VERSION = 8 # macro

 # values for enumeration 'gsm48_bcap_itcap'
 gsm48_bcap_itcap__enumvalues = {
@@ -365,6 +365,18 @@
 GSM48_BCAP_SV_AMR_FW = 8
 GSM48_BCAP_SV_AMR_OH = 11
 gsm48_bcap_speech_ver = ctypes.c_uint32 # enum
+class struct_osmo_gcr_parsed(Structure):
+    pass
+
+struct_osmo_gcr_parsed._pack_ = 1 # source:False
+struct_osmo_gcr_parsed._fields_ = [
+    ('net', ctypes.c_ubyte * 5),
+    ('net_len', ctypes.c_ubyte),
+    ('node', ctypes.c_uint16),
+    ('cr', ctypes.c_ubyte * 5),
+    ('PADDING_0', ctypes.c_ubyte),
+]
+
 class struct_gsm_mncc_bearer_cap(Structure):
     pass

@@ -524,8 +536,8 @@
     ('imsi', ctypes.c_char * 16),
     ('lchan_type', ctypes.c_ubyte),
     ('lchan_mode', ctypes.c_ubyte),
+    ('gcr', struct_osmo_gcr_parsed),
     ('sdp', ctypes.c_char * 1024),
-    ('PADDING_0', ctypes.c_ubyte * 2),
 ]

 class struct_gsm_data_frame(Structure):
@@ -651,4 +663,4 @@
     'struct_gsm_mncc_hello', 'struct_gsm_mncc_number',
     'struct_gsm_mncc_progress', 'struct_gsm_mncc_rtp',
     'struct_gsm_mncc_ssversion', 'struct_gsm_mncc_useruser',
-    'struct_sockaddr_storage']
+    'struct_osmo_gcr_parsed', 'struct_sockaddr_storage']

--
To view, visit https://gerrit.osmocom.org/c/mncc-python/+/36320?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Change-Id: Ia27956e42c6c2f494d59b89f42345462c86b10d2
Gerrit-Change-Number: 36320
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <lafo...@osmocom.org>
Gerrit-MessageType: newchange

Reply via email to