blob: e68c36261fc97a83ad94b8acd2497b3ced7b128a [file] [log] [blame]
Holger Hans Peter Freyther9b5f1d72011-01-11 16:33:52 +01001From 54882db58b6ec12da6b80071e0ac2344d42df24c Mon Sep 17 00:00:00 2001
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +02002
Holger Hans Peter Freyther2fb7ccf2010-04-21 20:37:53 +08003From: Holger Hans Peter Freyther <zecke@selfish.org>
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +02004
Holger Hans Peter Freyther9b5f1d72011-01-11 16:33:52 +01005Subject: [PATCH 4/4] rsl-ipaccess
Holger Hans Peter Freyther2fb7ccf2010-04-21 20:37:53 +08006
Holger Hans Peter Freyther9b5f1d72011-01-11 16:33:52 +01007Add vendor specific commands for RSL.
Holger Hans Peter Freyther2fb7ccf2010-04-21 20:37:53 +08008---
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +02009 epan/dissectors/packet-rsl.c | 544 +++++++++++++++++++++++++++++++++++++++++-
10 1 files changed, 536 insertions(+), 8 deletions(-)
Holger Hans Peter Freyther2fb7ccf2010-04-21 20:37:53 +080011
12diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +020013index bf83f6f..213ae28 100644
Holger Hans Peter Freyther2fb7ccf2010-04-21 20:37:53 +080014--- a/epan/dissectors/packet-rsl.c
15+++ b/epan/dissectors/packet-rsl.c
Harald Welte2d112ad2009-06-10 05:42:52 +080016@@ -2,6 +2,7 @@
17 * Routines for Radio Signalling Link (RSL) dissection.
18 *
19 * Copyright 2007, Anders Broman <anders.broman@ericsson.com>
20+ * Copyright 2009, Harald Welte <laforge@gnumonks.org>
21 *
Holger Hans Peter Freyther2fb7ccf2010-04-21 20:37:53 +080022 * $Id$
Harald Welte2d112ad2009-06-10 05:42:52 +080023 *
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +020024@@ -40,8 +41,11 @@
25 #include <epan/packet.h>
26 #include <epan/proto.h>
Harald Welte9e20bc52009-06-26 15:04:00 +020027 #include <epan/lapd_sapi.h>
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +020028+#include <epan/prefs.h>
Harald Welte9e20bc52009-06-26 15:04:00 +020029
30 #include "packet-gsm_a_common.h"
31+#include "packet-rtp.h"
32+#include "packet-rtcp.h"
33
34 /* Initialize the protocol and registered fields */
35 static int proto_rsl = -1;
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +020036@@ -116,6 +120,24 @@ static int hf_rsl_emlpp_prio = -1;
Harald Welte2d112ad2009-06-10 05:42:52 +080037 static int hf_rsl_rtd = -1;
38 static int hf_rsl_delay_ind = -1;
39 static int hf_rsl_tfo = -1;
Harald Welteb5280c72009-10-22 10:09:56 +020040+static int hf_rsl_speech_mode_s = -1;
41+static int hf_rsl_speech_mode_m = -1;
Harald Weltec9b484f2009-07-12 20:46:43 +020042+static int hf_rsl_conn_stat = -1;
43+static int hf_rsl_conn_id = -1;
44+static int hf_rsl_rtp_payload = -1;
Harald Welteb5280c72009-10-22 10:09:56 +020045+static int hf_rsl_rtp_csd_fmt_d = -1;
46+static int hf_rsl_rtp_csd_fmt_ir = -1;
Harald Welte2d112ad2009-06-10 05:42:52 +080047+static int hf_rsl_local_port = -1;
48+static int hf_rsl_remote_port = -1;
49+static int hf_rsl_local_ip = -1;
50+static int hf_rsl_remote_ip = -1;
Harald Welteb5280c72009-10-22 10:09:56 +020051+static int hf_rsl_cstat_tx_pkts = -1;
52+static int hf_rsl_cstat_tx_octs = -1;
53+static int hf_rsl_cstat_rx_pkts = -1;
54+static int hf_rsl_cstat_rx_octs = -1;
55+static int hf_rsl_cstat_lost_pkts = -1;
56+static int hf_rsl_cstat_ia_jitter = -1;
57+static int hf_rsl_cstat_avg_tx_dly = -1;
Harald Welte2d112ad2009-06-10 05:42:52 +080058
59 /* Initialize the subtree pointers */
60 static int ett_rsl = -1;
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +020061@@ -173,6 +195,15 @@ static int ett_ie_cause = -1;
Harald Welte2d112ad2009-06-10 05:42:52 +080062 static int ett_ie_meas_res_no = -1;
63 static int ett_ie_message_id = -1;
64 static int ett_ie_sys_info_type = -1;
Harald Weltec9b484f2009-07-12 20:46:43 +020065+static int ett_ie_speech_mode = -1;
66+static int ett_ie_conn_stat = -1;
67+static int ett_ie_conn_id = -1;
Harald Welte2d112ad2009-06-10 05:42:52 +080068+static int ett_ie_remote_ip = -1;
69+static int ett_ie_remote_port = -1;
70+static int ett_ie_local_port = -1;
71+static int ett_ie_local_ip = -1;
Harald Weltec9b484f2009-07-12 20:46:43 +020072+static int ett_ie_rtp_payload = -1;
Harald Welte2d112ad2009-06-10 05:42:52 +080073+
74
Holger Hans Peter Freyther9b5f1d72011-01-11 16:33:52 +010075 static proto_tree *top_tree;
76 static dissector_handle_t gsm_a_ccch_handle;
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +020077@@ -180,6 +211,9 @@ static dissector_handle_t gsm_a_dtap_handle;
78
79 static gboolean is_si2q = FALSE;
80
81+/* Decode things as nanoBTS traces */
82+static gboolean global_rsl_use_nano_bts = TRUE;
83+
84 /* Forward declarations */
85 static int dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset);
86
87@@ -208,8 +242,11 @@ static const value_string rsl_msg_disc_vals[] = {
Harald Welte2d112ad2009-06-10 05:42:52 +080088 { 0x06, "Common Channel Management messages" },
89 { 0x08, "TRX Management messages" },
90 { 0x16, "Location Services messages" },
91+ { 0x3f, "ip.access Vendor Specific messages" },
92 { 0, NULL }
93 };
94+#define RSL_MSGDISC_IPACCESS 0x3f
95+
96 /*
97 * 9.2 MESSAGE TYPE
98 */
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +020099@@ -276,6 +313,49 @@ static const value_string rsl_msg_disc_vals[] = {
Harald Welte2d112ad2009-06-10 05:42:52 +0800100 /* 0 1 - - - - - - Location Services messages: */
Harald Welte9e20bc52009-06-26 15:04:00 +0200101 #define RSL_MSG_LOC_INF 65 /* 8.7.1 */
Harald Welte2d112ad2009-06-10 05:42:52 +0800102
103+/* Vendor-Specific messages of ip.access nanoBTS. There is no public documentation
104+ * about those extensions, all information in this dissector is based on lawful
105+ * protocol reverse enginering by Harald Welte <laforge@gnumonks.org> */
Harald Weltea1f0ac72009-07-12 21:59:04 +0200106+#define RSL_MSG_TYPE_IPAC_MEAS_PP_DEF 0x60
107+#define RSL_MSG_TYPE_IPAC_HO_CAND_INQ 0x61
108+#define RSL_MSG_TYPE_IPAC_HO_CAND_RESP 0x62
109+
110+#define RSL_MSG_TYPE_IPAC_PDCH_ACT 0x48
111+#define RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK 0x49
112+#define RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK 0x4a
113+#define RSL_MSG_TYPE_IPAC_PDCH_DEACT 0x4b
114+#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK 0x4c
115+#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK 0x4d
116+
Holger Hans Peter Freyther2fb7ccf2010-04-21 20:37:53 +0800117+#define RSL_MSG_TYPE_IPAC_CRCX 0x70
118+#define RSL_MSG_TYPE_IPAC_CRCX_ACK 0x71
119+#define RSL_MSG_TYPE_IPAC_CRCX_NACK 0x72
120+#define RSL_MSG_TYPE_IPAC_MDCX 0x73
121+#define RSL_MSG_TYPE_IPAC_MDCX_ACK 0x74
122+#define RSL_MSG_TYPE_IPAC_MDCX_NACK 0x75
123+#define RSL_MSG_TYPE_IPAC_DLCX_IND 0x76
124+#define RSL_MSG_TYPE_IPAC_DLCX 0x77
125+#define RSL_MSG_TYPE_IPAC_DLCX_ACK 0x78
126+#define RSL_MSG_TYPE_IPAC_DLCX_NACK 0x79
Harald Welte8dc1a682009-07-01 11:22:01 +0200127+
Harald Weltec9b484f2009-07-12 20:46:43 +0200128+#define RSL_IE_IPAC_SRTP_CONFIG 0xe0
129+#define RSL_IE_IPAC_PROXY_UDP 0xe1
130+#define RSL_IE_IPAC_BSCMPL_TOUT 0xe2
Harald Welte2d112ad2009-06-10 05:42:52 +0800131+#define RSL_IE_IPAC_REMOTE_IP 0xf0
132+#define RSL_IE_IPAC_REMOTE_PORT 0xf1
Harald Weltec9b484f2009-07-12 20:46:43 +0200133+#define RSL_IE_IPAC_RTP_PAYLOAD 0xf2
Harald Welte2d112ad2009-06-10 05:42:52 +0800134+#define RSL_IE_IPAC_LOCAL_PORT 0xf3
Harald Weltec9b484f2009-07-12 20:46:43 +0200135+#define RSL_IE_IPAC_SPEECH_MODE 0xf4
Harald Welte2d112ad2009-06-10 05:42:52 +0800136+#define RSL_IE_IPAC_LOCAL_IP 0xf5
Harald Weltec9b484f2009-07-12 20:46:43 +0200137+#define RSL_IE_IPAC_CONN_STAT 0xf6
138+#define RSL_IE_IPAC_HO_C_PARMS 0xf7
139+#define RSL_IE_IPAC_CONN_ID 0xf8
140+#define RSL_IE_IPAC_RTP_CSD_FMT 0xf9
141+#define RSL_IE_IPAC_RTP_JIT_BUF 0xfa
142+#define RSL_IE_IPAC_RTP_COMPR 0xfb
143+#define RSL_IE_IPAC_RTP_PAYLOAD2 0xfc
144+#define RSL_IE_IPAC_RTP_MPLEX 0xfd
145+#define RSL_IE_IPAC_RTP_MPLEX_ID 0xfe
Harald Welte9e20bc52009-06-26 15:04:00 +0200146
147 static const value_string rsl_msg_type_vals[] = {
148 /* 0 0 0 0 - - - - Radio Link Layer Management messages: */
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200149@@ -338,6 +418,26 @@ static const value_string rsl_msg_type_vals[] = {
Harald Welte9e20bc52009-06-26 15:04:00 +0200150 { 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */
151 /* 0 1 - - - - - - Location Services messages: */
152 { 0x41, "Location Information" }, /* 8.7.1 */
153+ /* ip.access */
Harald Weltea1f0ac72009-07-12 21:59:04 +0200154+ { 0x48, "ip.access PDCH ACTIVATION" },
155+ { 0x49, "ip.access PDCH ACTIVATION ACK" },
156+ { 0x4a, "ip.access PDCH ACTIVATION NACK" },
157+ { 0x4b, "ip.access PDCH DEACTIVATION" },
158+ { 0x4c, "ip.access PDCH DEACTIVATION ACK" },
159+ { 0x4d, "ip.access PDCH DEACTIVATION NACK" },
160+ { 0x60, "ip.access MEASurement PREPROCessing DeFauLT" },
161+ { 0x61, "ip.access HANDOover CANDidate ENQuiry" },
162+ { 0x62, "ip.access HANDOover CANDidate RESPonse" },
Holger Hans Peter Freytherb9bda7b2009-11-18 21:31:15 +0100163+ { 0x70, "ip.access CRCX" },
164+ { 0x71, "ip.access CRCX ACK" },
165+ { 0x72, "ip.access CRCX NACK" },
166+ { 0x73, "ip.access MDCX" },
167+ { 0x74, "ip.access MDCX ACK" },
168+ { 0x75, "ip.access MDCX NACK" },
169+ { 0x76, "ip.access DLCX INDication" },
170+ { 0x77, "ip.access DLCX" },
171+ { 0x78, "ip.access DLCX ACK" },
172+ { 0x79, "ip.access DLCX NACK" },
Harald Welte9e20bc52009-06-26 15:04:00 +0200173 { 0, NULL }
174 };
175
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200176@@ -371,10 +471,10 @@ static const value_string rsl_msg_type_vals[] = {
Harald Weltea1f0ac72009-07-12 21:59:04 +0200177 #define RSL_IE_MESSAGE_ID 28
178
179 #define RSL_IE_SYS_INFO_TYPE 30
180-
181-
182-
183-
184+#define RSL_IE_MS_POWER_PARAM 31
185+#define RSL_IE_BS_POWER_PARAM 32
186+#define RSL_IE_PREPROC_PARAM 33
187+#define RSL_IE_PREPROC_MEAS 34
188 #define RSL_IE_FULL_IMM_ASS_INF 35
189 #define RSL_IE_SMSCB_INF 36
190 #define RSL_IE_FULL_MS_TIMING_OFFSET 37
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200191@@ -477,6 +577,24 @@ static const value_string rsl_ie_type_vals[] = {
Harald Welte9e20bc52009-06-26 15:04:00 +0200192 Not used
193
194 */
Harald Weltec9b484f2009-07-12 20:46:43 +0200195+ { 0xe0, "SRTP Configuration" },
196+ { 0xe1, "BSC Proxy UDP Port" },
197+ { 0xe2, "BSC Multiplex Timeout" },
Harald Welte9e20bc52009-06-26 15:04:00 +0200198+ { 0xf0, "Remote IP Address" },
199+ { 0xf1, "Remote RTP Port" },
Harald Weltec9b484f2009-07-12 20:46:43 +0200200+ { 0xf2, "RTP Payload Type" },
Harald Welte9e20bc52009-06-26 15:04:00 +0200201+ { 0xf3, "Local RTP Port" },
Harald Weltec9b484f2009-07-12 20:46:43 +0200202+ { 0xf4, "Speech Mode" },
Harald Welte9e20bc52009-06-26 15:04:00 +0200203+ { 0xf5, "Local IP Address" },
Harald Weltec9b484f2009-07-12 20:46:43 +0200204+ { 0xf6, "Connection Statistics" },
205+ { 0xf7, "Handover C Parameters" },
206+ { 0xf8, "Connection Identifier" },
207+ { 0xf9, "RTP CSD Format" },
208+ { 0xfa, "RTP Jitter Buffer" },
209+ { 0xfb, "RTP Compression" },
210+ { 0xfc, "RTP Payload Type 2" },
211+ { 0xfd, "RTP Multiplex" },
212+ { 0xfe, "RTP Multiplex Identifier" },
Harald Welte9e20bc52009-06-26 15:04:00 +0200213 { 0, NULL }
214 };
215
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200216@@ -513,6 +631,27 @@ static const value_string rsl_ch_no_Cbits_vals[] = {
Harald Welte9e20bc52009-06-26 15:04:00 +0200217 { 0, NULL }
218 };
219
220+/* From openbsc/include/openbsc/tlv.h */
221+enum tlv_type {
222+ TLV_TYPE_FIXED,
223+ TLV_TYPE_T,
224+ TLV_TYPE_TV,
225+ TLV_TYPE_TLV,
226+ TLV_TYPE_TL16V,
227+};
228+
229+struct tlv_def {
230+ enum tlv_type type;
231+ u_int8_t fixed_len;
232+};
233+
234+struct tlv_definition {
235+ struct tlv_def def[0xff];
236+};
237+
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200238+/* This structure is initialized in proto_register_rsl() */
239+static struct tlv_definition rsl_att_tlvdef;
Harald Welte9e20bc52009-06-26 15:04:00 +0200240+
241 /* 9.3.1 Channel number 9.3.1 M TV 2 */
242 static int
243 dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200244@@ -2045,7 +2184,6 @@ dissect_rsl_ie_err_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
Harald Welte9e20bc52009-06-26 15:04:00 +0200245 proto_item_set_len(ti, length+2);
246
247 proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, FALSE);
248- offset++;
249
250 /* Received Message */
251 offset = dissct_rsl_msg(tvb, pinfo, ie_tree, offset);
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200252@@ -2910,12 +3048,184 @@ dissect_rsl_ie_tfo_transp_cont(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
Harald Welte9e20bc52009-06-26 15:04:00 +0200253 }
254
Harald Welteb5280c72009-10-22 10:09:56 +0200255 static int
Harald Weltea1f0ac72009-07-12 21:59:04 +0200256+dissct_rsl_ipaccess_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
Harald Welte2d112ad2009-06-10 05:42:52 +0800257+{
258+ guint8 msg_type;
Harald Welte9e20bc52009-06-26 15:04:00 +0200259+ guint32 local_addr = 0;
260+ guint16 local_port = 0;
261+ address src_addr;
Harald Welte2d112ad2009-06-10 05:42:52 +0800262+
263+ msg_type = tvb_get_guint8(tvb, offset)&0x7f;
264+ offset++;
265+
Harald Welteb5280c72009-10-22 10:09:56 +0200266+#if 0
Harald Welte2d112ad2009-06-10 05:42:52 +0800267+ switch (msg_type) {
Holger Hans Peter Freyther2fb7ccf2010-04-21 20:37:53 +0800268+ case RSL_MSG_TYPE_IPAC_CRCX:
269+ case RSL_MSG_TYPE_IPAC_CRCX_ACK:
270+ case RSL_MSG_TYPE_IPAC_CRCX_NACK:
271+ case RSL_MSG_TYPE_IPAC_MDCX:
272+ case RSL_MSG_TYPE_IPAC_MDCX_ACK:
273+ case RSL_MSG_TYPE_IPAC_MDCX_NACK:
274+ case RSL_MSG_TYPE_IPAC_DLCX_IND:
275+ case RSL_MSG_TYPE_IPAC_DLCX:
276+ case RSL_MSG_TYPE_IPAC_DLCX_ACK:
277+ case RSL_MSG_TYPE_IPAC_DLCX_NACK:
Harald Weltea1f0ac72009-07-12 21:59:04 +0200278+ case RSL_MSG_TYPE_IPAC_PDCH_ACT:
279+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK:
280+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK:
281+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT:
282+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK:
283+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK:
Harald Welte2d112ad2009-06-10 05:42:52 +0800284+ /* Channel number 9.3.1 M TV 2 */
285+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
286+ break;
Harald Welte4e8c98a2009-08-20 00:59:11 +0900287+ }
Harald Welteb5280c72009-10-22 10:09:56 +0200288+#endif
289+ /* parse TLV attributes */
Harald Welte9e20bc52009-06-26 15:04:00 +0200290+ while (tvb_reported_length_remaining(tvb, offset) != 0) {
291+ guint8 tag;
292+ unsigned int len, hlen, len_len;
293+ const struct tlv_def *tdef;
294+ proto_item *ti;
295+ proto_tree *ie_tree;
296+
297+ tag = tvb_get_guint8(tvb, offset);
298+ tdef = &rsl_att_tlvdef.def[tag];
299+
300+ switch (tdef->type) {
301+ case TLV_TYPE_FIXED:
302+ hlen = 1;
303+ len_len = 0;
304+ len = tdef->fixed_len;
305+ break;
306+ case TLV_TYPE_T:
307+ hlen = 1;
308+ len_len = 0;
309+ len = 0;
310+ break;
311+ case TLV_TYPE_TV:
312+ hlen = 1;
313+ len_len = 0;
314+ len = 1;
315+ break;
316+ case TLV_TYPE_TLV:
317+ hlen = 2;
318+ len_len = 1;
319+ len = tvb_get_guint8(tvb, offset+1);
320+ break;
321+ case TLV_TYPE_TL16V:
322+ hlen = 3;
323+ len_len = 2;
324+ len = tvb_get_guint8(tvb, offset+1) << 8 |
325+ tvb_get_guint8(tvb, offset+2);
326+ break;
Harald Weltea1f0ac72009-07-12 21:59:04 +0200327+ default:
328+ hlen = len_len = len = 0;
329+ DISSECTOR_ASSERT_NOT_REACHED();
330+ break;
Harald Welte9e20bc52009-06-26 15:04:00 +0200331+ }
332+
333+ ti = proto_tree_add_item(tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
334+ ie_tree = proto_item_add_subtree(ti, ett_ie_local_port);
335+ offset += hlen;
336+
337+ switch (tag) {
338+ case RSL_IE_CH_NO:
Harald Welteb5280c72009-10-22 10:09:56 +0200339+ dissect_rsl_ie_ch_no(tvb, pinfo, ie_tree, offset, FALSE);
Harald Weltea1f0ac72009-07-12 21:59:04 +0200340+ break;
341+ case RSL_IE_FRAME_NO:
Harald Welteb5280c72009-10-22 10:09:56 +0200342+ dissect_rsl_ie_frame_no(tvb, pinfo, ie_tree, offset, FALSE);
Harald Weltea1f0ac72009-07-12 21:59:04 +0200343+ break;
344+ case RSL_IE_MS_POW:
Harald Welteb5280c72009-10-22 10:09:56 +0200345+ dissect_rsl_ie_ms_pow(tvb, pinfo, ie_tree, offset, FALSE);
Harald Welte9e20bc52009-06-26 15:04:00 +0200346+ break;
347+ case RSL_IE_IPAC_REMOTE_IP:
Harald Welte8dc1a682009-07-01 11:22:01 +0200348+ proto_tree_add_item(ie_tree, hf_rsl_remote_ip, tvb,
Harald Welte559d97d2009-07-12 23:10:28 +0200349+ offset, len, FALSE);
Harald Welte9e20bc52009-06-26 15:04:00 +0200350+ break;
351+ case RSL_IE_IPAC_REMOTE_PORT:
Harald Welte8dc1a682009-07-01 11:22:01 +0200352+ proto_tree_add_item(ie_tree, hf_rsl_remote_port, tvb,
Harald Welte559d97d2009-07-12 23:10:28 +0200353+ offset, len, FALSE);
Harald Welte9e20bc52009-06-26 15:04:00 +0200354+ break;
355+ case RSL_IE_IPAC_LOCAL_IP:
Harald Welte8dc1a682009-07-01 11:22:01 +0200356+ proto_tree_add_item(ie_tree, hf_rsl_local_ip, tvb,
Harald Welte559d97d2009-07-12 23:10:28 +0200357+ offset, len, FALSE);
Harald Welte9e20bc52009-06-26 15:04:00 +0200358+ local_addr = tvb_get_ipv4(tvb, offset);
359+ break;
360+ case RSL_IE_IPAC_LOCAL_PORT:
Harald Welte8dc1a682009-07-01 11:22:01 +0200361+ proto_tree_add_item(ie_tree, hf_rsl_local_port, tvb,
Harald Welte559d97d2009-07-12 23:10:28 +0200362+ offset, len, FALSE);
Harald Welte9e20bc52009-06-26 15:04:00 +0200363+ local_port = tvb_get_ntohs(tvb, offset);
364+ break;
Harald Weltec9b484f2009-07-12 20:46:43 +0200365+ case RSL_IE_IPAC_SPEECH_MODE:
Harald Welteb5280c72009-10-22 10:09:56 +0200366+ proto_tree_add_item(ie_tree, hf_rsl_speech_mode_s, tvb,
367+ offset, len, FALSE);
368+ proto_tree_add_item(ie_tree, hf_rsl_speech_mode_m, tvb,
Harald Welte559d97d2009-07-12 23:10:28 +0200369+ offset, len, FALSE);
Harald Weltec9b484f2009-07-12 20:46:43 +0200370+ break;
371+ case RSL_IE_IPAC_RTP_PAYLOAD:
372+ case RSL_IE_IPAC_RTP_PAYLOAD2:
373+ proto_tree_add_item(ie_tree, hf_rsl_rtp_payload, tvb,
Harald Welte559d97d2009-07-12 23:10:28 +0200374+ offset, len, FALSE);
375+ break;
Harald Welteb5280c72009-10-22 10:09:56 +0200376+ case RSL_IE_IPAC_RTP_CSD_FMT:
377+ proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_d, tvb,
378+ offset, len, FALSE);
379+ proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_ir, tvb,
380+ offset, len, FALSE);
381+ break;
Harald Weltec9b484f2009-07-12 20:46:43 +0200382+ case RSL_IE_IPAC_CONN_ID:
383+ proto_tree_add_item(ie_tree, hf_rsl_conn_id, tvb,
Harald Welte559d97d2009-07-12 23:10:28 +0200384+ offset, len, FALSE);
Holger Hans Peter Freytherb9bda7b2009-11-18 21:31:15 +0100385+ break;
Harald Welteb5280c72009-10-22 10:09:56 +0200386+ case RSL_IE_IPAC_CONN_STAT:
387+ proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_pkts, tvb,
388+ offset, 4, FALSE);
389+ proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_octs, tvb,
390+ offset+4, 4, FALSE);
391+ proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_pkts, tvb,
392+ offset+8, 4, FALSE);
393+ proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_octs, tvb,
394+ offset+12, 4, FALSE);
395+ proto_tree_add_item(ie_tree, hf_rsl_cstat_lost_pkts, tvb,
396+ offset+16, 4, FALSE);
397+ proto_tree_add_item(ie_tree, hf_rsl_cstat_ia_jitter, tvb,
398+ offset+20, 4, FALSE);
399+ proto_tree_add_item(ie_tree, hf_rsl_cstat_avg_tx_dly, tvb,
400+ offset+24, 4, FALSE);
Harald Weltec9b484f2009-07-12 20:46:43 +0200401+ break;
Harald Welte9e20bc52009-06-26 15:04:00 +0200402+ }
403+ offset += len;
Harald Welte2d112ad2009-06-10 05:42:52 +0800404+ }
405+
Harald Welte9e20bc52009-06-26 15:04:00 +0200406+ switch (msg_type) {
Holger Hans Peter Freyther2fb7ccf2010-04-21 20:37:53 +0800407+ case RSL_MSG_TYPE_IPAC_CRCX_ACK:
Harald Welte8dc1a682009-07-01 11:22:01 +0200408+ /* Notify the RTP and RTCP dissectors about a new RTP stream */
Harald Welte9e20bc52009-06-26 15:04:00 +0200409+ src_addr.type = AT_IPv4;
410+ src_addr.len = 4;
411+ src_addr.data = (guint8 *)&local_addr;
Harald Welte8dc1a682009-07-01 11:22:01 +0200412+ rtp_add_address(pinfo, &src_addr, local_port, 0,
Harald Welte63aba292009-07-04 04:11:21 +0200413+ "GSM A-bis/IP", pinfo->fd->num, 0, NULL);
Harald Welte8dc1a682009-07-01 11:22:01 +0200414+ rtcp_add_address(pinfo, &src_addr, local_port+1, 0,
415+ "GSM A-bis/IP", pinfo->fd->num);
Harald Welte9e20bc52009-06-26 15:04:00 +0200416+ break;
417+ }
Harald Welte2d112ad2009-06-10 05:42:52 +0800418+ return offset;
419+}
420+
Harald Welteb5280c72009-10-22 10:09:56 +0200421+static int
Harald Welte2d112ad2009-06-10 05:42:52 +0800422 dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
423 {
424- guint8 msg_type;
425+ guint8 msg_disc, msg_type;
426
427+ msg_disc = tvb_get_guint8(tvb, offset++) >> 1;
428 msg_type = tvb_get_guint8(tvb,offset)&0x7f;
429 proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, FALSE);
430+
431+ if (msg_disc == RSL_MSGDISC_IPACCESS) {
432+ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset);
433+ return offset;
434+ }
435 offset++;
436
437 switch (msg_type){
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200438@@ -3483,6 +3793,18 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
Harald Weltea1f0ac72009-07-12 21:59:04 +0200439 /* LLP APDU 9.3.58 M LV 2-N */
440 offset = dissect_rsl_ie_llp_apdu(tvb, pinfo, tree, offset, TRUE);
441 break;
442+ /* the following messages are ip.access specific but sent without
443+ * ip.access memssage discriminator */
444+ case RSL_MSG_TYPE_IPAC_MEAS_PP_DEF:
445+ case RSL_MSG_TYPE_IPAC_HO_CAND_INQ:
446+ case RSL_MSG_TYPE_IPAC_HO_CAND_RESP:
447+ case RSL_MSG_TYPE_IPAC_PDCH_ACT:
448+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK:
449+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK:
450+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT:
451+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK:
452+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK:
453+ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset-1);
454 default:
455 break;
456 }
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200457@@ -3490,6 +3812,40 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
Harald Welteb5280c72009-10-22 10:09:56 +0200458 return offset;
459
460 }
461+
462+static const value_string rsl_ipacc_spm_s_vals[] = {
463+ { 0, "GSM FR codec (GSM type 1, FS)" },
464+ { 1, "GSM EFR codec (GSM type 2, FS)" },
465+ { 2, "GSM AMR/FR codec (GSM type 3, FS)" },
466+ { 3, "GSM HR codec (GSM type 1, HS)" },
467+ { 5, "GSM AMR/HR codec (GSM type 3, HS)" },
468+ { 0xf, "As specified by RTP Payload Type IE" },
469+ { 0, NULL }
470+};
471+
472+static const value_string rsl_ipacc_spm_m_vals[] = {
473+ { 0, "Send and Receive" },
474+ { 1, "Receive Only" },
475+ { 2, "Send Only" },
476+ { 0, NULL }
477+};
478+
479+static const value_string rsl_ipacc_rtp_csd_fmt_d_vals[] = {
480+ { 0, "External TRAU format" },
481+ { 1, "Non-TRAU Packed format" },
482+ { 2, "TRAU within the BTS" },
483+ { 3, "IWF-Free BTS-BTS Data" },
484+ { 0, NULL }
485+};
486+
487+static const value_string rsl_ipacc_rtp_csd_fmt_ir_vals[] = {
488+ { 0, "8kb/s" },
489+ { 1, "16kb/s" },
490+ { 2, "32kb/s" },
491+ { 3, "64kb/s" },
492+ { 0, NULL }
493+};
494+
495 static void
496 dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
497 {
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200498@@ -3512,12 +3868,19 @@ dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
499 top_tree = tree;
500 if (tree) {
501 ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, FALSE);
502+
503+ /* if nanoBTS specific vendor messages are not enabled, skip */
504+ if (!global_rsl_use_nano_bts) {
505+ guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1;
506+
507+ if (msg_disc == RSL_MSGDISC_IPACCESS)
508+ return;
509+ }
510 rsl_tree = proto_item_add_subtree(ti, ett_rsl);
511
Harald Welte2d112ad2009-06-10 05:42:52 +0800512 /* 9.1 Message discriminator */
513 proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, FALSE);
514 proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, FALSE);
515- offset++;
516
517 offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset);
518
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200519@@ -3892,6 +4255,86 @@ void proto_register_rsl(void)
Harald Welte2d112ad2009-06-10 05:42:52 +0800520 FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03,
Harald Welte63aba292009-07-04 04:11:21 +0200521 NULL, HFILL }
Harald Welte2d112ad2009-06-10 05:42:52 +0800522 },
Harald Welteb5280c72009-10-22 10:09:56 +0200523+ { &hf_rsl_speech_mode_s,
524+ { "ip.access Speech Mode S", "rsl.ipacc.speech_mode_s",
525+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_s_vals),
526+ 0xf, NULL, HFILL }
527+ },
528+ { &hf_rsl_speech_mode_m,
529+ { "ip.access Speech Mode M", "rsl.ipacc.speech_mode_m",
530+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_m_vals),
531+ 0xf0, NULL, HFILL }
Harald Welte2d112ad2009-06-10 05:42:52 +0800532+ },
Harald Weltec9b484f2009-07-12 20:46:43 +0200533+ { &hf_rsl_conn_stat,
534+ { "ip.access Connection Statistics","rsl.ipacc.conn_stat",
Harald Welteb5280c72009-10-22 10:09:56 +0200535+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
Harald Welte2d112ad2009-06-10 05:42:52 +0800536+ },
Harald Weltec9b484f2009-07-12 20:46:43 +0200537+ { &hf_rsl_conn_id,
538+ { "ip.access Connection ID", "rsl.ipacc.conn_id",
539+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
Harald Welte2d112ad2009-06-10 05:42:52 +0800540+ },
Harald Weltec9b484f2009-07-12 20:46:43 +0200541+ { &hf_rsl_rtp_payload,
542+ { "ip.access RTP Payload Type", "rsl.ipacc.rtp_payload",
543+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
Harald Welte2d112ad2009-06-10 05:42:52 +0800544+ },
Harald Welteb5280c72009-10-22 10:09:56 +0200545+ { &hf_rsl_rtp_csd_fmt_d,
546+ { "ip.access RTP CSD Format D", "rsl.ipacc.rtp_csd_fmt_d",
547+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_d_vals),
548+ 0x0f, NULL, HFILL },
549+ },
550+ { &hf_rsl_rtp_csd_fmt_ir,
551+ { "ip.access RTP CSD Format IR", "rsl.ipacc.rtp_csd_fmt_ir",
552+ FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_ir_vals),
553+ 0xf0, NULL, HFILL },
554+ },
Harald Welte2d112ad2009-06-10 05:42:52 +0800555+ { &hf_rsl_local_port,
556+ { "ip.access Local RTP Port", "rsl.ipacc.local_port",
557+ FT_UINT16, BASE_DEC, NULL, 0x0,
558+ "ip.access Local RTP Port", HFILL },
559+ },
560+ { &hf_rsl_remote_port,
561+ { "ip.access Remote RTP Port", "rsl.ipacc.remote_port",
562+ FT_UINT16, BASE_DEC, NULL, 0x0,
563+ "ip.access Remote RTP Port", HFILL },
564+ },
565+ { &hf_rsl_local_ip,
566+ { "ip.access Local IP Address", "rsl.ipacc.local_ip",
567+ FT_IPv4, BASE_NONE, NULL, 0x0,
568+ "ip.access Local IP Address", HFILL },
569+ },
570+ { &hf_rsl_remote_ip,
571+ { "ip.access Remote IP Address", "rsl.ipacc.remote_ip",
572+ FT_IPv4, BASE_NONE, NULL, 0x0,
573+ "ip.access Remote IP Address", HFILL },
574+ },
Harald Welteb5280c72009-10-22 10:09:56 +0200575+ { &hf_rsl_cstat_tx_pkts,
576+ { "Packets Sent", "rsl.ipacc.cstat.tx_pkts",
577+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
578+ },
579+ { &hf_rsl_cstat_tx_octs,
580+ { "Octets Sent", "rsl.ipacc.cstat.tx_octets",
581+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
582+ },
583+ { &hf_rsl_cstat_rx_pkts,
584+ { "Packets Received", "rsl.ipacc.cstat.rx_pkts",
585+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
586+ },
587+ { &hf_rsl_cstat_rx_octs,
588+ { "Octets Received", "rsl.ipacc.cstat.rx_octets",
589+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
590+ },
591+ { &hf_rsl_cstat_lost_pkts,
592+ { "Packets Lost", "rsl.ipacc.cstat.lost_pkts",
593+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
594+ },
595+ { &hf_rsl_cstat_ia_jitter,
596+ { "Inter-arrival Jitter", "rsl.ipacc.cstat.ia_jitter",
597+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
598+ },
599+ { &hf_rsl_cstat_avg_tx_dly,
600+ { "Average Tx Delay", "rsl.ipacc.cstat.avg_tx_delay",
601+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }
602+ },
Harald Welte2d112ad2009-06-10 05:42:52 +0800603 };
604 static gint *ett[] = {
605 &ett_rsl,
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200606@@ -3949,7 +4392,88 @@ void proto_register_rsl(void)
Harald Welte2d112ad2009-06-10 05:42:52 +0800607 &ett_ie_meas_res_no,
608 &ett_ie_message_id,
609 &ett_ie_sys_info_type,
Harald Weltec9b484f2009-07-12 20:46:43 +0200610+ &ett_ie_speech_mode,
611+ &ett_ie_conn_stat,
612+ &ett_ie_conn_id,
Harald Welte2d112ad2009-06-10 05:42:52 +0800613+ &ett_ie_remote_ip,
614+ &ett_ie_remote_port,
615+ &ett_ie_local_port,
616+ &ett_ie_local_ip,
Harald Weltec9b484f2009-07-12 20:46:43 +0200617+ &ett_ie_rtp_payload,
Harald Welte2d112ad2009-06-10 05:42:52 +0800618 };
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200619+ module_t *rsl_module;
620+
621+#define RSL_ATT_TLVDEF(_attr, _type, _fixed_len) \
622+ rsl_att_tlvdef.def[_attr].type = _type; \
623+ rsl_att_tlvdef.def[_attr].fixed_len = _fixed_len; \
624+
625+ RSL_ATT_TLVDEF(RSL_IE_CH_NO, TLV_TYPE_TV, 0);
626+ RSL_ATT_TLVDEF(RSL_IE_LINK_ID, TLV_TYPE_TV, 0);
627+ RSL_ATT_TLVDEF(RSL_IE_ACT_TYPE, TLV_TYPE_TV, 0);
628+ RSL_ATT_TLVDEF(RSL_IE_BS_POW, TLV_TYPE_TV, 0);
629+ RSL_ATT_TLVDEF(RSL_IE_CH_ID, TLV_TYPE_TLV, 0);
630+ RSL_ATT_TLVDEF(RSL_IE_CH_MODE, TLV_TYPE_TLV, 0);
631+ RSL_ATT_TLVDEF(RSL_IE_ENC_INF, TLV_TYPE_TLV, 0);
632+ RSL_ATT_TLVDEF(RSL_IE_FRAME_NO, TLV_TYPE_FIXED, 2);
633+ RSL_ATT_TLVDEF(RSL_IE_HO_REF, TLV_TYPE_TV, 0);
634+ RSL_ATT_TLVDEF(RSL_IE_L1_INF, TLV_TYPE_FIXED, 2);
635+ RSL_ATT_TLVDEF(RSL_IE_L3_INF, TLV_TYPE_TL16V, 0);
636+ RSL_ATT_TLVDEF(RSL_IE_MS_ID, TLV_TYPE_TLV, 0);
637+ RSL_ATT_TLVDEF(RSL_IE_MS_POW, TLV_TYPE_TV, 0);
638+ RSL_ATT_TLVDEF(RSL_IE_PAGING_GRP, TLV_TYPE_TV, 0);
639+ RSL_ATT_TLVDEF(RSL_IE_PAGING_LOAD, TLV_TYPE_FIXED, 2);
640+ RSL_ATT_TLVDEF(RSL_IE_PHY_CTX, TLV_TYPE_TLV, 0);
641+ RSL_ATT_TLVDEF(RSL_IE_ACCESS_DELAY, TLV_TYPE_TV, 0);
642+ RSL_ATT_TLVDEF(RSL_IE_RACH_LOAD, TLV_TYPE_TLV, 0);
643+ RSL_ATT_TLVDEF(RSL_IE_REQ_REF, TLV_TYPE_FIXED, 3);
644+ RSL_ATT_TLVDEF(RSL_IE_REL_MODE, TLV_TYPE_TV, 0);
645+ RSL_ATT_TLVDEF(RSL_IE_RESOURCE_INF, TLV_TYPE_TLV, 0);
646+ RSL_ATT_TLVDEF(RSL_IE_RLM_CAUSE, TLV_TYPE_TLV, 0);
647+ RSL_ATT_TLVDEF(RSL_IE_STARTING_TIME, TLV_TYPE_FIXED, 2);
648+ RSL_ATT_TLVDEF(RSL_IE_TIMING_ADV, TLV_TYPE_TV, 0);
649+ RSL_ATT_TLVDEF(RSL_IE_UPLINK_MEAS, TLV_TYPE_TLV, 0);
650+ RSL_ATT_TLVDEF(RSL_IE_CAUSE, TLV_TYPE_TLV, 0);
651+ RSL_ATT_TLVDEF(RSL_IE_MEAS_RES_NO, TLV_TYPE_TV, 0);
652+ RSL_ATT_TLVDEF(RSL_IE_MESSAGE_ID, TLV_TYPE_TV, 0);
653+ RSL_ATT_TLVDEF(RSL_IE_SYS_INFO_TYPE, TLV_TYPE_TV, 0);
654+ RSL_ATT_TLVDEF(RSL_IE_MS_POWER_PARAM, TLV_TYPE_TLV, 0);
655+ RSL_ATT_TLVDEF(RSL_IE_BS_POWER_PARAM, TLV_TYPE_TLV, 0);
656+ RSL_ATT_TLVDEF(RSL_IE_PREPROC_PARAM, TLV_TYPE_TLV, 0);
657+ RSL_ATT_TLVDEF(RSL_IE_PREPROC_MEAS, TLV_TYPE_TLV, 0);
658+// RSL_ATT_TLVDEF(RSL_IE_IMM_ASS_INFO, TLV_TYPE_TLV, 0);
659+// RSL_ATT_TLVDEF(RSL_IE_SMSCB_INFO, TLV_TYPE_FIXED, 23);
660+// RSL_ATT_TLVDEF(RSL_IE_MS_TIMING_OFFSET, TLV_TYPE_TV, 0);
661+ RSL_ATT_TLVDEF(RSL_IE_ERR_MSG, TLV_TYPE_TLV, 0);
662+ RSL_ATT_TLVDEF(RSL_IE_FULL_BCCH_INF, TLV_TYPE_TLV, 0);
663+ RSL_ATT_TLVDEF(RSL_IE_CH_NEEDED, TLV_TYPE_TV, 0);
664+ RSL_ATT_TLVDEF(RSL_IE_CB_CMD_TYPE, TLV_TYPE_TV, 0);
665+ RSL_ATT_TLVDEF(RSL_IE_SMSCB_MESS, TLV_TYPE_TLV, 0);
666+ RSL_ATT_TLVDEF(RSL_IE_FULL_IMM_ASS_INF, TLV_TYPE_TLV, 0);
667+// RSL_ATT_TLVDEF(RSL_IE_SACCH_INFO, TLV_TYPE_TLV, 0);
668+ RSL_ATT_TLVDEF(RSL_IE_CBCH_LOAD_INF, TLV_TYPE_TV, 0);
669+ RSL_ATT_TLVDEF(RSL_IE_SMSCB_CH_IND, TLV_TYPE_TV, 0);
670+ RSL_ATT_TLVDEF(RSL_IE_GRP_CALL_REF, TLV_TYPE_TLV, 0);
671+ RSL_ATT_TLVDEF(RSL_IE_CH_DESC, TLV_TYPE_TLV, 0);
672+ RSL_ATT_TLVDEF(RSL_IE_NCH_DRX_INF, TLV_TYPE_TLV, 0);
673+ RSL_ATT_TLVDEF(RSL_IE_CMD_IND, TLV_TYPE_TLV, 0);
674+ RSL_ATT_TLVDEF(RSL_IE_EMLPP_PRIO, TLV_TYPE_TV, 0);
675+ RSL_ATT_TLVDEF(RSL_IE_UIC, TLV_TYPE_TLV, 0);
676+ RSL_ATT_TLVDEF(RSL_IE_MAIN_CH_REF, TLV_TYPE_TV, 0);
677+ RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CONF, TLV_TYPE_TLV, 0);
678+ RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CNTRL, TLV_TYPE_TV, 0);
679+ RSL_ATT_TLVDEF(RSL_IE_SUP_CODEC_TYPES, TLV_TYPE_TLV, 0);
680+ RSL_ATT_TLVDEF(RSL_IE_CODEC_CONF, TLV_TYPE_TLV, 0);
681+ RSL_ATT_TLVDEF(RSL_IE_RTD, TLV_TYPE_TV, 0);
682+ RSL_ATT_TLVDEF(RSL_IE_TFO_STATUS, TLV_TYPE_TV, 0);
683+ RSL_ATT_TLVDEF(RSL_IE_LLP_APDU, TLV_TYPE_TLV, 0);
684+ RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_IP, TLV_TYPE_FIXED, 4);
685+ RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_PORT, TLV_TYPE_FIXED, 2);
686+ RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_IP, TLV_TYPE_FIXED, 4);
687+ RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_STAT, TLV_TYPE_TLV, 0);
688+ RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_PORT, TLV_TYPE_FIXED, 2);
689+ RSL_ATT_TLVDEF(RSL_IE_IPAC_SPEECH_MODE, TLV_TYPE_TV, 0);
690+ RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_ID, TLV_TYPE_FIXED, 2);
691+ RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD2,TLV_TYPE_TV, 0);
Harald Welte2d112ad2009-06-10 05:42:52 +0800692
693 /* Register the protocol name and description */
Pablo Neira Ayusoffcf66f2011-03-31 14:05:08 +0200694 proto_rsl = proto_register_protocol("Radio Signalling Link (RSL)",
695@@ -3960,5 +4484,9 @@ void proto_register_rsl(void)
696
697 register_dissector("gsm_abis_rsl", dissect_rsl, proto_rsl);
698
699+ rsl_module = prefs_register_protocol(proto_rsl, proto_reg_handoff_rsl);
700+ prefs_register_bool_preference(rsl_module, "use_ipaccess_rsl",
701+ "Use nanoBTS definitions",
702+ "Use ipaccess nanoBTS specific definitions for RSL",
703+ &global_rsl_use_nano_bts);
704 }
705-