root/wireshark/rsl-ipaccess.patch
| Revision 2fb7ccf95f381534d08710bc5064ce1423a87384, 21.5 kB (checked in by Holger Hans Peter Freyther <zecke@selfish.org>, 4 months ago) | |
|---|---|
|
|
-
epan/dissectors/packet-rsl.c
From 8f35d623641dbba90e6186604c11e892bf515ecc Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther <zecke@selfish.org> Date: Mon, 19 Apr 2010 13:32:58 +0800 Subject: [PATCH 2/2] RSL patch --- epan/dissectors/packet-rsl.c | 522 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 515 insertions(+), 7 deletions(-) diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c index b10a671..a455cf3 100644
a b 2 2 * Routines for Radio Signalling Link (RSL) dissection. 3 3 * 4 4 * Copyright 2007, Anders Broman <anders.broman@ericsson.com> 5 * Copyright 2009, Harald Welte <laforge@gnumonks.org> 5 6 * 6 7 * $Id$ 7 8 * … … 42 43 #include <epan/lapd_sapi.h> 43 44 44 45 #include "packet-gsm_a_common.h" 46 #include "packet-rtp.h" 47 #include "packet-rtcp.h" 45 48 46 49 /* Initialize the protocol and registered fields */ 47 50 static int proto_rsl = -1; … … 115 118 static int hf_rsl_rtd = -1; 116 119 static int hf_rsl_delay_ind = -1; 117 120 static int hf_rsl_tfo = -1; 121 static int hf_rsl_speech_mode_s = -1; 122 static int hf_rsl_speech_mode_m = -1; 123 static int hf_rsl_conn_stat = -1; 124 static int hf_rsl_conn_id = -1; 125 static int hf_rsl_rtp_payload = -1; 126 static int hf_rsl_rtp_csd_fmt_d = -1; 127 static int hf_rsl_rtp_csd_fmt_ir = -1; 128 static int hf_rsl_local_port = -1; 129 static int hf_rsl_remote_port = -1; 130 static int hf_rsl_local_ip = -1; 131 static int hf_rsl_remote_ip = -1; 132 static int hf_rsl_cstat_tx_pkts = -1; 133 static int hf_rsl_cstat_tx_octs = -1; 134 static int hf_rsl_cstat_rx_pkts = -1; 135 static int hf_rsl_cstat_rx_octs = -1; 136 static int hf_rsl_cstat_lost_pkts = -1; 137 static int hf_rsl_cstat_ia_jitter = -1; 138 static int hf_rsl_cstat_avg_tx_dly = -1; 118 139 119 140 /* Initialize the subtree pointers */ 120 141 static int ett_rsl = -1; … … 172 193 static int ett_ie_meas_res_no = -1; 173 194 static int ett_ie_message_id = -1; 174 195 static int ett_ie_sys_info_type = -1; 196 static int ett_ie_speech_mode = -1; 197 static int ett_ie_conn_stat = -1; 198 static int ett_ie_conn_id = -1; 199 static int ett_ie_remote_ip = -1; 200 static int ett_ie_remote_port = -1; 201 static int ett_ie_local_port = -1; 202 static int ett_ie_local_ip = -1; 203 static int ett_ie_rtp_payload = -1; 204 175 205 176 206 proto_tree *top_tree; 177 207 dissector_handle_t gsm_a_ccch_handle; … … 207 237 { 0x06, "Common Channel Management messages" }, 208 238 { 0x08, "TRX Management messages" }, 209 239 { 0x16, "Location Services messages" }, 240 { 0x3f, "ip.access Vendor Specific messages" }, 210 241 { 0, NULL } 211 242 }; 243 #define RSL_MSGDISC_IPACCESS 0x3f 244 212 245 /* 213 246 * 9.2 MESSAGE TYPE 214 247 */ … … 275 308 /* 0 1 - - - - - - Location Services messages: */ 276 309 #define RSL_MSG_LOC_INF 65 /* 8.7.1 */ 277 310 311 /* Vendor-Specific messages of ip.access nanoBTS. There is no public documentation 312 * about those extensions, all information in this dissector is based on lawful 313 * protocol reverse enginering by Harald Welte <laforge@gnumonks.org> */ 314 #define RSL_MSG_TYPE_IPAC_MEAS_PP_DEF 0x60 315 #define RSL_MSG_TYPE_IPAC_HO_CAND_INQ 0x61 316 #define RSL_MSG_TYPE_IPAC_HO_CAND_RESP 0x62 317 318 #define RSL_MSG_TYPE_IPAC_PDCH_ACT 0x48 319 #define RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK 0x49 320 #define RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK 0x4a 321 #define RSL_MSG_TYPE_IPAC_PDCH_DEACT 0x4b 322 #define RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK 0x4c 323 #define RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK 0x4d 324 325 #define RSL_MSG_TYPE_IPAC_CRCX 0x70 326 #define RSL_MSG_TYPE_IPAC_CRCX_ACK 0x71 327 #define RSL_MSG_TYPE_IPAC_CRCX_NACK 0x72 328 #define RSL_MSG_TYPE_IPAC_MDCX 0x73 329 #define RSL_MSG_TYPE_IPAC_MDCX_ACK 0x74 330 #define RSL_MSG_TYPE_IPAC_MDCX_NACK 0x75 331 #define RSL_MSG_TYPE_IPAC_DLCX_IND 0x76 332 #define RSL_MSG_TYPE_IPAC_DLCX 0x77 333 #define RSL_MSG_TYPE_IPAC_DLCX_ACK 0x78 334 #define RSL_MSG_TYPE_IPAC_DLCX_NACK 0x79 335 336 #define RSL_IE_IPAC_SRTP_CONFIG 0xe0 337 #define RSL_IE_IPAC_PROXY_UDP 0xe1 338 #define RSL_IE_IPAC_BSCMPL_TOUT 0xe2 339 #define RSL_IE_IPAC_REMOTE_IP 0xf0 340 #define RSL_IE_IPAC_REMOTE_PORT 0xf1 341 #define RSL_IE_IPAC_RTP_PAYLOAD 0xf2 342 #define RSL_IE_IPAC_LOCAL_PORT 0xf3 343 #define RSL_IE_IPAC_SPEECH_MODE 0xf4 344 #define RSL_IE_IPAC_LOCAL_IP 0xf5 345 #define RSL_IE_IPAC_CONN_STAT 0xf6 346 #define RSL_IE_IPAC_HO_C_PARMS 0xf7 347 #define RSL_IE_IPAC_CONN_ID 0xf8 348 #define RSL_IE_IPAC_RTP_CSD_FMT 0xf9 349 #define RSL_IE_IPAC_RTP_JIT_BUF 0xfa 350 #define RSL_IE_IPAC_RTP_COMPR 0xfb 351 #define RSL_IE_IPAC_RTP_PAYLOAD2 0xfc 352 #define RSL_IE_IPAC_RTP_MPLEX 0xfd 353 #define RSL_IE_IPAC_RTP_MPLEX_ID 0xfe 278 354 279 355 static const value_string rsl_msg_type_vals[] = { 280 356 /* 0 0 0 0 - - - - Radio Link Layer Management messages: */ … … 337 413 { 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */ 338 414 /* 0 1 - - - - - - Location Services messages: */ 339 415 { 0x41, "Location Information" }, /* 8.7.1 */ 416 /* ip.access */ 417 { 0x48, "ip.access PDCH ACTIVATION" }, 418 { 0x49, "ip.access PDCH ACTIVATION ACK" }, 419 { 0x4a, "ip.access PDCH ACTIVATION NACK" }, 420 { 0x4b, "ip.access PDCH DEACTIVATION" }, 421 { 0x4c, "ip.access PDCH DEACTIVATION ACK" }, 422 { 0x4d, "ip.access PDCH DEACTIVATION NACK" }, 423 { 0x60, "ip.access MEASurement PREPROCessing DeFauLT" }, 424 { 0x61, "ip.access HANDOover CANDidate ENQuiry" }, 425 { 0x62, "ip.access HANDOover CANDidate RESPonse" }, 426 { 0x70, "ip.access CRCX" }, 427 { 0x71, "ip.access CRCX ACK" }, 428 { 0x72, "ip.access CRCX NACK" }, 429 { 0x73, "ip.access MDCX" }, 430 { 0x74, "ip.access MDCX ACK" }, 431 { 0x75, "ip.access MDCX NACK" }, 432 { 0x76, "ip.access DLCX INDication" }, 433 { 0x77, "ip.access DLCX" }, 434 { 0x78, "ip.access DLCX ACK" }, 435 { 0x79, "ip.access DLCX NACK" }, 340 436 { 0, NULL } 341 437 }; 342 438 … … 370 466 #define RSL_IE_MESSAGE_ID 28 371 467 372 468 #define RSL_IE_SYS_INFO_TYPE 30 373 374 375 376 469 #define RSL_IE_MS_POWER_PARAM 31 470 #define RSL_IE_BS_POWER_PARAM 32 471 #define RSL_IE_PREPROC_PARAM 33 472 #define RSL_IE_PREPROC_MEAS 34 377 473 #define RSL_IE_FULL_IMM_ASS_INF 35 378 474 #define RSL_IE_SMSCB_INF 36 379 475 #define RSL_IE_FULL_MS_TIMING_OFFSET 37 … … 476 572 Not used 477 573 478 574 */ 575 { 0xe0, "SRTP Configuration" }, 576 { 0xe1, "BSC Proxy UDP Port" }, 577 { 0xe2, "BSC Multiplex Timeout" }, 578 { 0xf0, "Remote IP Address" }, 579 { 0xf1, "Remote RTP Port" }, 580 { 0xf2, "RTP Payload Type" }, 581 { 0xf3, "Local RTP Port" }, 582 { 0xf4, "Speech Mode" }, 583 { 0xf5, "Local IP Address" }, 584 { 0xf6, "Connection Statistics" }, 585 { 0xf7, "Handover C Parameters" }, 586 { 0xf8, "Connection Identifier" }, 587 { 0xf9, "RTP CSD Format" }, 588 { 0xfa, "RTP Jitter Buffer" }, 589 { 0xfb, "RTP Compression" }, 590 { 0xfc, "RTP Payload Type 2" }, 591 { 0xfd, "RTP Multiplex" }, 592 { 0xfe, "RTP Multiplex Identifier" }, 479 593 { 0, NULL } 480 594 }; 481 595 … … 512 626 { 0, NULL } 513 627 }; 514 628 629 /* From openbsc/include/openbsc/tlv.h */ 630 enum tlv_type { 631 TLV_TYPE_FIXED, 632 TLV_TYPE_T, 633 TLV_TYPE_TV, 634 TLV_TYPE_TLV, 635 TLV_TYPE_TL16V, 636 }; 637 638 struct tlv_def { 639 enum tlv_type type; 640 u_int8_t fixed_len; 641 }; 642 643 struct tlv_definition { 644 struct tlv_def def[0xff]; 645 }; 646 647 static const struct tlv_definition rsl_att_tlvdef = { 648 .def = { 649 [RSL_IE_CH_NO] = { TLV_TYPE_TV, 0 }, 650 [RSL_IE_LINK_ID] = { TLV_TYPE_TV, 0 }, 651 [RSL_IE_ACT_TYPE] = { TLV_TYPE_TV, 0 }, 652 [RSL_IE_BS_POW] = { TLV_TYPE_TV, 0 }, 653 [RSL_IE_CH_ID] = { TLV_TYPE_TLV, 0 }, 654 [RSL_IE_CH_MODE] = { TLV_TYPE_TLV, 0 }, 655 [RSL_IE_ENC_INF] = { TLV_TYPE_TLV, 0 }, 656 [RSL_IE_FRAME_NO] = { TLV_TYPE_FIXED, 2 }, 657 [RSL_IE_HO_REF] = { TLV_TYPE_TV, 0 }, 658 [RSL_IE_L1_INF] = { TLV_TYPE_FIXED, 2 }, 659 [RSL_IE_L3_INF] = { TLV_TYPE_TL16V, 0 }, 660 [RSL_IE_MS_ID] = { TLV_TYPE_TLV, 0 }, 661 [RSL_IE_MS_POW] = { TLV_TYPE_TV, 0 }, 662 [RSL_IE_PAGING_GRP] = { TLV_TYPE_TV, 0 }, 663 [RSL_IE_PAGING_LOAD] = { TLV_TYPE_FIXED, 2 }, 664 [RSL_IE_PHY_CTX] = { TLV_TYPE_TLV, 0 }, 665 [RSL_IE_ACCESS_DELAY] = { TLV_TYPE_TV, 0 }, 666 [RSL_IE_RACH_LOAD] = { TLV_TYPE_TLV, 0 }, 667 [RSL_IE_REQ_REF] = { TLV_TYPE_FIXED, 3 }, 668 [RSL_IE_REL_MODE] = { TLV_TYPE_TV, 0 }, 669 [RSL_IE_RESOURCE_INF] = { TLV_TYPE_TLV, 0 }, 670 [RSL_IE_RLM_CAUSE] = { TLV_TYPE_TLV, 0 }, 671 [RSL_IE_STARTING_TIME] = { TLV_TYPE_FIXED, 2 }, 672 [RSL_IE_TIMING_ADV] = { TLV_TYPE_TV, 0 }, 673 [RSL_IE_UPLINK_MEAS] = { TLV_TYPE_TLV, 0 }, 674 [RSL_IE_CAUSE] = { TLV_TYPE_TLV, 0 }, 675 [RSL_IE_MEAS_RES_NO] = { TLV_TYPE_TV, 0 }, 676 [RSL_IE_MESSAGE_ID] = { TLV_TYPE_TV, 0 }, 677 [RSL_IE_SYS_INFO_TYPE] = { TLV_TYPE_TV, 0 }, 678 [RSL_IE_MS_POWER_PARAM] = { TLV_TYPE_TLV, 0 }, 679 [RSL_IE_BS_POWER_PARAM] = { TLV_TYPE_TLV, 0 }, 680 [RSL_IE_PREPROC_PARAM] = { TLV_TYPE_TLV, 0 }, 681 [RSL_IE_PREPROC_MEAS] = { TLV_TYPE_TLV, 0 }, 682 //[RSL_IE_IMM_ASS_INFO] = { TLV_TYPE_TLV, 0 }, 683 //[RSL_IE_SMSCB_INFO] = { TLV_TYPE_FIXED, 23 }, 684 //[RSL_IE_MS_TIMING_OFFSET] = { TLV_TYPE_TV, 0 }, 685 [RSL_IE_ERR_MSG] = { TLV_TYPE_TLV, 0 }, 686 [RSL_IE_FULL_BCCH_INF] = { TLV_TYPE_TLV, 0 }, 687 [RSL_IE_CH_NEEDED] = { TLV_TYPE_TV, 0 }, 688 [RSL_IE_CB_CMD_TYPE] = { TLV_TYPE_TV, 0 }, 689 [RSL_IE_SMSCB_MESS] = { TLV_TYPE_TLV, 0 }, 690 [RSL_IE_FULL_IMM_ASS_INF] = { TLV_TYPE_TLV, 0 }, 691 //[RSL_IE_SACCH_INFO] = { TLV_TYPE_TLV, 0 }, 692 [RSL_IE_CBCH_LOAD_INF] = { TLV_TYPE_TV, 0 }, 693 [RSL_IE_SMSCB_CH_IND] = { TLV_TYPE_TV, 0 }, 694 [RSL_IE_GRP_CALL_REF] = { TLV_TYPE_TLV, 0 }, 695 [RSL_IE_CH_DESC] = { TLV_TYPE_TLV, 0 }, 696 [RSL_IE_NCH_DRX_INF] = { TLV_TYPE_TLV, 0 }, 697 [RSL_IE_CMD_IND] = { TLV_TYPE_TLV, 0 }, 698 [RSL_IE_EMLPP_PRIO] = { TLV_TYPE_TV, 0 }, 699 [RSL_IE_UIC] = { TLV_TYPE_TLV, 0 }, 700 [RSL_IE_MAIN_CH_REF] = { TLV_TYPE_TV, 0 }, 701 [RSL_IE_MULTIRATE_CONF] = { TLV_TYPE_TLV, 0 }, 702 [RSL_IE_MULTIRATE_CNTRL] = { TLV_TYPE_TV, 0 }, 703 [RSL_IE_SUP_CODEC_TYPES] = { TLV_TYPE_TLV, 0 }, 704 [RSL_IE_CODEC_CONF] = { TLV_TYPE_TLV, 0 }, 705 [RSL_IE_RTD] = { TLV_TYPE_TV, 0 }, 706 [RSL_IE_TFO_STATUS] = { TLV_TYPE_TV, 0 }, 707 [RSL_IE_LLP_APDU] = { TLV_TYPE_TLV, 0 }, 708 [RSL_IE_IPAC_REMOTE_IP] = { TLV_TYPE_FIXED, 4 }, 709 [RSL_IE_IPAC_REMOTE_PORT] = { TLV_TYPE_FIXED, 2 }, 710 [RSL_IE_IPAC_LOCAL_IP] = { TLV_TYPE_FIXED, 4 }, 711 [RSL_IE_IPAC_CONN_STAT] = { TLV_TYPE_TLV, 0 }, 712 [RSL_IE_IPAC_LOCAL_PORT] = { TLV_TYPE_FIXED, 2 }, 713 [RSL_IE_IPAC_SPEECH_MODE] = { TLV_TYPE_TV, 0 }, 714 [RSL_IE_IPAC_CONN_ID] = { TLV_TYPE_FIXED, 2 }, 715 [RSL_IE_IPAC_RTP_PAYLOAD2] = { TLV_TYPE_TV, 0 }, 716 }, 717 }; 718 515 719 /* 9.3.1 Channel number 9.3.1 M TV 2 */ 516 720 static int 517 721 dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) … … 2042 2246 proto_item_set_len(ti, length+2); 2043 2247 2044 2248 proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, FALSE); 2045 offset++;2046 2249 2047 2250 /* Received Message */ 2048 2251 offset = dissct_rsl_msg(tvb, pinfo, ie_tree, offset); … … 2907 3110 } 2908 3111 2909 3112 static int 3113 dissct_rsl_ipaccess_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) 3114 { 3115 guint8 msg_type; 3116 guint32 local_addr = 0; 3117 guint16 local_port = 0; 3118 address src_addr; 3119 3120 msg_type = tvb_get_guint8(tvb, offset)&0x7f; 3121 offset++; 3122 3123 #if 0 3124 switch (msg_type) { 3125 case RSL_MSG_TYPE_IPAC_CRCX: 3126 case RSL_MSG_TYPE_IPAC_CRCX_ACK: 3127 case RSL_MSG_TYPE_IPAC_CRCX_NACK: 3128 case RSL_MSG_TYPE_IPAC_MDCX: 3129 case RSL_MSG_TYPE_IPAC_MDCX_ACK: 3130 case RSL_MSG_TYPE_IPAC_MDCX_NACK: 3131 case RSL_MSG_TYPE_IPAC_DLCX_IND: 3132 case RSL_MSG_TYPE_IPAC_DLCX: 3133 case RSL_MSG_TYPE_IPAC_DLCX_ACK: 3134 case RSL_MSG_TYPE_IPAC_DLCX_NACK: 3135 case RSL_MSG_TYPE_IPAC_PDCH_ACT: 3136 case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: 3137 case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: 3138 case RSL_MSG_TYPE_IPAC_PDCH_DEACT: 3139 case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: 3140 case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: 3141 /* Channel number 9.3.1 M TV 2 */ 3142 offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE); 3143 break; 3144 } 3145 #endif 3146 /* parse TLV attributes */ 3147 while (tvb_reported_length_remaining(tvb, offset) != 0) { 3148 guint8 tag; 3149 unsigned int len, hlen, len_len; 3150 const struct tlv_def *tdef; 3151 proto_item *ti; 3152 proto_tree *ie_tree; 3153 3154 tag = tvb_get_guint8(tvb, offset); 3155 tdef = &rsl_att_tlvdef.def[tag]; 3156 3157 switch (tdef->type) { 3158 case TLV_TYPE_FIXED: 3159 hlen = 1; 3160 len_len = 0; 3161 len = tdef->fixed_len; 3162 break; 3163 case TLV_TYPE_T: 3164 hlen = 1; 3165 len_len = 0; 3166 len = 0; 3167 break; 3168 case TLV_TYPE_TV: 3169 hlen = 1; 3170 len_len = 0; 3171 len = 1; 3172 break; 3173 case TLV_TYPE_TLV: 3174 hlen = 2; 3175 len_len = 1; 3176 len = tvb_get_guint8(tvb, offset+1); 3177 break; 3178 case TLV_TYPE_TL16V: 3179 hlen = 3; 3180 len_len = 2; 3181 len = tvb_get_guint8(tvb, offset+1) << 8 | 3182 tvb_get_guint8(tvb, offset+2); 3183 break; 3184 default: 3185 hlen = len_len = len = 0; 3186 DISSECTOR_ASSERT_NOT_REACHED(); 3187 break; 3188 } 3189 3190 ti = proto_tree_add_item(tree, hf_rsl_ie_id, tvb, offset, 1, FALSE); 3191 ie_tree = proto_item_add_subtree(ti, ett_ie_local_port); 3192 offset += hlen; 3193 3194 switch (tag) { 3195 case RSL_IE_CH_NO: 3196 dissect_rsl_ie_ch_no(tvb, pinfo, ie_tree, offset, FALSE); 3197 break; 3198 case RSL_IE_FRAME_NO: 3199 dissect_rsl_ie_frame_no(tvb, pinfo, ie_tree, offset, FALSE); 3200 break; 3201 case RSL_IE_MS_POW: 3202 dissect_rsl_ie_ms_pow(tvb, pinfo, ie_tree, offset, FALSE); 3203 break; 3204 case RSL_IE_IPAC_REMOTE_IP: 3205 proto_tree_add_item(ie_tree, hf_rsl_remote_ip, tvb, 3206 offset, len, FALSE); 3207 break; 3208 case RSL_IE_IPAC_REMOTE_PORT: 3209 proto_tree_add_item(ie_tree, hf_rsl_remote_port, tvb, 3210 offset, len, FALSE); 3211 break; 3212 case RSL_IE_IPAC_LOCAL_IP: 3213 proto_tree_add_item(ie_tree, hf_rsl_local_ip, tvb, 3214 offset, len, FALSE); 3215 local_addr = tvb_get_ipv4(tvb, offset); 3216 break; 3217 case RSL_IE_IPAC_LOCAL_PORT: 3218 proto_tree_add_item(ie_tree, hf_rsl_local_port, tvb, 3219 offset, len, FALSE); 3220 local_port = tvb_get_ntohs(tvb, offset); 3221 break; 3222 case RSL_IE_IPAC_SPEECH_MODE: 3223 proto_tree_add_item(ie_tree, hf_rsl_speech_mode_s, tvb, 3224 offset, len, FALSE); 3225 proto_tree_add_item(ie_tree, hf_rsl_speech_mode_m, tvb, 3226 offset, len, FALSE); 3227 break; 3228 case RSL_IE_IPAC_RTP_PAYLOAD: 3229 case RSL_IE_IPAC_RTP_PAYLOAD2: 3230 proto_tree_add_item(ie_tree, hf_rsl_rtp_payload, tvb, 3231 offset, len, FALSE); 3232 break; 3233 case RSL_IE_IPAC_RTP_CSD_FMT: 3234 proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_d, tvb, 3235 offset, len, FALSE); 3236 proto_tree_add_item(ie_tree, hf_rsl_rtp_csd_fmt_ir, tvb, 3237 offset, len, FALSE); 3238 break; 3239 case RSL_IE_IPAC_CONN_ID: 3240 proto_tree_add_item(ie_tree, hf_rsl_conn_id, tvb, 3241 offset, len, FALSE); 3242 break; 3243 case RSL_IE_IPAC_CONN_STAT: 3244 proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_pkts, tvb, 3245 offset, 4, FALSE); 3246 proto_tree_add_item(ie_tree, hf_rsl_cstat_tx_octs, tvb, 3247 offset+4, 4, FALSE); 3248 proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_pkts, tvb, 3249 offset+8, 4, FALSE); 3250 proto_tree_add_item(ie_tree, hf_rsl_cstat_rx_octs, tvb, 3251 offset+12, 4, FALSE); 3252 proto_tree_add_item(ie_tree, hf_rsl_cstat_lost_pkts, tvb, 3253 offset+16, 4, FALSE); 3254 proto_tree_add_item(ie_tree, hf_rsl_cstat_ia_jitter, tvb, 3255 offset+20, 4, FALSE); 3256 proto_tree_add_item(ie_tree, hf_rsl_cstat_avg_tx_dly, tvb, 3257 offset+24, 4, FALSE); 3258 break; 3259 } 3260 offset += len; 3261 } 3262 3263 switch (msg_type) { 3264 case RSL_MSG_TYPE_IPAC_CRCX_ACK: 3265 /* Notify the RTP and RTCP dissectors about a new RTP stream */ 3266 src_addr.type = AT_IPv4; 3267 src_addr.len = 4; 3268 src_addr.data = (guint8 *)&local_addr; 3269 rtp_add_address(pinfo, &src_addr, local_port, 0, 3270 "GSM A-bis/IP", pinfo->fd->num, 0, NULL); 3271 rtcp_add_address(pinfo, &src_addr, local_port+1, 0, 3272 "GSM A-bis/IP", pinfo->fd->num); 3273 break; 3274 } 3275 return offset; 3276 } 3277 3278 static int 2910 3279 dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) 2911 3280 { 2912 guint8 msg_ type;3281 guint8 msg_disc, msg_type; 2913 3282 3283 msg_disc = tvb_get_guint8(tvb, offset++) >> 1; 2914 3284 msg_type = tvb_get_guint8(tvb,offset)&0x7f; 2915 3285 proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, FALSE); 3286 3287 if (msg_disc == RSL_MSGDISC_IPACCESS) { 3288 offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset); 3289 return offset; 3290 } 2916 3291 offset++; 2917 3292 2918 3293 switch (msg_type){ … … 3480 3855 /* LLP APDU 9.3.58 M LV 2-N */ 3481 3856 offset = dissect_rsl_ie_llp_apdu(tvb, pinfo, tree, offset, TRUE); 3482 3857 break; 3858 /* the following messages are ip.access specific but sent without 3859 * ip.access memssage discriminator */ 3860 case RSL_MSG_TYPE_IPAC_MEAS_PP_DEF: 3861 case RSL_MSG_TYPE_IPAC_HO_CAND_INQ: 3862 case RSL_MSG_TYPE_IPAC_HO_CAND_RESP: 3863 case RSL_MSG_TYPE_IPAC_PDCH_ACT: 3864 case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: 3865 case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: 3866 case RSL_MSG_TYPE_IPAC_PDCH_DEACT: 3867 case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: 3868 case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: 3869 offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset-1); 3483 3870 default: 3484 3871 break; 3485 3872 } … … 3487 3874 return offset; 3488 3875 3489 3876 } 3877 3878 static const value_string rsl_ipacc_spm_s_vals[] = { 3879 { 0, "GSM FR codec (GSM type 1, FS)" }, 3880 { 1, "GSM EFR codec (GSM type 2, FS)" }, 3881 { 2, "GSM AMR/FR codec (GSM type 3, FS)" }, 3882 { 3, "GSM HR codec (GSM type 1, HS)" }, 3883 { 5, "GSM AMR/HR codec (GSM type 3, HS)" }, 3884 { 0xf, "As specified by RTP Payload Type IE" }, 3885 { 0, NULL } 3886 }; 3887 3888 static const value_string rsl_ipacc_spm_m_vals[] = { 3889 { 0, "Send and Receive" }, 3890 { 1, "Receive Only" }, 3891 { 2, "Send Only" }, 3892 { 0, NULL } 3893 }; 3894 3895 static const value_string rsl_ipacc_rtp_csd_fmt_d_vals[] = { 3896 { 0, "External TRAU format" }, 3897 { 1, "Non-TRAU Packed format" }, 3898 { 2, "TRAU within the BTS" }, 3899 { 3, "IWF-Free BTS-BTS Data" }, 3900 { 0, NULL } 3901 }; 3902 3903 static const value_string rsl_ipacc_rtp_csd_fmt_ir_vals[] = { 3904 { 0, "8kb/s" }, 3905 { 1, "16kb/s" }, 3906 { 2, "32kb/s" }, 3907 { 3, "64kb/s" }, 3908 { 0, NULL } 3909 }; 3910 3490 3911 static void 3491 3912 dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 3492 3913 { … … 3514 3935 /* 9.1 Message discriminator */ 3515 3936 proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, FALSE); 3516 3937 proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, FALSE); 3517 offset++;3518 3938 3519 3939 offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset); 3520 3940 … … 3884 4304 FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03, 3885 4305 NULL, HFILL } 3886 4306 }, 4307 { &hf_rsl_speech_mode_s, 4308 { "ip.access Speech Mode S", "rsl.ipacc.speech_mode_s", 4309 FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_s_vals), 4310 0xf, NULL, HFILL } 4311 }, 4312 { &hf_rsl_speech_mode_m, 4313 { "ip.access Speech Mode M", "rsl.ipacc.speech_mode_m", 4314 FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_m_vals), 4315 0xf0, NULL, HFILL } 4316 }, 4317 { &hf_rsl_conn_stat, 4318 { "ip.access Connection Statistics","rsl.ipacc.conn_stat", 4319 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } 4320 }, 4321 { &hf_rsl_conn_id, 4322 { "ip.access Connection ID", "rsl.ipacc.conn_id", 4323 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } 4324 }, 4325 { &hf_rsl_rtp_payload, 4326 { "ip.access RTP Payload Type", "rsl.ipacc.rtp_payload", 4327 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } 4328 }, 4329 { &hf_rsl_rtp_csd_fmt_d, 4330 { "ip.access RTP CSD Format D", "rsl.ipacc.rtp_csd_fmt_d", 4331 FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_d_vals), 4332 0x0f, NULL, HFILL }, 4333 }, 4334 { &hf_rsl_rtp_csd_fmt_ir, 4335 { "ip.access RTP CSD Format IR", "rsl.ipacc.rtp_csd_fmt_ir", 4336 FT_UINT8, BASE_HEX, VALS(rsl_ipacc_rtp_csd_fmt_ir_vals), 4337 0xf0, NULL, HFILL }, 4338 }, 4339 { &hf_rsl_local_port, 4340 { "ip.access Local RTP Port", "rsl.ipacc.local_port", 4341 FT_UINT16, BASE_DEC, NULL, 0x0, 4342 "ip.access Local RTP Port", HFILL }, 4343 }, 4344 { &hf_rsl_remote_port, 4345 { "ip.access Remote RTP Port", "rsl.ipacc.remote_port", 4346 FT_UINT16, BASE_DEC, NULL, 0x0, 4347 "ip.access Remote RTP Port", HFILL }, 4348 }, 4349 { &hf_rsl_local_ip, 4350 { "ip.access Local IP Address", "rsl.ipacc.local_ip", 4351 FT_IPv4, BASE_NONE, NULL, 0x0, 4352 "ip.access Local IP Address", HFILL }, 4353 }, 4354 { &hf_rsl_remote_ip, 4355 { "ip.access Remote IP Address", "rsl.ipacc.remote_ip", 4356 FT_IPv4, BASE_NONE, NULL, 0x0, 4357 "ip.access Remote IP Address", HFILL }, 4358 }, 4359 { &hf_rsl_cstat_tx_pkts, 4360 { "Packets Sent", "rsl.ipacc.cstat.tx_pkts", 4361 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } 4362 }, 4363 { &hf_rsl_cstat_tx_octs, 4364 { "Octets Sent", "rsl.ipacc.cstat.tx_octets", 4365 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } 4366 }, 4367 { &hf_rsl_cstat_rx_pkts, 4368 { "Packets Received", "rsl.ipacc.cstat.rx_pkts", 4369 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } 4370 }, 4371 { &hf_rsl_cstat_rx_octs, 4372 { "Octets Received", "rsl.ipacc.cstat.rx_octets", 4373 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } 4374 }, 4375 { &hf_rsl_cstat_lost_pkts, 4376 { "Packets Lost", "rsl.ipacc.cstat.lost_pkts", 4377 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } 4378 }, 4379 { &hf_rsl_cstat_ia_jitter, 4380 { "Inter-arrival Jitter", "rsl.ipacc.cstat.ia_jitter", 4381 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } 4382 }, 4383 { &hf_rsl_cstat_avg_tx_dly, 4384 { "Average Tx Delay", "rsl.ipacc.cstat.avg_tx_delay", 4385 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } 4386 }, 3887 4387 }; 3888 4388 static gint *ett[] = { 3889 4389 &ett_rsl, … … 3941 4441 &ett_ie_meas_res_no, 3942 4442 &ett_ie_message_id, 3943 4443 &ett_ie_sys_info_type, 4444 &ett_ie_speech_mode, 4445 &ett_ie_conn_stat, 4446 &ett_ie_conn_id, 4447 &ett_ie_remote_ip, 4448 &ett_ie_remote_port, 4449 &ett_ie_local_port, 4450 &ett_ie_local_ip, 4451 &ett_ie_rtp_payload, 3944 4452 }; 3945 4453 3946 4454 /* Register the protocol name and description */
Note: See TracBrowser
for help on using the browser.
