Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 1 | Index: wireshark/epan/dissectors/packet-rsl.c |
| 2 | =================================================================== |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 3 | --- wireshark.orig/epan/dissectors/packet-rsl.c 2009-07-12 14:07:48.000000000 +0200 |
| 4 | +++ wireshark/epan/dissectors/packet-rsl.c 2009-07-12 21:58:21.000000000 +0200 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 5 | @@ -2,6 +2,7 @@ |
| 6 | * Routines for Radio Signalling Link (RSL) dissection. |
| 7 | * |
| 8 | * Copyright 2007, Anders Broman <anders.broman@ericsson.com> |
| 9 | + * Copyright 2009, Harald Welte <laforge@gnumonks.org> |
| 10 | * |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 11 | * $Id: packet-rsl.c 29056 2009-07-10 20:00:54Z tuexen $ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 12 | * |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 13 | @@ -44,6 +45,8 @@ |
| 14 | #include <epan/lapd_sapi.h> |
| 15 | |
| 16 | #include "packet-gsm_a_common.h" |
| 17 | +#include "packet-rtp.h" |
| 18 | +#include "packet-rtcp.h" |
| 19 | |
| 20 | /* Initialize the protocol and registered fields */ |
| 21 | static int proto_rsl = -1; |
| 22 | @@ -116,6 +119,14 @@ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 23 | static int hf_rsl_rtd = -1; |
| 24 | static int hf_rsl_delay_ind = -1; |
| 25 | static int hf_rsl_tfo = -1; |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 26 | +static int hf_rsl_speech_mode = -1; |
| 27 | +static int hf_rsl_conn_stat = -1; |
| 28 | +static int hf_rsl_conn_id = -1; |
| 29 | +static int hf_rsl_rtp_payload = -1; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 30 | +static int hf_rsl_local_port = -1; |
| 31 | +static int hf_rsl_remote_port = -1; |
| 32 | +static int hf_rsl_local_ip = -1; |
| 33 | +static int hf_rsl_remote_ip = -1; |
| 34 | |
| 35 | /* Initialize the subtree pointers */ |
| 36 | static int ett_rsl = -1; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 37 | @@ -173,6 +184,15 @@ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 38 | static int ett_ie_meas_res_no = -1; |
| 39 | static int ett_ie_message_id = -1; |
| 40 | static int ett_ie_sys_info_type = -1; |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 41 | +static int ett_ie_speech_mode = -1; |
| 42 | +static int ett_ie_conn_stat = -1; |
| 43 | +static int ett_ie_conn_id = -1; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 44 | +static int ett_ie_remote_ip = -1; |
| 45 | +static int ett_ie_remote_port = -1; |
| 46 | +static int ett_ie_local_port = -1; |
| 47 | +static int ett_ie_local_ip = -1; |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 48 | +static int ett_ie_rtp_payload = -1; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 49 | + |
| 50 | |
| 51 | proto_tree *top_tree; |
| 52 | dissector_handle_t gsm_a_ccch_handle; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 53 | @@ -208,8 +228,11 @@ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 54 | { 0x06, "Common Channel Management messages" }, |
| 55 | { 0x08, "TRX Management messages" }, |
| 56 | { 0x16, "Location Services messages" }, |
| 57 | + { 0x3f, "ip.access Vendor Specific messages" }, |
| 58 | { 0, NULL } |
| 59 | }; |
| 60 | +#define RSL_MSGDISC_IPACCESS 0x3f |
| 61 | + |
| 62 | /* |
| 63 | * 9.2 MESSAGE TYPE |
| 64 | */ |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 65 | @@ -276,6 +299,49 @@ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 66 | /* 0 1 - - - - - - Location Services messages: */ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 67 | #define RSL_MSG_LOC_INF 65 /* 8.7.1 */ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 68 | |
| 69 | +/* Vendor-Specific messages of ip.access nanoBTS. There is no public documentation |
| 70 | + * about those extensions, all information in this dissector is based on lawful |
| 71 | + * protocol reverse enginering by Harald Welte <laforge@gnumonks.org> */ |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 72 | +#define RSL_MSG_TYPE_IPAC_MEAS_PP_DEF 0x60 |
| 73 | +#define RSL_MSG_TYPE_IPAC_HO_CAND_INQ 0x61 |
| 74 | +#define RSL_MSG_TYPE_IPAC_HO_CAND_RESP 0x62 |
| 75 | + |
| 76 | +#define RSL_MSG_TYPE_IPAC_PDCH_ACT 0x48 |
| 77 | +#define RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK 0x49 |
| 78 | +#define RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK 0x4a |
| 79 | +#define RSL_MSG_TYPE_IPAC_PDCH_DEACT 0x4b |
| 80 | +#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK 0x4c |
| 81 | +#define RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK 0x4d |
| 82 | + |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 83 | +#define RSL_MSG_TYPE_IPAC_BIND 0x70 |
| 84 | +#define RSL_MSG_TYPE_IPAC_BIND_ACK 0x71 |
| 85 | +#define RSL_MSG_TYPE_IPAC_BIND_NACK 0x72 |
| 86 | +#define RSL_MSG_TYPE_IPAC_CONNECT 0x73 |
| 87 | +#define RSL_MSG_TYPE_IPAC_CONNECT_ACK 0x74 |
| 88 | +#define RSL_MSG_TYPE_IPAC_CONNECT_NACK 0x75 |
| 89 | +#define RSL_MSG_TYPE_IPAC_DISC_IND 0x76 |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 90 | +#define RSL_MSG_TYPE_IPAC_DISC 0x77 |
| 91 | +#define RSL_MSG_TYPE_IPAC_DISC_ACK 0x78 |
| 92 | +#define RSL_MSG_TYPE_IPAC_DISC_NACK 0x79 |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 93 | + |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 94 | +#define RSL_IE_IPAC_SRTP_CONFIG 0xe0 |
| 95 | +#define RSL_IE_IPAC_PROXY_UDP 0xe1 |
| 96 | +#define RSL_IE_IPAC_BSCMPL_TOUT 0xe2 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 97 | +#define RSL_IE_IPAC_REMOTE_IP 0xf0 |
| 98 | +#define RSL_IE_IPAC_REMOTE_PORT 0xf1 |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 99 | +#define RSL_IE_IPAC_RTP_PAYLOAD 0xf2 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 100 | +#define RSL_IE_IPAC_LOCAL_PORT 0xf3 |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 101 | +#define RSL_IE_IPAC_SPEECH_MODE 0xf4 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 102 | +#define RSL_IE_IPAC_LOCAL_IP 0xf5 |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 103 | +#define RSL_IE_IPAC_CONN_STAT 0xf6 |
| 104 | +#define RSL_IE_IPAC_HO_C_PARMS 0xf7 |
| 105 | +#define RSL_IE_IPAC_CONN_ID 0xf8 |
| 106 | +#define RSL_IE_IPAC_RTP_CSD_FMT 0xf9 |
| 107 | +#define RSL_IE_IPAC_RTP_JIT_BUF 0xfa |
| 108 | +#define RSL_IE_IPAC_RTP_COMPR 0xfb |
| 109 | +#define RSL_IE_IPAC_RTP_PAYLOAD2 0xfc |
| 110 | +#define RSL_IE_IPAC_RTP_MPLEX 0xfd |
| 111 | +#define RSL_IE_IPAC_RTP_MPLEX_ID 0xfe |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 112 | |
| 113 | static const value_string rsl_msg_type_vals[] = { |
| 114 | /* 0 0 0 0 - - - - Radio Link Layer Management messages: */ |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 115 | @@ -338,6 +404,26 @@ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 116 | { 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */ |
| 117 | /* 0 1 - - - - - - Location Services messages: */ |
| 118 | { 0x41, "Location Information" }, /* 8.7.1 */ |
| 119 | + /* ip.access */ |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 120 | + { 0x48, "ip.access PDCH ACTIVATION" }, |
| 121 | + { 0x49, "ip.access PDCH ACTIVATION ACK" }, |
| 122 | + { 0x4a, "ip.access PDCH ACTIVATION NACK" }, |
| 123 | + { 0x4b, "ip.access PDCH DEACTIVATION" }, |
| 124 | + { 0x4c, "ip.access PDCH DEACTIVATION ACK" }, |
| 125 | + { 0x4d, "ip.access PDCH DEACTIVATION NACK" }, |
| 126 | + { 0x60, "ip.access MEASurement PREPROCessing DeFauLT" }, |
| 127 | + { 0x61, "ip.access HANDOover CANDidate ENQuiry" }, |
| 128 | + { 0x62, "ip.access HANDOover CANDidate RESPonse" }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 129 | + { 0x70, "ip.access BIND" }, |
| 130 | + { 0x71, "ip.access BIND ACK" }, |
| 131 | + { 0x72, "ip.access BIND NACK" }, |
| 132 | + { 0x73, "ip.access CONNECT" }, |
| 133 | + { 0x74, "ip.access CONNECT ACK" }, |
| 134 | + { 0x75, "ip.access CONNECT NACK" }, |
| 135 | + { 0x76, "ip.access DISCONNECT INDication" }, |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 136 | + { 0x77, "ip.access DISCONNECT" }, |
| 137 | + { 0x78, "ip.access DISCONNECT ACK" }, |
| 138 | + { 0x79, "ip.access DISCONNECT NACK" }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 139 | { 0, NULL } |
| 140 | }; |
| 141 | |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 142 | @@ -371,10 +457,10 @@ |
| 143 | #define RSL_IE_MESSAGE_ID 28 |
| 144 | |
| 145 | #define RSL_IE_SYS_INFO_TYPE 30 |
| 146 | - |
| 147 | - |
| 148 | - |
| 149 | - |
| 150 | +#define RSL_IE_MS_POWER_PARAM 31 |
| 151 | +#define RSL_IE_BS_POWER_PARAM 32 |
| 152 | +#define RSL_IE_PREPROC_PARAM 33 |
| 153 | +#define RSL_IE_PREPROC_MEAS 34 |
| 154 | #define RSL_IE_FULL_IMM_ASS_INF 35 |
| 155 | #define RSL_IE_SMSCB_INF 36 |
| 156 | #define RSL_IE_FULL_MS_TIMING_OFFSET 37 |
| 157 | @@ -477,6 +563,24 @@ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 158 | Not used |
| 159 | |
| 160 | */ |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 161 | + { 0xe0, "SRTP Configuration" }, |
| 162 | + { 0xe1, "BSC Proxy UDP Port" }, |
| 163 | + { 0xe2, "BSC Multiplex Timeout" }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 164 | + { 0xf0, "Remote IP Address" }, |
| 165 | + { 0xf1, "Remote RTP Port" }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 166 | + { 0xf2, "RTP Payload Type" }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 167 | + { 0xf3, "Local RTP Port" }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 168 | + { 0xf4, "Speech Mode" }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 169 | + { 0xf5, "Local IP Address" }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 170 | + { 0xf6, "Connection Statistics" }, |
| 171 | + { 0xf7, "Handover C Parameters" }, |
| 172 | + { 0xf8, "Connection Identifier" }, |
| 173 | + { 0xf9, "RTP CSD Format" }, |
| 174 | + { 0xfa, "RTP Jitter Buffer" }, |
| 175 | + { 0xfb, "RTP Compression" }, |
| 176 | + { 0xfc, "RTP Payload Type 2" }, |
| 177 | + { 0xfd, "RTP Multiplex" }, |
| 178 | + { 0xfe, "RTP Multiplex Identifier" }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 179 | { 0, NULL } |
| 180 | }; |
| 181 | |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 182 | @@ -513,6 +617,95 @@ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 183 | { 0, NULL } |
| 184 | }; |
| 185 | |
| 186 | +/* From openbsc/include/openbsc/tlv.h */ |
| 187 | +enum tlv_type { |
| 188 | + TLV_TYPE_FIXED, |
| 189 | + TLV_TYPE_T, |
| 190 | + TLV_TYPE_TV, |
| 191 | + TLV_TYPE_TLV, |
| 192 | + TLV_TYPE_TL16V, |
| 193 | +}; |
| 194 | + |
| 195 | +struct tlv_def { |
| 196 | + enum tlv_type type; |
| 197 | + u_int8_t fixed_len; |
| 198 | +}; |
| 199 | + |
| 200 | +struct tlv_definition { |
| 201 | + struct tlv_def def[0xff]; |
| 202 | +}; |
| 203 | + |
| 204 | +static const struct tlv_definition rsl_att_tlvdef = { |
| 205 | + .def = { |
| 206 | + [RSL_IE_CH_NO] = { TLV_TYPE_TV, 0 }, |
| 207 | + [RSL_IE_LINK_ID] = { TLV_TYPE_TV, 0 }, |
| 208 | + [RSL_IE_ACT_TYPE] = { TLV_TYPE_TV, 0 }, |
| 209 | + [RSL_IE_BS_POW] = { TLV_TYPE_TV, 0 }, |
| 210 | + [RSL_IE_CH_ID] = { TLV_TYPE_TLV, 0 }, |
| 211 | + [RSL_IE_CH_MODE] = { TLV_TYPE_TLV, 0 }, |
| 212 | + [RSL_IE_ENC_INF] = { TLV_TYPE_TLV, 0 }, |
| 213 | + [RSL_IE_FRAME_NO] = { TLV_TYPE_FIXED, 2 }, |
| 214 | + [RSL_IE_HO_REF] = { TLV_TYPE_TV, 0 }, |
| 215 | + [RSL_IE_L1_INF] = { TLV_TYPE_FIXED, 2 }, |
| 216 | + [RSL_IE_L3_INF] = { TLV_TYPE_TL16V, 0 }, |
| 217 | + [RSL_IE_MS_ID] = { TLV_TYPE_TLV, 0 }, |
| 218 | + [RSL_IE_MS_POW] = { TLV_TYPE_TV, 0 }, |
| 219 | + [RSL_IE_PAGING_GRP] = { TLV_TYPE_TV, 0 }, |
| 220 | + [RSL_IE_PAGING_LOAD] = { TLV_TYPE_FIXED, 2 }, |
| 221 | + [RSL_IE_PHY_CTX] = { TLV_TYPE_TLV, 0 }, |
| 222 | + [RSL_IE_ACCESS_DELAY] = { TLV_TYPE_TV, 0 }, |
| 223 | + [RSL_IE_RACH_LOAD] = { TLV_TYPE_TLV, 0 }, |
| 224 | + [RSL_IE_REQ_REF] = { TLV_TYPE_FIXED, 3 }, |
| 225 | + [RSL_IE_REL_MODE] = { TLV_TYPE_TV, 0 }, |
| 226 | + [RSL_IE_RESOURCE_INF] = { TLV_TYPE_TLV, 0 }, |
| 227 | + [RSL_IE_RLM_CAUSE] = { TLV_TYPE_TLV, 0 }, |
| 228 | + [RSL_IE_STARTING_TIME] = { TLV_TYPE_FIXED, 2 }, |
| 229 | + [RSL_IE_TIMING_ADV] = { TLV_TYPE_TV, 0 }, |
| 230 | + [RSL_IE_UPLINK_MEAS] = { TLV_TYPE_TLV, 0 }, |
| 231 | + [RSL_IE_CAUSE] = { TLV_TYPE_TLV, 0 }, |
| 232 | + [RSL_IE_MEAS_RES_NO] = { TLV_TYPE_TV, 0 }, |
| 233 | + [RSL_IE_MESSAGE_ID] = { TLV_TYPE_TV, 0 }, |
| 234 | + [RSL_IE_SYS_INFO_TYPE] = { TLV_TYPE_TV, 0 }, |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 235 | + [RSL_IE_MS_POWER_PARAM] = { TLV_TYPE_TLV, 0 }, |
| 236 | + [RSL_IE_BS_POWER_PARAM] = { TLV_TYPE_TLV, 0 }, |
| 237 | + [RSL_IE_PREPROC_PARAM] = { TLV_TYPE_TLV, 0 }, |
| 238 | + [RSL_IE_PREPROC_MEAS] = { TLV_TYPE_TLV, 0 }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 239 | + //[RSL_IE_IMM_ASS_INFO] = { TLV_TYPE_TLV, 0 }, |
| 240 | + //[RSL_IE_SMSCB_INFO] = { TLV_TYPE_FIXED, 23 }, |
| 241 | + //[RSL_IE_MS_TIMING_OFFSET] = { TLV_TYPE_TV, 0 }, |
| 242 | + [RSL_IE_ERR_MSG] = { TLV_TYPE_TLV, 0 }, |
| 243 | + [RSL_IE_FULL_BCCH_INF] = { TLV_TYPE_TLV, 0 }, |
| 244 | + [RSL_IE_CH_NEEDED] = { TLV_TYPE_TV, 0 }, |
| 245 | + [RSL_IE_CB_CMD_TYPE] = { TLV_TYPE_TV, 0 }, |
| 246 | + [RSL_IE_SMSCB_MESS] = { TLV_TYPE_TLV, 0 }, |
| 247 | + [RSL_IE_FULL_IMM_ASS_INF] = { TLV_TYPE_TLV, 0 }, |
| 248 | + //[RSL_IE_SACCH_INFO] = { TLV_TYPE_TLV, 0 }, |
| 249 | + [RSL_IE_CBCH_LOAD_INF] = { TLV_TYPE_TV, 0 }, |
| 250 | + [RSL_IE_SMSCB_CH_IND] = { TLV_TYPE_TV, 0 }, |
| 251 | + [RSL_IE_GRP_CALL_REF] = { TLV_TYPE_TLV, 0 }, |
| 252 | + [RSL_IE_CH_DESC] = { TLV_TYPE_TLV, 0 }, |
| 253 | + [RSL_IE_NCH_DRX_INF] = { TLV_TYPE_TLV, 0 }, |
| 254 | + [RSL_IE_CMD_IND] = { TLV_TYPE_TLV, 0 }, |
| 255 | + [RSL_IE_EMLPP_PRIO] = { TLV_TYPE_TV, 0 }, |
| 256 | + [RSL_IE_UIC] = { TLV_TYPE_TLV, 0 }, |
| 257 | + [RSL_IE_MAIN_CH_REF] = { TLV_TYPE_TV, 0 }, |
| 258 | + [RSL_IE_MULTIRATE_CONF] = { TLV_TYPE_TLV, 0 }, |
| 259 | + [RSL_IE_MULTIRATE_CNTRL] = { TLV_TYPE_TV, 0 }, |
| 260 | + [RSL_IE_SUP_CODEC_TYPES] = { TLV_TYPE_TLV, 0 }, |
| 261 | + [RSL_IE_CODEC_CONF] = { TLV_TYPE_TLV, 0 }, |
| 262 | + [RSL_IE_RTD] = { TLV_TYPE_TV, 0 }, |
| 263 | + [RSL_IE_TFO_STATUS] = { TLV_TYPE_TV, 0 }, |
| 264 | + [RSL_IE_LLP_APDU] = { TLV_TYPE_TLV, 0 }, |
| 265 | + [RSL_IE_IPAC_REMOTE_IP] = { TLV_TYPE_FIXED, 4 }, |
| 266 | + [RSL_IE_IPAC_REMOTE_PORT] = { TLV_TYPE_FIXED, 2 }, |
| 267 | + [RSL_IE_IPAC_LOCAL_IP] = { TLV_TYPE_FIXED, 4 }, |
| 268 | + [RSL_IE_IPAC_LOCAL_PORT] = { TLV_TYPE_FIXED, 2 }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 269 | + [RSL_IE_IPAC_SPEECH_MODE] = { TLV_TYPE_TV, 0 }, |
| 270 | + [RSL_IE_IPAC_CONN_ID] = { TLV_TYPE_FIXED, 2 }, |
| 271 | + [RSL_IE_IPAC_RTP_PAYLOAD2] = { TLV_TYPE_TV, 0 }, |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 272 | + }, |
| 273 | +}; |
| 274 | + |
| 275 | /* 9.3.1 Channel number 9.3.1 M TV 2 */ |
| 276 | static int |
| 277 | dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 278 | @@ -2043,7 +2236,6 @@ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 279 | proto_item_set_len(ti, length+2); |
| 280 | |
| 281 | proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, FALSE); |
| 282 | - offset++; |
| 283 | |
| 284 | /* Received Message */ |
| 285 | offset = dissct_rsl_msg(tvb, pinfo, ie_tree, offset); |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 286 | @@ -2907,13 +3099,425 @@ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 287 | return ie_offset + length; |
| 288 | } |
| 289 | |
| 290 | +#if 0 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 291 | +static int |
| 292 | +dissect_rsl_ipac_ie_f8(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
| 293 | +{ |
| 294 | + proto_item *ti; |
| 295 | + proto_tree *ie_tree; |
| 296 | + guint8 ie_id; |
| 297 | + |
| 298 | + if (is_mandatory == FALSE) { |
| 299 | + ie_id = tvb_get_guint8(tvb, offset); |
| 300 | + if (ie_id != 0xf8) |
| 301 | + return offset; |
| 302 | + } |
| 303 | + |
| 304 | + ti = proto_tree_add_text(tree, tvb, offset, 0, "Unknown 0xf8 IE"); |
| 305 | + ie_tree = proto_item_add_subtree(ti, ett_ie_f8); |
| 306 | + |
| 307 | + /* Element identifier */ |
| 308 | + proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 309 | + offset++; |
| 310 | + /* Fixed Length */ |
| 311 | + proto_item_set_len(ti, 3); |
| 312 | + |
| 313 | + proto_tree_add_item(ie_tree, hf_rsl_f8, tvb, offset, 2, FALSE); |
| 314 | + offset += 2; |
| 315 | + |
| 316 | + return offset; |
| 317 | +} |
| 318 | + |
| 319 | +static int |
| 320 | +dissect_rsl_ipac_ie_local_port(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
| 321 | +{ |
| 322 | + proto_item *ti; |
| 323 | + proto_tree *ie_tree; |
| 324 | + guint8 ie_id; |
| 325 | + |
| 326 | + if (is_mandatory == FALSE) { |
| 327 | + ie_id = tvb_get_guint8(tvb, offset); |
| 328 | + if (ie_id != RSL_IE_IPAC_LOCAL_PORT) |
| 329 | + return offset; |
| 330 | + } |
| 331 | + |
| 332 | + ti = proto_tree_add_text(tree, tvb, offset, 0, "Local RTP Port IE"); |
| 333 | + ie_tree = proto_item_add_subtree(ti, ett_ie_local_port); |
| 334 | + |
| 335 | + /* Element identifier */ |
| 336 | + proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 337 | + offset++; |
| 338 | + /* Fixed Length */ |
| 339 | + proto_item_set_len(ti, 3); |
| 340 | + |
| 341 | + proto_tree_add_item(ie_tree, hf_rsl_local_port, tvb, offset, 2, FALSE); |
| 342 | + offset += 2; |
| 343 | + |
| 344 | + return offset; |
| 345 | +} |
| 346 | + |
| 347 | +static int |
| 348 | +dissect_rsl_ipac_ie_remote_port(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
| 349 | +{ |
| 350 | + proto_item *ti; |
| 351 | + proto_tree *ie_tree; |
| 352 | + guint8 ie_id; |
| 353 | + |
| 354 | + if (is_mandatory == FALSE) { |
| 355 | + ie_id = tvb_get_guint8(tvb, offset); |
| 356 | + if (ie_id != RSL_IE_IPAC_REMOTE_PORT) |
| 357 | + return offset; |
| 358 | + } |
| 359 | + |
| 360 | + ti = proto_tree_add_text(tree, tvb, offset, 0, "Remote RTP Port IE"); |
| 361 | + ie_tree = proto_item_add_subtree(ti, ett_ie_remote_port); |
| 362 | + |
| 363 | + /* Element identifier */ |
| 364 | + proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 365 | + offset++; |
| 366 | + /* Fixed Length */ |
| 367 | + proto_item_set_len(ti, 3); |
| 368 | + |
| 369 | + proto_tree_add_uint(ie_tree, hf_rsl_remote_port, tvb, offset, 2, FALSE); |
| 370 | + offset += 2; |
| 371 | + |
| 372 | + return offset; |
| 373 | +} |
| 374 | + |
| 375 | +static int |
| 376 | +dissect_rsl_ipac_ie_local_ip(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
| 377 | +{ |
| 378 | + proto_item *ti; |
| 379 | + proto_tree *ie_tree; |
| 380 | + guint8 ie_id; |
| 381 | + guint32 ip; |
| 382 | + |
| 383 | + if (is_mandatory == FALSE) { |
| 384 | + ie_id = tvb_get_guint8(tvb, offset); |
| 385 | + if (ie_id != RSL_IE_IPAC_LOCAL_IP) |
| 386 | + return offset; |
| 387 | + } |
| 388 | + |
| 389 | + ti = proto_tree_add_text(tree, tvb, offset, 0, "Local IP Address IE"); |
| 390 | + ie_tree = proto_item_add_subtree(ti, ett_ie_local_ip); |
| 391 | + |
| 392 | + /* Element identifier */ |
| 393 | + proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 394 | + offset++; |
| 395 | + /* Fixed Length */ |
| 396 | + proto_item_set_len(ti, 5); |
| 397 | + |
| 398 | + ip = tvb_get_ipv4(tvb, offset); |
| 399 | + proto_tree_add_ipv4(ie_tree, hf_rsl_local_ip, tvb, offset, 4, ip); |
| 400 | + offset += 4; |
| 401 | + |
| 402 | + return offset; |
| 403 | +} |
| 404 | + |
| 405 | +static int |
| 406 | +dissect_rsl_ipac_ie_remote_ip(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
| 407 | +{ |
| 408 | + proto_item *ti; |
| 409 | + proto_tree *ie_tree; |
| 410 | + guint8 ie_id; |
| 411 | + guint32 ip; |
| 412 | + |
| 413 | + if (is_mandatory == FALSE) { |
| 414 | + ie_id = tvb_get_guint8(tvb, offset); |
| 415 | + if (ie_id != RSL_IE_IPAC_REMOTE_IP) |
| 416 | + return offset; |
| 417 | + } |
| 418 | + |
| 419 | + ti = proto_tree_add_text(tree, tvb, offset, 0, "Remote IP Address IE"); |
| 420 | + ie_tree = proto_item_add_subtree(ti, ett_ie_remote_ip); |
| 421 | + |
| 422 | + /* Element identifier */ |
| 423 | + proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 424 | + offset++; |
| 425 | + /* Fixed Length */ |
| 426 | + proto_item_set_len(ti, 5); |
| 427 | + |
| 428 | + ip = tvb_get_ipv4(tvb, offset); |
| 429 | + proto_tree_add_ipv4(ie_tree, hf_rsl_remote_ip, tvb, offset, 4, ip); |
| 430 | + offset += 4; |
| 431 | + |
| 432 | + return offset; |
| 433 | +} |
| 434 | + |
| 435 | +static int |
| 436 | +dissect_rsl_ipac_ie_f6(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
| 437 | +{ |
| 438 | + proto_item *ti; |
| 439 | + proto_tree *ie_tree; |
| 440 | + guint8 length; |
| 441 | + guint8 ie_id; |
| 442 | + |
| 443 | + if (is_mandatory == FALSE) { |
| 444 | + ie_id = tvb_get_guint8(tvb, offset); |
| 445 | + if (ie_id != 0xf6) |
| 446 | + return offset; |
| 447 | + } |
| 448 | + |
| 449 | + ti = proto_tree_add_text(tree, tvb, offset, 0, "Unknown 0xf6 IE"); |
| 450 | + ie_tree = proto_item_add_subtree(ti, ett_ie_f6); |
| 451 | + |
| 452 | + /* Element identifier */ |
| 453 | + proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 454 | + offset++; |
| 455 | + |
| 456 | + /* Length */ |
| 457 | + length = tvb_get_guint8(tvb, offset); |
| 458 | + offset++; |
| 459 | + proto_item_set_len(ti, length+2); |
| 460 | + |
| 461 | + proto_tree_add_bytes(ie_tree, hf_rsl_f6, tvb, offset, length, |
| 462 | + tvb_get_ptr(tvb, offset, length)); |
| 463 | + offset += length; |
| 464 | + |
| 465 | + return offset; |
| 466 | +} |
| 467 | + |
| 468 | +static int |
| 469 | +dissect_rsl_ipac_ie_f4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
| 470 | +{ |
| 471 | + proto_item *ti; |
| 472 | + proto_tree *ie_tree; |
| 473 | + guint8 ie_id; |
| 474 | + |
| 475 | + if (is_mandatory == FALSE) { |
| 476 | + ie_id = tvb_get_guint8(tvb, offset); |
| 477 | + if (ie_id != 0xf4) |
| 478 | + return offset; |
| 479 | + } |
| 480 | + |
| 481 | + ti = proto_tree_add_text(tree, tvb, offset, 0, "Unknown 0xf4 IE"); |
| 482 | + ie_tree = proto_item_add_subtree(ti, ett_ie_f4); |
| 483 | + |
| 484 | + /* Element identifier */ |
| 485 | + proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 486 | + offset++; |
| 487 | + /* Fixed Length */ |
| 488 | + proto_item_set_len(ti, 2); |
| 489 | + proto_tree_add_item(ie_tree, hf_rsl_f4, tvb, offset, 1, FALSE); |
| 490 | + offset++; |
| 491 | + |
| 492 | + return offset; |
| 493 | +} |
| 494 | + |
| 495 | +static int |
| 496 | +dissect_rsl_ipac_ie_fc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) |
| 497 | +{ |
| 498 | + proto_item *ti; |
| 499 | + proto_tree *ie_tree; |
| 500 | + guint8 ie_id; |
| 501 | + |
| 502 | + if (is_mandatory == FALSE) { |
| 503 | + ie_id = tvb_get_guint8(tvb, offset); |
| 504 | + if (ie_id != 0xfc) |
| 505 | + return offset; |
| 506 | + } |
| 507 | + |
| 508 | + ti = proto_tree_add_text(tree, tvb, offset, 0, "Unknown 0xfc IE"); |
| 509 | + ie_tree = proto_item_add_subtree(ti, ett_ie_fc); |
| 510 | + |
| 511 | + /* Element identifier */ |
| 512 | + proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 513 | + offset++; |
| 514 | + /* Fixed Length */ |
| 515 | + proto_item_set_len(ti, 2); |
| 516 | + proto_tree_add_item(ie_tree, hf_rsl_fc, tvb, offset, 1, FALSE); |
| 517 | + offset++; |
| 518 | + |
| 519 | + return offset; |
| 520 | +} |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 521 | +#endif |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 522 | + |
| 523 | +static int |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 524 | +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] | 525 | +{ |
| 526 | + guint8 msg_type; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 527 | + guint32 local_addr = 0; |
| 528 | + guint16 local_port = 0; |
| 529 | + address src_addr; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 530 | + |
| 531 | + msg_type = tvb_get_guint8(tvb, offset)&0x7f; |
| 532 | + offset++; |
| 533 | + |
| 534 | + switch (msg_type) { |
| 535 | + case RSL_MSG_TYPE_IPAC_BIND: |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 536 | + case RSL_MSG_TYPE_IPAC_BIND_ACK: |
| 537 | + case RSL_MSG_TYPE_IPAC_BIND_NACK: |
| 538 | + case RSL_MSG_TYPE_IPAC_CONNECT: |
| 539 | + case RSL_MSG_TYPE_IPAC_CONNECT_ACK: |
| 540 | + case RSL_MSG_TYPE_IPAC_CONNECT_NACK: |
| 541 | + case RSL_MSG_TYPE_IPAC_DISC_IND: |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 542 | + case RSL_MSG_TYPE_IPAC_DISC: |
| 543 | + case RSL_MSG_TYPE_IPAC_DISC_ACK: |
| 544 | + case RSL_MSG_TYPE_IPAC_DISC_NACK: |
| 545 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT: |
| 546 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: |
| 547 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: |
| 548 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT: |
| 549 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: |
| 550 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 551 | + /* Channel number 9.3.1 M TV 2 */ |
| 552 | + offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); |
| 553 | + break; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 554 | +#if 0 |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 555 | + /* Channel number 9.3.1 M TV 2 */ |
| 556 | + offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); |
| 557 | + offset = dissect_rsl_ipac_ie_f8(tvb, pinfo, tree, offset, TRUE); |
| 558 | + offset = dissect_rsl_ipac_ie_local_port(tvb, pinfo, tree, offset, TRUE); |
| 559 | + offset = dissect_rsl_ipac_ie_local_ip(tvb, pinfo, tree, offset, TRUE); |
| 560 | + offset = dissect_rsl_ipac_ie_fc(tvb, pinfo, tree, offset, TRUE); |
| 561 | + break; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 562 | + /* Channel number 9.3.1 M TV 2 */ |
| 563 | + offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); |
| 564 | + break; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 565 | + /* Channel number 9.3.1 M TV 2 */ |
| 566 | + offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); |
| 567 | + offset = dissect_rsl_ipac_ie_remote_ip(tvb, pinfo, tree, offset, TRUE); |
| 568 | + offset = dissect_rsl_ipac_ie_remote_port(tvb, pinfo, tree, offset, TRUE); |
| 569 | + offset = dissect_rsl_ipac_ie_f4(tvb, pinfo, tree, offset, TRUE); |
| 570 | + offset = dissect_rsl_ipac_ie_fc(tvb, pinfo, tree, offset, TRUE); |
| 571 | + break; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 572 | + /* Channel number 9.3.1 M TV 2 */ |
| 573 | + offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); |
| 574 | + offset = dissect_rsl_ipac_ie_f8(tvb, pinfo, tree, offset, TRUE); |
| 575 | + break; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 576 | + /* Channel number 9.3.1 M TV 2 */ |
| 577 | + offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); |
| 578 | + break; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 579 | + /* Channel number 9.3.1 M TV 2 */ |
| 580 | + offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); |
| 581 | + offset = dissect_rsl_ipac_ie_f8(tvb, pinfo, tree, offset, TRUE); |
| 582 | + offset = dissect_rsl_ipac_ie_f6(tvb, pinfo, tree, offset, TRUE); |
| 583 | + /* Cause 9.3.26 M TLV >=3 */ |
| 584 | + offset = dissect_rsl_ie_cause(tvb, pinfo, tree, offset, TRUE); |
| 585 | + break; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 586 | +#endif |
| 587 | + } |
| 588 | + /* parse remaining TLV attributes */ |
| 589 | + while (tvb_reported_length_remaining(tvb, offset) != 0) { |
| 590 | + guint8 tag; |
| 591 | + unsigned int len, hlen, len_len; |
| 592 | + const struct tlv_def *tdef; |
| 593 | + proto_item *ti; |
| 594 | + proto_tree *ie_tree; |
| 595 | + |
| 596 | + tag = tvb_get_guint8(tvb, offset); |
| 597 | + tdef = &rsl_att_tlvdef.def[tag]; |
| 598 | + |
| 599 | + switch (tdef->type) { |
| 600 | + case TLV_TYPE_FIXED: |
| 601 | + hlen = 1; |
| 602 | + len_len = 0; |
| 603 | + len = tdef->fixed_len; |
| 604 | + break; |
| 605 | + case TLV_TYPE_T: |
| 606 | + hlen = 1; |
| 607 | + len_len = 0; |
| 608 | + len = 0; |
| 609 | + break; |
| 610 | + case TLV_TYPE_TV: |
| 611 | + hlen = 1; |
| 612 | + len_len = 0; |
| 613 | + len = 1; |
| 614 | + break; |
| 615 | + case TLV_TYPE_TLV: |
| 616 | + hlen = 2; |
| 617 | + len_len = 1; |
| 618 | + len = tvb_get_guint8(tvb, offset+1); |
| 619 | + break; |
| 620 | + case TLV_TYPE_TL16V: |
| 621 | + hlen = 3; |
| 622 | + len_len = 2; |
| 623 | + len = tvb_get_guint8(tvb, offset+1) << 8 | |
| 624 | + tvb_get_guint8(tvb, offset+2); |
| 625 | + break; |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 626 | + default: |
| 627 | + hlen = len_len = len = 0; |
| 628 | + DISSECTOR_ASSERT_NOT_REACHED(); |
| 629 | + break; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 630 | + } |
| 631 | + |
| 632 | + ti = proto_tree_add_item(tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); |
| 633 | + ie_tree = proto_item_add_subtree(ti, ett_ie_local_port); |
| 634 | + offset += hlen; |
| 635 | + |
| 636 | + switch (tag) { |
| 637 | + case RSL_IE_CH_NO: |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 638 | + dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); |
| 639 | + break; |
| 640 | + case RSL_IE_FRAME_NO: |
| 641 | + dissect_rsl_ie_frame_no(tvb, pinfo, ie_tree, offset, TRUE); |
| 642 | + break; |
| 643 | + case RSL_IE_MS_POW: |
| 644 | + dissect_rsl_ie_ms_pow(tvb, pinfo, ie_tree, offset, TRUE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 645 | + break; |
| 646 | + case RSL_IE_IPAC_REMOTE_IP: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 647 | + proto_tree_add_item(ie_tree, hf_rsl_remote_ip, tvb, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 648 | + offset, len, TRUE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 649 | + break; |
| 650 | + case RSL_IE_IPAC_REMOTE_PORT: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 651 | + proto_tree_add_item(ie_tree, hf_rsl_remote_port, tvb, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 652 | + offset, len, TRUE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 653 | + break; |
| 654 | + case RSL_IE_IPAC_LOCAL_IP: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 655 | + proto_tree_add_item(ie_tree, hf_rsl_local_ip, tvb, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 656 | + offset, len, TRUE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 657 | + local_addr = tvb_get_ipv4(tvb, offset); |
| 658 | + break; |
| 659 | + case RSL_IE_IPAC_LOCAL_PORT: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 660 | + proto_tree_add_item(ie_tree, hf_rsl_local_port, tvb, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 661 | + offset, len, TRUE); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 662 | + local_port = tvb_get_ntohs(tvb, offset); |
| 663 | + break; |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 664 | + case RSL_IE_IPAC_SPEECH_MODE: |
| 665 | + proto_tree_add_item(ie_tree, hf_rsl_speech_mode, tvb, |
| 666 | + offset, len, TRUE); |
| 667 | + break; |
| 668 | + case RSL_IE_IPAC_RTP_PAYLOAD: |
| 669 | + case RSL_IE_IPAC_RTP_PAYLOAD2: |
| 670 | + proto_tree_add_item(ie_tree, hf_rsl_rtp_payload, tvb, |
| 671 | + offset, len, TRUE); |
| 672 | + break; |
| 673 | + case RSL_IE_IPAC_CONN_ID: |
| 674 | + proto_tree_add_item(ie_tree, hf_rsl_conn_id, tvb, |
| 675 | + offset, len, TRUE); |
| 676 | + break; |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 677 | + } |
| 678 | + offset += len; |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 679 | + } |
| 680 | + |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 681 | + switch (msg_type) { |
| 682 | + case RSL_MSG_TYPE_IPAC_BIND_ACK: |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 683 | + /* Notify the RTP and RTCP dissectors about a new RTP stream */ |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 684 | + src_addr.type = AT_IPv4; |
| 685 | + src_addr.len = 4; |
| 686 | + src_addr.data = (guint8 *)&local_addr; |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 687 | + rtp_add_address(pinfo, &src_addr, local_port, 0, |
Harald Welte | 8f19a27 | 2009-07-04 04:11:21 +0200 | [diff] [blame] | 688 | + "GSM A-bis/IP", pinfo->fd->num, 0, NULL); |
Harald Welte | 0a53727 | 2009-07-01 11:22:01 +0200 | [diff] [blame] | 689 | + rtcp_add_address(pinfo, &src_addr, local_port+1, 0, |
| 690 | + "GSM A-bis/IP", pinfo->fd->num); |
Harald Welte | 9b8eea0 | 2009-06-26 15:04:00 +0200 | [diff] [blame] | 691 | + break; |
| 692 | + } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 693 | + return offset; |
| 694 | +} |
| 695 | + |
| 696 | static int |
| 697 | dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) |
| 698 | { |
| 699 | - guint8 msg_type; |
| 700 | + guint8 msg_disc, msg_type; |
| 701 | |
| 702 | + msg_disc = tvb_get_guint8(tvb, offset++) >> 1; |
| 703 | msg_type = tvb_get_guint8(tvb,offset)&0x7f; |
| 704 | proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, FALSE); |
| 705 | + |
| 706 | + if (msg_disc == RSL_MSGDISC_IPACCESS) { |
| 707 | + offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset); |
| 708 | + return offset; |
| 709 | + } |
| 710 | offset++; |
| 711 | |
| 712 | switch (msg_type){ |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 713 | @@ -3481,6 +4085,18 @@ |
| 714 | /* LLP APDU 9.3.58 M LV 2-N */ |
| 715 | offset = dissect_rsl_ie_llp_apdu(tvb, pinfo, tree, offset, TRUE); |
| 716 | break; |
| 717 | + /* the following messages are ip.access specific but sent without |
| 718 | + * ip.access memssage discriminator */ |
| 719 | + case RSL_MSG_TYPE_IPAC_MEAS_PP_DEF: |
| 720 | + case RSL_MSG_TYPE_IPAC_HO_CAND_INQ: |
| 721 | + case RSL_MSG_TYPE_IPAC_HO_CAND_RESP: |
| 722 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT: |
| 723 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: |
| 724 | + case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: |
| 725 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT: |
| 726 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: |
| 727 | + case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: |
| 728 | + offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset-1); |
| 729 | default: |
| 730 | break; |
| 731 | } |
| 732 | @@ -3517,7 +4133,6 @@ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 733 | /* 9.1 Message discriminator */ |
| 734 | proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, FALSE); |
| 735 | proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, FALSE); |
| 736 | - offset++; |
| 737 | |
| 738 | offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset); |
| 739 | |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 740 | @@ -3883,6 +4498,42 @@ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 741 | FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03, |
Harald Welte | 8f19a27 | 2009-07-04 04:11:21 +0200 | [diff] [blame] | 742 | NULL, HFILL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 743 | }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 744 | + { &hf_rsl_speech_mode, |
| 745 | + { "ip.access Speech Mode", "rsl.ipacc.speech_mode", |
| 746 | + FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 747 | + }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 748 | + { &hf_rsl_conn_stat, |
| 749 | + { "ip.access Connection Statistics","rsl.ipacc.conn_stat", |
| 750 | + FT_BYTES, BASE_HEX, NULL, 0x0, NULL, HFILL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 751 | + }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 752 | + { &hf_rsl_conn_id, |
| 753 | + { "ip.access Connection ID", "rsl.ipacc.conn_id", |
| 754 | + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 755 | + }, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 756 | + { &hf_rsl_rtp_payload, |
| 757 | + { "ip.access RTP Payload Type", "rsl.ipacc.rtp_payload", |
| 758 | + FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 759 | + }, |
| 760 | + { &hf_rsl_local_port, |
| 761 | + { "ip.access Local RTP Port", "rsl.ipacc.local_port", |
| 762 | + FT_UINT16, BASE_DEC, NULL, 0x0, |
| 763 | + "ip.access Local RTP Port", HFILL }, |
| 764 | + }, |
| 765 | + { &hf_rsl_remote_port, |
| 766 | + { "ip.access Remote RTP Port", "rsl.ipacc.remote_port", |
| 767 | + FT_UINT16, BASE_DEC, NULL, 0x0, |
| 768 | + "ip.access Remote RTP Port", HFILL }, |
| 769 | + }, |
| 770 | + { &hf_rsl_local_ip, |
| 771 | + { "ip.access Local IP Address", "rsl.ipacc.local_ip", |
| 772 | + FT_IPv4, BASE_NONE, NULL, 0x0, |
| 773 | + "ip.access Local IP Address", HFILL }, |
| 774 | + }, |
| 775 | + { &hf_rsl_remote_ip, |
| 776 | + { "ip.access Remote IP Address", "rsl.ipacc.remote_ip", |
| 777 | + FT_IPv4, BASE_NONE, NULL, 0x0, |
| 778 | + "ip.access Remote IP Address", HFILL }, |
| 779 | + }, |
| 780 | }; |
| 781 | static gint *ett[] = { |
| 782 | &ett_rsl, |
Harald Welte | 6fca008 | 2009-07-12 21:59:04 +0200 | [diff] [blame] | 783 | @@ -3941,6 +4592,14 @@ |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 784 | &ett_ie_meas_res_no, |
| 785 | &ett_ie_message_id, |
| 786 | &ett_ie_sys_info_type, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 787 | + &ett_ie_speech_mode, |
| 788 | + &ett_ie_conn_stat, |
| 789 | + &ett_ie_conn_id, |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 790 | + &ett_ie_remote_ip, |
| 791 | + &ett_ie_remote_port, |
| 792 | + &ett_ie_local_port, |
| 793 | + &ett_ie_local_ip, |
Harald Welte | b47467a | 2009-07-12 20:46:43 +0200 | [diff] [blame] | 794 | + &ett_ie_rtp_payload, |
Harald Welte | 022d767 | 2009-06-10 05:42:52 +0800 | [diff] [blame] | 795 | }; |
| 796 | |
| 797 | /* Register the protocol name and description */ |