Holger Hans Peter Freyther | 164d700 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 1 | From 54882db58b6ec12da6b80071e0ac2344d42df24c Mon Sep 17 00:00:00 2001 |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 2 | |
Holger Hans Peter Freyther | 721745b | 2010-04-21 20:37:53 +0800 | [diff] [blame] | 3 | From: Holger Hans Peter Freyther <zecke@selfish.org> |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 4 | |
Holger Hans Peter Freyther | 164d700 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 5 | Subject: [PATCH 4/4] rsl-ipaccess |
Holger Hans Peter Freyther | 721745b | 2010-04-21 20:37:53 +0800 | [diff] [blame] | 6 | |
Holger Hans Peter Freyther | 164d700 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 7 | Add vendor specific commands for RSL. |
Holger Hans Peter Freyther | 721745b | 2010-04-21 20:37:53 +0800 | [diff] [blame] | 8 | --- |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 9 | epan/dissectors/packet-rsl.c | 544 +++++++++++++++++++++++++++++++++++++++++- |
| 10 | 1 files changed, 536 insertions(+), 8 deletions(-) |
Holger Hans Peter Freyther | 721745b | 2010-04-21 20:37:53 +0800 | [diff] [blame] | 11 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 12 | Index: wireshark/epan/dissectors/packet-rsl.c |
| 13 | =================================================================== |
| 14 | --- wireshark.orig/epan/dissectors/packet-rsl.c 2011-09-06 12:29:45.000000000 +0200 |
| 15 | +++ wireshark/epan/dissectors/packet-rsl.c 2011-09-06 13:25:12.000000000 +0200 |
| 16 | @@ -39,8 +39,11 @@ |
| 17 | |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 18 | #include <epan/packet.h> |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 19 | #include <epan/lapd_sapi.h> |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 20 | +#include <epan/prefs.h> |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 21 | |
| 22 | #include "packet-gsm_a_common.h" |
| 23 | +#include "packet-rtp.h" |
| 24 | +#include "packet-rtcp.h" |
| 25 | |
| 26 | /* Initialize the protocol and registered fields */ |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 27 | static int proto_rsl = -1; |
| 28 | @@ -115,6 +118,25 @@ |
| 29 | static int hf_rsl_rtd = -1; |
| 30 | static int hf_rsl_delay_ind = -1; |
| 31 | static int hf_rsl_tfo = -1; |
| 32 | +static int hf_rsl_speech_mode_s = -1; |
| 33 | +static int hf_rsl_speech_mode_m = -1; |
| 34 | +static int hf_rsl_conn_stat = -1; |
| 35 | +static int hf_rsl_conn_id = -1; |
| 36 | +static int hf_rsl_rtp_payload = -1; |
| 37 | +static int hf_rsl_rtp_csd_fmt_d = -1; |
| 38 | +static int hf_rsl_rtp_csd_fmt_ir = -1; |
| 39 | +static int hf_rsl_local_port = -1; |
| 40 | +static int hf_rsl_remote_port = -1; |
| 41 | +static int hf_rsl_local_ip = -1; |
| 42 | +static int hf_rsl_remote_ip = -1; |
| 43 | +static int hf_rsl_cstat_tx_pkts = -1; |
| 44 | +static int hf_rsl_cstat_tx_octs = -1; |
| 45 | +static int hf_rsl_cstat_rx_pkts = -1; |
| 46 | +static int hf_rsl_cstat_rx_octs = -1; |
| 47 | +static int hf_rsl_cstat_lost_pkts = -1; |
| 48 | +static int hf_rsl_cstat_ia_jitter = -1; |
| 49 | +static int hf_rsl_cstat_avg_tx_dly = -1; |
| 50 | + |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 51 | |
| 52 | /* Initialize the subtree pointers */ |
| 53 | static int ett_rsl = -1; |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 54 | @@ -172,6 +194,15 @@ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 55 | static int ett_ie_meas_res_no = -1; |
| 56 | static int ett_ie_message_id = -1; |
| 57 | static int ett_ie_sys_info_type = -1; |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 58 | +static int ett_ie_speech_mode = -1; |
| 59 | +static int ett_ie_conn_stat = -1; |
| 60 | +static int ett_ie_conn_id = -1; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 61 | +static int ett_ie_remote_ip = -1; |
| 62 | +static int ett_ie_remote_port = -1; |
| 63 | +static int ett_ie_local_port = -1; |
| 64 | +static int ett_ie_local_ip = -1; |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 65 | +static int ett_ie_rtp_payload = -1; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 66 | + |
| 67 | |
Holger Hans Peter Freyther | 164d700 | 2011-01-11 16:33:52 +0100 | [diff] [blame] | 68 | static proto_tree *top_tree; |
| 69 | static dissector_handle_t gsm_a_ccch_handle; |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 70 | @@ -179,6 +210,9 @@ |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 71 | |
| 72 | static gboolean is_si2q = FALSE; |
| 73 | |
| 74 | +/* Decode things as nanoBTS traces */ |
| 75 | +static gboolean global_rsl_use_nano_bts = TRUE; |
| 76 | + |
| 77 | /* Forward declarations */ |
| 78 | static int dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset); |
| 79 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 80 | @@ -208,8 +242,10 @@ |
| 81 | { 0x06, "Common Channel Management messages" }, |
| 82 | { 0x08, "TRX Management messages" }, |
| 83 | { 0x16, "Location Services messages" }, |
| 84 | + { 0x3f, "ip.access Vendor Specific messages" }, |
| 85 | { 0, NULL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 86 | }; |
| 87 | +#define RSL_MSGDISC_IPACCESS 0x3f |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 88 | /* |
| 89 | * 9.2 MESSAGE TYPE |
| 90 | */ |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 91 | @@ -277,6 +313,49 @@ |
| 92 | /* 0 1 - - - - - - Location Services messages: */ |
| 93 | #define RSL_MSG_LOC_INF 65 /* 8.7.1 */ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 94 | |
| 95 | +/* Vendor-Specific messages of ip.access nanoBTS. There is no public documentation |
| 96 | + * about those extensions, all information in this dissector is based on lawful |
| 97 | + * protocol reverse enginering by Harald Welte <laforge@gnumonks.org> */ |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 98 | +#define RSL_MSG_TYPE_IPAC_MEAS_PP_DEF 0x60 |
| 99 | +#define RSL_MSG_TYPE_IPAC_HO_CAND_INQ 0x61 |
| 100 | +#define RSL_MSG_TYPE_IPAC_HO_CAND_RESP 0x62 |
| 101 | + |
| 102 | +#define RSL_MSG_TYPE_IPAC_PDCH_ACT 0x48 |
| 103 | +#define RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK 0x49 |
| 104 | +#define RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK 0x4a |
| 105 | +#define RSL_MSG_TYPE_IPAC_PDCH_DEACT 0x4b |
| 106 | +#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK 0x4c |
| 107 | +#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK 0x4d |
| 108 | + |
Holger Hans Peter Freyther | 721745b | 2010-04-21 20:37:53 +0800 | [diff] [blame] | 109 | +#define RSL_MSG_TYPE_IPAC_CRCX 0x70 |
| 110 | +#define RSL_MSG_TYPE_IPAC_CRCX_ACK 0x71 |
| 111 | +#define RSL_MSG_TYPE_IPAC_CRCX_NACK 0x72 |
| 112 | +#define RSL_MSG_TYPE_IPAC_MDCX 0x73 |
| 113 | +#define RSL_MSG_TYPE_IPAC_MDCX_ACK 0x74 |
| 114 | +#define RSL_MSG_TYPE_IPAC_MDCX_NACK 0x75 |
| 115 | +#define RSL_MSG_TYPE_IPAC_DLCX_IND 0x76 |
| 116 | +#define RSL_MSG_TYPE_IPAC_DLCX 0x77 |
| 117 | +#define RSL_MSG_TYPE_IPAC_DLCX_ACK 0x78 |
| 118 | +#define RSL_MSG_TYPE_IPAC_DLCX_NACK 0x79 |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 119 | + |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 120 | +#define RSL_IE_IPAC_SRTP_CONFIG 0xe0 |
| 121 | +#define RSL_IE_IPAC_PROXY_UDP 0xe1 |
| 122 | +#define RSL_IE_IPAC_BSCMPL_TOUT 0xe2 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 123 | +#define RSL_IE_IPAC_REMOTE_IP 0xf0 |
| 124 | +#define RSL_IE_IPAC_REMOTE_PORT 0xf1 |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 125 | +#define RSL_IE_IPAC_RTP_PAYLOAD 0xf2 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 126 | +#define RSL_IE_IPAC_LOCAL_PORT 0xf3 |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 127 | +#define RSL_IE_IPAC_SPEECH_MODE 0xf4 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 128 | +#define RSL_IE_IPAC_LOCAL_IP 0xf5 |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 129 | +#define RSL_IE_IPAC_CONN_STAT 0xf6 |
| 130 | +#define RSL_IE_IPAC_HO_C_PARMS 0xf7 |
| 131 | +#define RSL_IE_IPAC_CONN_ID 0xf8 |
| 132 | +#define RSL_IE_IPAC_RTP_CSD_FMT 0xf9 |
| 133 | +#define RSL_IE_IPAC_RTP_JIT_BUF 0xfa |
| 134 | +#define RSL_IE_IPAC_RTP_COMPR 0xfb |
| 135 | +#define RSL_IE_IPAC_RTP_PAYLOAD2 0xfc |
| 136 | +#define RSL_IE_IPAC_RTP_MPLEX 0xfd |
| 137 | +#define RSL_IE_IPAC_RTP_MPLEX_ID 0xfe |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 138 | |
| 139 | static const value_string rsl_msg_type_vals[] = { |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 140 | /* 0 0 0 0 - - - - Radio Link Layer Management messages: */ |
| 141 | @@ -339,6 +418,26 @@ |
| 142 | { 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */ |
| 143 | /* 0 1 - - - - - - Location Services messages: */ |
| 144 | { 0x41, "Location Information" }, /* 8.7.1 */ |
| 145 | + /* ip.access */ |
| 146 | + { 0x48, "ip.access PDCH ACTIVATION" }, |
| 147 | + { 0x49, "ip.access PDCH ACTIVATION ACK" }, |
| 148 | + { 0x4a, "ip.access PDCH ACTIVATION NACK" }, |
| 149 | + { 0x4b, "ip.access PDCH DEACTIVATION" }, |
| 150 | + { 0x4c, "ip.access PDCH DEACTIVATION ACK" }, |
| 151 | + { 0x4d, "ip.access PDCH DEACTIVATION NACK" }, |
| 152 | + { 0x60, "ip.access MEASurement PREPROCessing DeFauLT" }, |
| 153 | + { 0x61, "ip.access HANDOover CANDidate ENQuiry" }, |
| 154 | + { 0x62, "ip.access HANDOover CANDidate RESPonse" }, |
| 155 | + { 0x70, "ip.access CRCX" }, |
| 156 | + { 0x71, "ip.access CRCX ACK" }, |
| 157 | + { 0x72, "ip.access CRCX NACK" }, |
| 158 | + { 0x73, "ip.access MDCX" }, |
| 159 | + { 0x74, "ip.access MDCX ACK" }, |
| 160 | + { 0x75, "ip.access MDCX NACK" }, |
| 161 | + { 0x76, "ip.access DLCX INDication" }, |
| 162 | + { 0x77, "ip.access DLCX" }, |
| 163 | + { 0x78, "ip.access DLCX ACK" }, |
| 164 | + { 0x79, "ip.access DLCX NACK" }, |
| 165 | { 0, NULL } |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 166 | }; |
| 167 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 168 | @@ -373,9 +472,10 @@ |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 169 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 170 | #define RSL_IE_SYS_INFO_TYPE 30 |
| 171 | |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 172 | - |
| 173 | - |
| 174 | - |
| 175 | +#define RSL_IE_MS_POWER_PARAM 31 |
| 176 | +#define RSL_IE_BS_POWER_PARAM 32 |
| 177 | +#define RSL_IE_PREPROC_PARAM 33 |
| 178 | +#define RSL_IE_PREPROC_MEAS 34 |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 179 | #define RSL_IE_FULL_IMM_ASS_INF 35 |
| 180 | #define RSL_IE_SMSCB_INF 36 |
| 181 | #define RSL_IE_FULL_MS_TIMING_OFFSET 37 |
| 182 | @@ -478,6 +578,24 @@ |
| 183 | Not used |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 184 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 185 | */ |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 186 | + { 0xe0, "SRTP Configuration" }, |
| 187 | + { 0xe1, "BSC Proxy UDP Port" }, |
| 188 | + { 0xe2, "BSC Multiplex Timeout" }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 189 | + { 0xf0, "Remote IP Address" }, |
| 190 | + { 0xf1, "Remote RTP Port" }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 191 | + { 0xf2, "RTP Payload Type" }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 192 | + { 0xf3, "Local RTP Port" }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 193 | + { 0xf4, "Speech Mode" }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 194 | + { 0xf5, "Local IP Address" }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 195 | + { 0xf6, "Connection Statistics" }, |
| 196 | + { 0xf7, "Handover C Parameters" }, |
| 197 | + { 0xf8, "Connection Identifier" }, |
| 198 | + { 0xf9, "RTP CSD Format" }, |
| 199 | + { 0xfa, "RTP Jitter Buffer" }, |
| 200 | + { 0xfb, "RTP Compression" }, |
| 201 | + { 0xfc, "RTP Payload Type 2" }, |
| 202 | + { 0xfd, "RTP Multiplex" }, |
| 203 | + { 0xfe, "RTP Multiplex Identifier" }, |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 204 | { 0, NULL } |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 205 | }; |
| 206 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 207 | @@ -514,6 +632,27 @@ |
| 208 | { 0, NULL } |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 209 | }; |
| 210 | |
| 211 | +/* From openbsc/include/openbsc/tlv.h */ |
| 212 | +enum tlv_type { |
| 213 | + TLV_TYPE_FIXED, |
| 214 | + TLV_TYPE_T, |
| 215 | + TLV_TYPE_TV, |
| 216 | + TLV_TYPE_TLV, |
| 217 | + TLV_TYPE_TL16V, |
| 218 | +}; |
| 219 | + |
| 220 | +struct tlv_def { |
| 221 | + enum tlv_type type; |
| 222 | + u_int8_t fixed_len; |
| 223 | +}; |
| 224 | + |
| 225 | +struct tlv_definition { |
| 226 | + struct tlv_def def[0xff]; |
| 227 | +}; |
| 228 | + |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 229 | +/* This structure is initialized in proto_register_rsl() */ |
| 230 | +static struct tlv_definition rsl_att_tlvdef; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 231 | + |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 232 | /* 9.3.1 Channel number 9.3.1 M TV 2 */ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 233 | static int |
| 234 | dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 235 | @@ -2918,12 +3057,184 @@ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 236 | } |
| 237 | |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 238 | static int |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 239 | +dissct_rsl_ipaccess_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 240 | +{ |
| 241 | + guint8 msg_type; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 242 | + guint32 local_addr = 0; |
| 243 | + guint16 local_port = 0; |
| 244 | + address src_addr; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 245 | + |
| 246 | + msg_type = tvb_get_guint8(tvb, offset)&0x7f; |
| 247 | + offset++; |
| 248 | + |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 249 | +#if 0 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 250 | + switch (msg_type) { |
Holger Hans Peter Freyther | 721745b | 2010-04-21 20:37:53 +0800 | [diff] [blame] | 251 | + case RSL_MSG_TYPE_IPAC_CRCX: |
| 252 | + case RSL_MSG_TYPE_IPAC_CRCX_ACK: |
| 253 | + case RSL_MSG_TYPE_IPAC_CRCX_NACK: |
| 254 | + case RSL_MSG_TYPE_IPAC_MDCX: |
| 255 | + case RSL_MSG_TYPE_IPAC_MDCX_ACK: |
| 256 | + case RSL_MSG_TYPE_IPAC_MDCX_NACK: |
| 257 | + case RSL_MSG_TYPE_IPAC_DLCX_IND: |
| 258 | + case RSL_MSG_TYPE_IPAC_DLCX: |
| 259 | + case RSL_MSG_TYPE_IPAC_DLCX_ACK: |
| 260 | + case RSL_MSG_TYPE_IPAC_DLCX_NACK: |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 261 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT: |
| 262 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: |
| 263 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: |
| 264 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT: |
| 265 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: |
| 266 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 267 | + /* Channel number 9.3.1 M TV 2 */ |
| 268 | + offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); |
| 269 | + break; |
Harald Welte | 4086723 | 2009-08-20 00:59:11 +0900 | [diff] [blame] | 270 | + } |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 271 | +#endif |
| 272 | + /* parse TLV attributes */ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 273 | + while (tvb_reported_length_remaining(tvb, offset) != 0) { |
| 274 | + guint8 tag; |
| 275 | + unsigned int len, hlen, len_len; |
| 276 | + const struct tlv_def *tdef; |
| 277 | + proto_item *ti; |
| 278 | + proto_tree *ie_tree; |
| 279 | + |
| 280 | + tag = tvb_get_guint8(tvb, offset); |
| 281 | + tdef = &rsl_att_tlvdef.def[tag]; |
| 282 | + |
| 283 | + switch (tdef->type) { |
| 284 | + case TLV_TYPE_FIXED: |
| 285 | + hlen = 1; |
| 286 | + len_len = 0; |
| 287 | + len = tdef->fixed_len; |
| 288 | + break; |
| 289 | + case TLV_TYPE_T: |
| 290 | + hlen = 1; |
| 291 | + len_len = 0; |
| 292 | + len = 0; |
| 293 | + break; |
| 294 | + case TLV_TYPE_TV: |
| 295 | + hlen = 1; |
| 296 | + len_len = 0; |
| 297 | + len = 1; |
| 298 | + break; |
| 299 | + case TLV_TYPE_TLV: |
| 300 | + hlen = 2; |
| 301 | + len_len = 1; |
| 302 | + len = tvb_get_guint8(tvb, offset+1); |
| 303 | + break; |
| 304 | + case TLV_TYPE_TL16V: |
| 305 | + hlen = 3; |
| 306 | + len_len = 2; |
| 307 | + len = tvb_get_guint8(tvb, offset+1) << 8 | |
| 308 | + tvb_get_guint8(tvb, offset+2); |
| 309 | + break; |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 310 | + default: |
| 311 | + hlen = len_len = len = 0; |
| 312 | + DISSECTOR_ASSERT_NOT_REACHED(); |
| 313 | + break; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 314 | + } |
| 315 | + |
| 316 | + ti = proto_tree_add_item(tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 317 | + ie_tree = proto_item_add_subtree(ti, ett_ie_local_port); |
| 318 | + offset += hlen; |
| 319 | + |
| 320 | + switch (tag) { |
| 321 | + case RSL_IE_CH_NO: |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 322 | + dissect_rsl_ie_ch_no(tvb, pinfo, ie_tree, offset, FALSE); |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 323 | + break; |
| 324 | + case RSL_IE_FRAME_NO: |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 325 | + dissect_rsl_ie_frame_no(tvb, pinfo, ie_tree, offset, FALSE); |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 326 | + break; |
| 327 | + case RSL_IE_MS_POW: |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 328 | + dissect_rsl_ie_ms_pow(tvb, pinfo, ie_tree, offset, FALSE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 329 | + break; |
| 330 | + case RSL_IE_IPAC_REMOTE_IP: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 331 | + proto_tree_add_item(ie_tree, hf_rsl_remote_ip, tvb, |
Harald Welte | 46502b1 | 2009-07-12 23:10:28 +0200 | [diff] [blame] | 332 | + offset, len, FALSE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 333 | + break; |
| 334 | + case RSL_IE_IPAC_REMOTE_PORT: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 335 | + proto_tree_add_item(ie_tree, hf_rsl_remote_port, tvb, |
Harald Welte | 46502b1 | 2009-07-12 23:10:28 +0200 | [diff] [blame] | 336 | + offset, len, FALSE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 337 | + break; |
| 338 | + case RSL_IE_IPAC_LOCAL_IP: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 339 | + proto_tree_add_item(ie_tree, hf_rsl_local_ip, tvb, |
Harald Welte | 46502b1 | 2009-07-12 23:10:28 +0200 | [diff] [blame] | 340 | + offset, len, FALSE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 341 | + local_addr = tvb_get_ipv4(tvb, offset); |
| 342 | + break; |
| 343 | + case RSL_IE_IPAC_LOCAL_PORT: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 344 | + proto_tree_add_item(ie_tree, hf_rsl_local_port, tvb, |
Harald Welte | 46502b1 | 2009-07-12 23:10:28 +0200 | [diff] [blame] | 345 | + offset, len, FALSE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 346 | + local_port = tvb_get_ntohs(tvb, offset); |
| 347 | + break; |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 348 | + case RSL_IE_IPAC_SPEECH_MODE: |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 349 | + proto_tree_add_item(ie_tree, hf_rsl_speech_mode_s, tvb, |
| 350 | + offset, len, FALSE); |
| 351 | + proto_tree_add_item(ie_tree, hf_rsl_speech_mode_m, tvb, |
Harald Welte | 46502b1 | 2009-07-12 23:10:28 +0200 | [diff] [blame] | 352 | + offset, len, FALSE); |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 353 | + break; |
| 354 | + case RSL_IE_IPAC_RTP_PAYLOAD: |
| 355 | + case RSL_IE_IPAC_RTP_PAYLOAD2: |
| 356 | + proto_tree_add_item(ie_tree, hf_rsl_rtp_payload, tvb, |
Harald Welte | 46502b1 | 2009-07-12 23:10:28 +0200 | [diff] [blame] | 357 | + offset, len, FALSE); |
| 358 | + break; |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 359 | + case RSL_IE_IPAC_RTP_CSD_FMT: |
| 360 | + proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_d, tvb, |
| 361 | + offset, len, FALSE); |
| 362 | + proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_ir, tvb, |
| 363 | + offset, len, FALSE); |
| 364 | + break; |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 365 | + case RSL_IE_IPAC_CONN_ID: |
| 366 | + proto_tree_add_item(ie_tree, hf_rsl_conn_id, tvb, |
Harald Welte | 46502b1 | 2009-07-12 23:10:28 +0200 | [diff] [blame] | 367 | + offset, len, FALSE); |
Holger Hans Peter Freyther | e606f91 | 2009-11-18 21:31:15 +0100 | [diff] [blame] | 368 | + break; |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 369 | + case RSL_IE_IPAC_CONN_STAT: |
| 370 | + proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_pkts, tvb, |
| 371 | + offset, 4, FALSE); |
| 372 | + proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_octs, tvb, |
| 373 | + offset+4, 4, FALSE); |
| 374 | + proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_pkts, tvb, |
| 375 | + offset+8, 4, FALSE); |
| 376 | + proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_octs, tvb, |
| 377 | + offset+12, 4, FALSE); |
| 378 | + proto_tree_add_item(ie_tree, hf_rsl_cstat_lost_pkts, tvb, |
| 379 | + offset+16, 4, FALSE); |
| 380 | + proto_tree_add_item(ie_tree, hf_rsl_cstat_ia_jitter, tvb, |
| 381 | + offset+20, 4, FALSE); |
| 382 | + proto_tree_add_item(ie_tree, hf_rsl_cstat_avg_tx_dly, tvb, |
| 383 | + offset+24, 4, FALSE); |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 384 | + break; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 385 | + } |
| 386 | + offset += len; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 387 | + } |
| 388 | + |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 389 | + switch (msg_type) { |
Holger Hans Peter Freyther | 721745b | 2010-04-21 20:37:53 +0800 | [diff] [blame] | 390 | + case RSL_MSG_TYPE_IPAC_CRCX_ACK: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 391 | + /* Notify the RTP and RTCP dissectors about a new RTP stream */ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 392 | + src_addr.type = AT_IPv4; |
| 393 | + src_addr.len = 4; |
| 394 | + src_addr.data = (guint8 *)&local_addr; |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 395 | + rtp_add_address(pinfo, &src_addr, local_port, 0, |
Harald Welte | 8f19a27 | 2009-07-04 04:11:21 +0200 | [diff] [blame] | 396 | + "GSM A-bis/IP", pinfo->fd->num, 0, NULL); |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 397 | + rtcp_add_address(pinfo, &src_addr, local_port+1, 0, |
| 398 | + "GSM A-bis/IP", pinfo->fd->num); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 399 | + break; |
| 400 | + } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 401 | + return offset; |
| 402 | +} |
| 403 | + |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 404 | +static int |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 405 | dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) |
| 406 | { |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 407 | - guint8 msg_type; |
| 408 | + guint8 msg_disc, msg_type; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 409 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 410 | + msg_disc = tvb_get_guint8(tvb, offset++) >> 1; |
| 411 | msg_type = tvb_get_guint8(tvb,offset)&0x7f; |
| 412 | proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN); |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 413 | + |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 414 | + if (msg_disc == RSL_MSGDISC_IPACCESS) { |
| 415 | + offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset); |
| 416 | + return offset; |
| 417 | + } |
| 418 | offset++; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 419 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 420 | switch (msg_type){ |
| 421 | @@ -3491,6 +3802,18 @@ |
| 422 | /* LLP APDU 9.3.58 M LV 2-N */ |
| 423 | offset = dissect_rsl_ie_llp_apdu(tvb, pinfo, tree, offset, TRUE); |
| 424 | break; |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 425 | + /* the following messages are ip.access specific but sent without |
| 426 | + * ip.access memssage discriminator */ |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 427 | + case RSL_MSG_TYPE_IPAC_MEAS_PP_DEF: |
| 428 | + case RSL_MSG_TYPE_IPAC_HO_CAND_INQ: |
| 429 | + case RSL_MSG_TYPE_IPAC_HO_CAND_RESP: |
| 430 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT: |
| 431 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: |
| 432 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: |
| 433 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT: |
| 434 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: |
| 435 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: |
| 436 | + offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset-1); |
| 437 | default: |
| 438 | break; |
| 439 | } |
| 440 | @@ -3498,6 +3821,40 @@ |
| 441 | return offset; |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 442 | |
| 443 | } |
| 444 | + |
| 445 | +static const value_string rsl_ipacc_spm_s_vals[] = { |
| 446 | + { 0, "GSM FR codec (GSM type 1, FS)" }, |
| 447 | + { 1, "GSM EFR codec (GSM type 2, FS)" }, |
| 448 | + { 2, "GSM AMR/FR codec (GSM type 3, FS)" }, |
| 449 | + { 3, "GSM HR codec (GSM type 1, HS)" }, |
| 450 | + { 5, "GSM AMR/HR codec (GSM type 3, HS)" }, |
| 451 | + { 0xf, "As specified by RTP Payload Type IE" }, |
| 452 | + { 0, NULL } |
| 453 | +}; |
| 454 | + |
| 455 | +static const value_string rsl_ipacc_spm_m_vals[] = { |
| 456 | + { 0, "Send and Receive" }, |
| 457 | + { 1, "Receive Only" }, |
| 458 | + { 2, "Send Only" }, |
| 459 | + { 0, NULL } |
| 460 | +}; |
| 461 | + |
| 462 | +static const value_string rsl_ipacc_rtp_csd_fmt_d_vals[] = { |
| 463 | + { 0, "External TRAU format" }, |
| 464 | + { 1, "Non-TRAU Packed format" }, |
| 465 | + { 2, "TRAU within the BTS" }, |
| 466 | + { 3, "IWF-Free BTS-BTS Data" }, |
| 467 | + { 0, NULL } |
| 468 | +}; |
| 469 | + |
| 470 | +static const value_string rsl_ipacc_rtp_csd_fmt_ir_vals[] = { |
| 471 | + { 0, "8kb/s" }, |
| 472 | + { 1, "16kb/s" }, |
| 473 | + { 2, "32kb/s" }, |
| 474 | + { 3, "64kb/s" }, |
| 475 | + { 0, NULL } |
| 476 | +}; |
| 477 | + |
| 478 | static void |
| 479 | dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) |
| 480 | { |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 481 | @@ -3518,12 +3875,19 @@ |
| 482 | top_tree = tree; |
| 483 | if (tree) { |
| 484 | ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, ENC_BIG_ENDIAN); |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 485 | + |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 486 | + /* if nanoBTS specific vendor messages are not enabled, skip */ |
| 487 | + if (!global_rsl_use_nano_bts) { |
| 488 | + guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1; |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 489 | + |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 490 | + if (msg_disc == RSL_MSGDISC_IPACCESS) |
| 491 | + return; |
| 492 | + } |
| 493 | rsl_tree = proto_item_add_subtree(ti, ett_rsl); |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 494 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 495 | /* 9.1 Message discriminator */ |
| 496 | proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, ENC_BIG_ENDIAN); |
| 497 | proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, ENC_BIG_ENDIAN); |
| 498 | - offset++; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 499 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 500 | offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset); |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 501 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 502 | @@ -3898,6 +4262,86 @@ |
| 503 | FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03, |
| 504 | NULL, HFILL } |
| 505 | }, |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 506 | + { &hf_rsl_speech_mode_s, |
| 507 | + { "ip.access Speech Mode S", "rsl.ipacc.speech_mode_s", |
| 508 | + FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_s_vals), |
| 509 | + 0xf, NULL, HFILL } |
| 510 | + }, |
| 511 | + { &hf_rsl_speech_mode_m, |
| 512 | + { "ip.access Speech Mode M", "rsl.ipacc.speech_mode_m", |
| 513 | + FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_m_vals), |
| 514 | + 0xf0, NULL, HFILL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 515 | + }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 516 | + { &hf_rsl_conn_stat, |
| 517 | + { "ip.access Connection Statistics","rsl.ipacc.conn_stat", |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 518 | + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 519 | + }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 520 | + { &hf_rsl_conn_id, |
| 521 | + { "ip.access Connection ID", "rsl.ipacc.conn_id", |
| 522 | + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 523 | + }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 524 | + { &hf_rsl_rtp_payload, |
| 525 | + { "ip.access RTP Payload Type", "rsl.ipacc.rtp_payload", |
| 526 | + FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 527 | + }, |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 528 | + { &hf_rsl_rtp_csd_fmt_d, |
| 529 | + { "ip.access RTP CSD Format D", "rsl.ipacc.rtp_csd_fmt_d", |
| 530 | + FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_d_vals), |
| 531 | + 0x0f, NULL, HFILL }, |
| 532 | + }, |
| 533 | + { &hf_rsl_rtp_csd_fmt_ir, |
| 534 | + { "ip.access RTP CSD Format IR", "rsl.ipacc.rtp_csd_fmt_ir", |
| 535 | + FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_ir_vals), |
| 536 | + 0xf0, NULL, HFILL }, |
| 537 | + }, |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 538 | + { &hf_rsl_local_port, |
| 539 | + { "ip.access Local RTP Port", "rsl.ipacc.local_port", |
| 540 | + FT_UINT16, BASE_DEC, NULL, 0x0, |
| 541 | + "ip.access Local RTP Port", HFILL }, |
| 542 | + }, |
| 543 | + { &hf_rsl_remote_port, |
| 544 | + { "ip.access Remote RTP Port", "rsl.ipacc.remote_port", |
| 545 | + FT_UINT16, BASE_DEC, NULL, 0x0, |
| 546 | + "ip.access Remote RTP Port", HFILL }, |
| 547 | + }, |
| 548 | + { &hf_rsl_local_ip, |
| 549 | + { "ip.access Local IP Address", "rsl.ipacc.local_ip", |
| 550 | + FT_IPv4, BASE_NONE, NULL, 0x0, |
| 551 | + "ip.access Local IP Address", HFILL }, |
| 552 | + }, |
| 553 | + { &hf_rsl_remote_ip, |
| 554 | + { "ip.access Remote IP Address", "rsl.ipacc.remote_ip", |
| 555 | + FT_IPv4, BASE_NONE, NULL, 0x0, |
| 556 | + "ip.access Remote IP Address", HFILL }, |
| 557 | + }, |
Harald Welte | 21ee3f9 | 2009-10-22 10:09:56 +0200 | [diff] [blame] | 558 | + { &hf_rsl_cstat_tx_pkts, |
| 559 | + { "Packets Sent", "rsl.ipacc.cstat.tx_pkts", |
| 560 | + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } |
| 561 | + }, |
| 562 | + { &hf_rsl_cstat_tx_octs, |
| 563 | + { "Octets Sent", "rsl.ipacc.cstat.tx_octets", |
| 564 | + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } |
| 565 | + }, |
| 566 | + { &hf_rsl_cstat_rx_pkts, |
| 567 | + { "Packets Received", "rsl.ipacc.cstat.rx_pkts", |
| 568 | + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } |
| 569 | + }, |
| 570 | + { &hf_rsl_cstat_rx_octs, |
| 571 | + { "Octets Received", "rsl.ipacc.cstat.rx_octets", |
| 572 | + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } |
| 573 | + }, |
| 574 | + { &hf_rsl_cstat_lost_pkts, |
| 575 | + { "Packets Lost", "rsl.ipacc.cstat.lost_pkts", |
| 576 | + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } |
| 577 | + }, |
| 578 | + { &hf_rsl_cstat_ia_jitter, |
| 579 | + { "Inter-arrival Jitter", "rsl.ipacc.cstat.ia_jitter", |
| 580 | + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } |
| 581 | + }, |
| 582 | + { &hf_rsl_cstat_avg_tx_dly, |
| 583 | + { "Average Tx Delay", "rsl.ipacc.cstat.avg_tx_delay", |
| 584 | + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } |
| 585 | + }, |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 586 | }; |
| 587 | static gint *ett[] = { |
| 588 | &ett_rsl, |
| 589 | @@ -3955,7 +4399,88 @@ |
| 590 | &ett_ie_meas_res_no, |
| 591 | &ett_ie_message_id, |
| 592 | &ett_ie_sys_info_type, |
| 593 | + &ett_ie_speech_mode, |
| 594 | + &ett_ie_conn_stat, |
| 595 | + &ett_ie_conn_id, |
| 596 | + &ett_ie_remote_ip, |
| 597 | + &ett_ie_remote_port, |
| 598 | + &ett_ie_local_port, |
| 599 | + &ett_ie_local_ip, |
| 600 | + &ett_ie_rtp_payload, |
| 601 | }; |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 602 | + module_t *rsl_module; |
| 603 | + |
| 604 | +#define RSL_ATT_TLVDEF(_attr, _type, _fixed_len) \ |
| 605 | + rsl_att_tlvdef.def[_attr].type = _type; \ |
| 606 | + rsl_att_tlvdef.def[_attr].fixed_len = _fixed_len; \ |
| 607 | + |
| 608 | + RSL_ATT_TLVDEF(RSL_IE_CH_NO, TLV_TYPE_TV, 0); |
| 609 | + RSL_ATT_TLVDEF(RSL_IE_LINK_ID, TLV_TYPE_TV, 0); |
| 610 | + RSL_ATT_TLVDEF(RSL_IE_ACT_TYPE, TLV_TYPE_TV, 0); |
| 611 | + RSL_ATT_TLVDEF(RSL_IE_BS_POW, TLV_TYPE_TV, 0); |
| 612 | + RSL_ATT_TLVDEF(RSL_IE_CH_ID, TLV_TYPE_TLV, 0); |
| 613 | + RSL_ATT_TLVDEF(RSL_IE_CH_MODE, TLV_TYPE_TLV, 0); |
| 614 | + RSL_ATT_TLVDEF(RSL_IE_ENC_INF, TLV_TYPE_TLV, 0); |
| 615 | + RSL_ATT_TLVDEF(RSL_IE_FRAME_NO, TLV_TYPE_FIXED, 2); |
| 616 | + RSL_ATT_TLVDEF(RSL_IE_HO_REF, TLV_TYPE_TV, 0); |
| 617 | + RSL_ATT_TLVDEF(RSL_IE_L1_INF, TLV_TYPE_FIXED, 2); |
| 618 | + RSL_ATT_TLVDEF(RSL_IE_L3_INF, TLV_TYPE_TL16V, 0); |
| 619 | + RSL_ATT_TLVDEF(RSL_IE_MS_ID, TLV_TYPE_TLV, 0); |
| 620 | + RSL_ATT_TLVDEF(RSL_IE_MS_POW, TLV_TYPE_TV, 0); |
| 621 | + RSL_ATT_TLVDEF(RSL_IE_PAGING_GRP, TLV_TYPE_TV, 0); |
| 622 | + RSL_ATT_TLVDEF(RSL_IE_PAGING_LOAD, TLV_TYPE_FIXED, 2); |
| 623 | + RSL_ATT_TLVDEF(RSL_IE_PHY_CTX, TLV_TYPE_TLV, 0); |
| 624 | + RSL_ATT_TLVDEF(RSL_IE_ACCESS_DELAY, TLV_TYPE_TV, 0); |
| 625 | + RSL_ATT_TLVDEF(RSL_IE_RACH_LOAD, TLV_TYPE_TLV, 0); |
| 626 | + RSL_ATT_TLVDEF(RSL_IE_REQ_REF, TLV_TYPE_FIXED, 3); |
| 627 | + RSL_ATT_TLVDEF(RSL_IE_REL_MODE, TLV_TYPE_TV, 0); |
| 628 | + RSL_ATT_TLVDEF(RSL_IE_RESOURCE_INF, TLV_TYPE_TLV, 0); |
| 629 | + RSL_ATT_TLVDEF(RSL_IE_RLM_CAUSE, TLV_TYPE_TLV, 0); |
| 630 | + RSL_ATT_TLVDEF(RSL_IE_STARTING_TIME, TLV_TYPE_FIXED, 2); |
| 631 | + RSL_ATT_TLVDEF(RSL_IE_TIMING_ADV, TLV_TYPE_TV, 0); |
| 632 | + RSL_ATT_TLVDEF(RSL_IE_UPLINK_MEAS, TLV_TYPE_TLV, 0); |
| 633 | + RSL_ATT_TLVDEF(RSL_IE_CAUSE, TLV_TYPE_TLV, 0); |
| 634 | + RSL_ATT_TLVDEF(RSL_IE_MEAS_RES_NO, TLV_TYPE_TV, 0); |
| 635 | + RSL_ATT_TLVDEF(RSL_IE_MESSAGE_ID, TLV_TYPE_TV, 0); |
| 636 | + RSL_ATT_TLVDEF(RSL_IE_SYS_INFO_TYPE, TLV_TYPE_TV, 0); |
| 637 | + RSL_ATT_TLVDEF(RSL_IE_MS_POWER_PARAM, TLV_TYPE_TLV, 0); |
| 638 | + RSL_ATT_TLVDEF(RSL_IE_BS_POWER_PARAM, TLV_TYPE_TLV, 0); |
| 639 | + RSL_ATT_TLVDEF(RSL_IE_PREPROC_PARAM, TLV_TYPE_TLV, 0); |
| 640 | + RSL_ATT_TLVDEF(RSL_IE_PREPROC_MEAS, TLV_TYPE_TLV, 0); |
| 641 | +// RSL_ATT_TLVDEF(RSL_IE_IMM_ASS_INFO, TLV_TYPE_TLV, 0); |
| 642 | +// RSL_ATT_TLVDEF(RSL_IE_SMSCB_INFO, TLV_TYPE_FIXED, 23); |
| 643 | +// RSL_ATT_TLVDEF(RSL_IE_MS_TIMING_OFFSET, TLV_TYPE_TV, 0); |
| 644 | + RSL_ATT_TLVDEF(RSL_IE_ERR_MSG, TLV_TYPE_TLV, 0); |
| 645 | + RSL_ATT_TLVDEF(RSL_IE_FULL_BCCH_INF, TLV_TYPE_TLV, 0); |
| 646 | + RSL_ATT_TLVDEF(RSL_IE_CH_NEEDED, TLV_TYPE_TV, 0); |
| 647 | + RSL_ATT_TLVDEF(RSL_IE_CB_CMD_TYPE, TLV_TYPE_TV, 0); |
| 648 | + RSL_ATT_TLVDEF(RSL_IE_SMSCB_MESS, TLV_TYPE_TLV, 0); |
| 649 | + RSL_ATT_TLVDEF(RSL_IE_FULL_IMM_ASS_INF, TLV_TYPE_TLV, 0); |
| 650 | +// RSL_ATT_TLVDEF(RSL_IE_SACCH_INFO, TLV_TYPE_TLV, 0); |
| 651 | + RSL_ATT_TLVDEF(RSL_IE_CBCH_LOAD_INF, TLV_TYPE_TV, 0); |
| 652 | + RSL_ATT_TLVDEF(RSL_IE_SMSCB_CH_IND, TLV_TYPE_TV, 0); |
| 653 | + RSL_ATT_TLVDEF(RSL_IE_GRP_CALL_REF, TLV_TYPE_TLV, 0); |
| 654 | + RSL_ATT_TLVDEF(RSL_IE_CH_DESC, TLV_TYPE_TLV, 0); |
| 655 | + RSL_ATT_TLVDEF(RSL_IE_NCH_DRX_INF, TLV_TYPE_TLV, 0); |
| 656 | + RSL_ATT_TLVDEF(RSL_IE_CMD_IND, TLV_TYPE_TLV, 0); |
| 657 | + RSL_ATT_TLVDEF(RSL_IE_EMLPP_PRIO, TLV_TYPE_TV, 0); |
| 658 | + RSL_ATT_TLVDEF(RSL_IE_UIC, TLV_TYPE_TLV, 0); |
| 659 | + RSL_ATT_TLVDEF(RSL_IE_MAIN_CH_REF, TLV_TYPE_TV, 0); |
| 660 | + RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CONF, TLV_TYPE_TLV, 0); |
| 661 | + RSL_ATT_TLVDEF(RSL_IE_MULTIRATE_CNTRL, TLV_TYPE_TV, 0); |
| 662 | + RSL_ATT_TLVDEF(RSL_IE_SUP_CODEC_TYPES, TLV_TYPE_TLV, 0); |
| 663 | + RSL_ATT_TLVDEF(RSL_IE_CODEC_CONF, TLV_TYPE_TLV, 0); |
| 664 | + RSL_ATT_TLVDEF(RSL_IE_RTD, TLV_TYPE_TV, 0); |
| 665 | + RSL_ATT_TLVDEF(RSL_IE_TFO_STATUS, TLV_TYPE_TV, 0); |
| 666 | + RSL_ATT_TLVDEF(RSL_IE_LLP_APDU, TLV_TYPE_TLV, 0); |
| 667 | + RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_IP, TLV_TYPE_FIXED, 4); |
| 668 | + RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_PORT, TLV_TYPE_FIXED, 2); |
| 669 | + RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_IP, TLV_TYPE_FIXED, 4); |
| 670 | + RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_STAT, TLV_TYPE_TLV, 0); |
| 671 | + RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_PORT, TLV_TYPE_FIXED, 2); |
| 672 | + RSL_ATT_TLVDEF(RSL_IE_IPAC_SPEECH_MODE, TLV_TYPE_TV, 0); |
| 673 | + RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_ID, TLV_TYPE_FIXED, 2); |
| 674 | + RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD2,TLV_TYPE_TV, 0); |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 675 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 676 | /* Register the protocol name and description */ |
| 677 | proto_rsl = proto_register_protocol("Radio Signalling Link (RSL)", |
| 678 | @@ -3966,5 +4491,9 @@ |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 679 | |
Harald Welte | c089d58 | 2011-09-06 21:09:05 +0200 | [diff] [blame] | 680 | register_dissector("gsm_abis_rsl", dissect_rsl, proto_rsl); |
Pablo Neira Ayuso | a83697e | 2011-03-31 14:05:08 +0200 | [diff] [blame] | 681 | |
| 682 | + rsl_module = prefs_register_protocol(proto_rsl, proto_reg_handoff_rsl); |
| 683 | + prefs_register_bool_preference(rsl_module, "use_ipaccess_rsl", |
| 684 | + "Use nanoBTS definitions", |
| 685 | + "Use ipaccess nanoBTS specific definitions for RSL", |
| 686 | + &global_rsl_use_nano_bts); |
| 687 | } |
| 688 | - |