This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgMax has uploaded this change for review. ( https://gerrit.osmocom.org/12564
Change subject: MNCC: move messages into public header and convert to enum
......................................................................
MNCC: move messages into public header and convert to enum
Change-Id: Ie808b42871d3847b6b47964d9b0504b3c51c2fd0
---
M include/osmocom/gsm/mncc.h
M src/gsm/mncc.c
2 files changed, 78 insertions(+), 78 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/64/12564/1
diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h
index 7e7d12c..0513fb2 100644
--- a/include/osmocom/gsm/mncc.h
+++ b/include/osmocom/gsm/mncc.h
@@ -8,6 +8,83 @@
#define GSM_MAX_SSVERSION 128
#define GSM_MAX_USERUSER 128
+#define MNCC_SOCK_VERSION 5
+
+enum osmo_mncc_msg {
+ MNCC_SETUP_REQ = 0x0101,
+ MNCC_SETUP_IND = 0x0102,
+ MNCC_SETUP_RSP = 0x0103,
+ MNCC_SETUP_CNF = 0x0104,
+ MNCC_SETUP_COMPL_REQ = 0x0105,
+ MNCC_SETUP_COMPL_IND = 0x0106,
+ MNCC_CALL_CONF_IND = 0x0107,
+ MNCC_CALL_PROC_REQ = 0x0108,
+ MNCC_PROGRESS_REQ = 0x0109,
+ MNCC_ALERT_REQ = 0x010a,
+ MNCC_ALERT_IND = 0x010b,
+ MNCC_NOTIFY_REQ = 0x010c,
+ MNCC_NOTIFY_IND = 0x010d,
+ MNCC_DISC_REQ = 0x010e,
+ MNCC_DISC_IND = 0x010f,
+ MNCC_REL_REQ = 0x0110,
+ MNCC_REL_IND = 0x0111,
+ MNCC_REL_CNF = 0x0112,
+ MNCC_FACILITY_REQ = 0x0113,
+ MNCC_FACILITY_IND = 0x0114,
+ MNCC_START_DTMF_IND = 0x0115,
+ MNCC_START_DTMF_RSP = 0x0116,
+ MNCC_START_DTMF_REJ = 0x0117,
+ MNCC_STOP_DTMF_IND = 0x0118,
+ MNCC_STOP_DTMF_RSP = 0x0119,
+ MNCC_MODIFY_REQ = 0x011a,
+ MNCC_MODIFY_IND = 0x011b,
+ MNCC_MODIFY_RSP = 0x011c,
+ MNCC_MODIFY_CNF = 0x011d,
+ MNCC_MODIFY_REJ = 0x011e,
+ MNCC_HOLD_IND = 0x011f,
+ MNCC_HOLD_CNF = 0x0120,
+ MNCC_HOLD_REJ = 0x0121,
+ MNCC_RETRIEVE_IND = 0x0122,
+ MNCC_RETRIEVE_CNF = 0x0123,
+ MNCC_RETRIEVE_REJ = 0x0124,
+ MNCC_USERINFO_REQ = 0x0125,
+ MNCC_USERINFO_IND = 0x0126,
+
+ /* MNCC_REJ_* is perfomed via MNCC_REL_* */
+ MNCC_REJ_REQ = 0x0127,
+ MNCC_REJ_IND = 0x0128,
+
+ MNCC_BRIDGE = 0x0200,
+ MNCC_FRAME_RECV = 0x0201,
+ MNCC_FRAME_DROP = 0x0202,
+ MNCC_LCHAN_MODIFY = 0x0203,
+ MNCC_RTP_CREATE = 0x0204,
+ MNCC_RTP_CONNECT = 0x0205,
+ MNCC_RTP_FREE = 0x0206,
+
+ MNCC_SOCKET_HELLO = 0x0400,
+ MNCC_F_BEARER_CAP = 0x0001,
+ MNCC_F_CALLED = 0x0002,
+ MNCC_F_CALLING = 0x0004,
+ MNCC_F_REDIRECTING = 0x0008,
+ MNCC_F_CONNECTED = 0x0010,
+ MNCC_F_CAUSE = 0x0020,
+ MNCC_F_USERUSER = 0x0040,
+ MNCC_F_PROGRESS = 0x0080,
+ MNCC_F_EMERGENCY = 0x0100,
+ MNCC_F_FACILITY = 0x0200,
+ MNCC_F_SSVERSION = 0x0400,
+ MNCC_F_CCCAP = 0x0800,
+ MNCC_F_KEYPAD = 0x1000,
+ MNCC_F_SIGNAL = 0x2000,
+
+ GSM_TCHF_FRAME = 0x0300,
+ GSM_TCHF_FRAME_EFR = 0x0301,
+ GSM_TCHH_FRAME = 0x0302,
+ GSM_TCH_FRAME_AMR = 0x0303,
+ GSM_BAD_FRAME = 0x03ff,
+};
+
/* Expanded fields from GSM TS 04.08, Table 10.5.102 */
struct gsm_mncc_bearer_cap {
int transfer; /* Information Transfer Capability */
@@ -93,6 +170,6 @@
_osmo_mncc_log(ss, level, __FILE__, __LINE__, prefix, msg, len);
extern const struct value_string osmo_mncc_names[];
-static inline const char *osmo_mncc_name(uint32_t msg_type) {
+static inline const char *osmo_mncc_name(enum osmo_mncc_msg msg_type) {
return get_value_string(osmo_mncc_names, msg_type);
}
diff --git a/src/gsm/mncc.c b/src/gsm/mncc.c
index 938cf9a..b8724d8 100644
--- a/src/gsm/mncc.c
+++ b/src/gsm/mncc.c
@@ -35,82 +35,6 @@
#include <osmocom/gsm/mncc.h>
/* FIXME FIXME FIXME FIXME FIXME START */
-#define MNCC_SETUP_REQ 0x0101
-#define MNCC_SETUP_IND 0x0102
-#define MNCC_SETUP_RSP 0x0103
-#define MNCC_SETUP_CNF 0x0104
-#define MNCC_SETUP_COMPL_REQ 0x0105
-#define MNCC_SETUP_COMPL_IND 0x0106
-/* MNCC_REJ_* is perfomed via MNCC_REL_* */
-#define MNCC_CALL_CONF_IND 0x0107
-#define MNCC_CALL_PROC_REQ 0x0108
-#define MNCC_PROGRESS_REQ 0x0109
-#define MNCC_ALERT_REQ 0x010a
-#define MNCC_ALERT_IND 0x010b
-#define MNCC_NOTIFY_REQ 0x010c
-#define MNCC_NOTIFY_IND 0x010d
-#define MNCC_DISC_REQ 0x010e
-#define MNCC_DISC_IND 0x010f
-#define MNCC_REL_REQ 0x0110
-#define MNCC_REL_IND 0x0111
-#define MNCC_REL_CNF 0x0112
-#define MNCC_FACILITY_REQ 0x0113
-#define MNCC_FACILITY_IND 0x0114
-#define MNCC_START_DTMF_IND 0x0115
-#define MNCC_START_DTMF_RSP 0x0116
-#define MNCC_START_DTMF_REJ 0x0117
-#define MNCC_STOP_DTMF_IND 0x0118
-#define MNCC_STOP_DTMF_RSP 0x0119
-#define MNCC_MODIFY_REQ 0x011a
-#define MNCC_MODIFY_IND 0x011b
-#define MNCC_MODIFY_RSP 0x011c
-#define MNCC_MODIFY_CNF 0x011d
-#define MNCC_MODIFY_REJ 0x011e
-#define MNCC_HOLD_IND 0x011f
-#define MNCC_HOLD_CNF 0x0120
-#define MNCC_HOLD_REJ 0x0121
-#define MNCC_RETRIEVE_IND 0x0122
-#define MNCC_RETRIEVE_CNF 0x0123
-#define MNCC_RETRIEVE_REJ 0x0124
-#define MNCC_USERINFO_REQ 0x0125
-#define MNCC_USERINFO_IND 0x0126
-#define MNCC_REJ_REQ 0x0127
-#define MNCC_REJ_IND 0x0128
-
-#define MNCC_BRIDGE 0x0200
-#define MNCC_FRAME_RECV 0x0201
-#define MNCC_FRAME_DROP 0x0202
-#define MNCC_LCHAN_MODIFY 0x0203
-#define MNCC_RTP_CREATE 0x0204
-#define MNCC_RTP_CONNECT 0x0205
-#define MNCC_RTP_FREE 0x0206
-
-#define GSM_TCHF_FRAME 0x0300
-#define GSM_TCHF_FRAME_EFR 0x0301
-#define GSM_TCHH_FRAME 0x0302
-#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
-
-#define MNCC_F_BEARER_CAP 0x0001
-#define MNCC_F_CALLED 0x0002
-#define MNCC_F_CALLING 0x0004
-#define MNCC_F_REDIRECTING 0x0008
-#define MNCC_F_CONNECTED 0x0010
-#define MNCC_F_CAUSE 0x0020
-#define MNCC_F_USERUSER 0x0040
-#define MNCC_F_PROGRESS 0x0080
-#define MNCC_F_EMERGENCY 0x0100
-#define MNCC_F_FACILITY 0x0200
-#define MNCC_F_SSVERSION 0x0400
-#define MNCC_F_CCCAP 0x0800
-#define MNCC_F_KEYPAD 0x1000
-#define MNCC_F_SIGNAL 0x2000
struct gsm_mncc {
/* context based information */
@@ -155,7 +79,6 @@
unsigned char data[0];
};
-#define MNCC_SOCK_VERSION 5
struct gsm_mncc_hello {
uint32_t msg_type;
uint32_t version;
--
To view, visit https://gerrit.osmocom.org/12564
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie808b42871d3847b6b47964d9b0504b3c51c2fd0
Gerrit-Change-Number: 12564
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190115/6aea4f52/attachment.htm>