diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-09-06 21:09:05 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-09-06 21:09:34 +0200 |
commit | 7c78c479aca4475761570db24abd202cfcfcdc9d (patch) | |
tree | 0bfb6fc94e7b1ee9536cb0f3be21fe7cd360d223 /wireshark/0004-rsl-ipaccess.patch | |
parent | d02e68b24dff1bdc0691d4599306556875b84805 (diff) |
update wireshark patches to current wireshark svn
Diffstat (limited to 'wireshark/0004-rsl-ipaccess.patch')
-rw-r--r-- | wireshark/0004-rsl-ipaccess.patch | 319 |
1 files changed, 151 insertions, 168 deletions
diff --git a/wireshark/0004-rsl-ipaccess.patch b/wireshark/0004-rsl-ipaccess.patch index e68c36261..992d130dc 100644 --- a/wireshark/0004-rsl-ipaccess.patch +++ b/wireshark/0004-rsl-ipaccess.patch @@ -9,21 +9,13 @@ Add vendor specific commands for RSL. epan/dissectors/packet-rsl.c | 544 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 536 insertions(+), 8 deletions(-) -diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c -index bf83f6f..213ae28 100644 ---- a/epan/dissectors/packet-rsl.c -+++ b/epan/dissectors/packet-rsl.c -@@ -2,6 +2,7 @@ - * Routines for Radio Signalling Link (RSL) dissection. - * - * Copyright 2007, Anders Broman <anders.broman@ericsson.com> -+ * Copyright 2009, Harald Welte <laforge@gnumonks.org> - * - * $Id$ - * -@@ -40,8 +41,11 @@ +Index: wireshark/epan/dissectors/packet-rsl.c +=================================================================== +--- wireshark.orig/epan/dissectors/packet-rsl.c 2011-09-06 12:29:45.000000000 +0200 ++++ wireshark/epan/dissectors/packet-rsl.c 2011-09-06 13:25:12.000000000 +0200 +@@ -39,8 +39,11 @@ + #include <epan/packet.h> - #include <epan/proto.h> #include <epan/lapd_sapi.h> +#include <epan/prefs.h> @@ -32,33 +24,34 @@ index bf83f6f..213ae28 100644 +#include "packet-rtcp.h" /* Initialize the protocol and registered fields */ - static int proto_rsl = -1; -@@ -116,6 +120,24 @@ static int hf_rsl_emlpp_prio = -1; - static int hf_rsl_rtd = -1; - static int hf_rsl_delay_ind = -1; - static int hf_rsl_tfo = -1; -+static int hf_rsl_speech_mode_s = -1; -+static int hf_rsl_speech_mode_m = -1; -+static int hf_rsl_conn_stat = -1; -+static int hf_rsl_conn_id = -1; -+static int hf_rsl_rtp_payload = -1; -+static int hf_rsl_rtp_csd_fmt_d = -1; -+static int hf_rsl_rtp_csd_fmt_ir = -1; -+static int hf_rsl_local_port = -1; -+static int hf_rsl_remote_port = -1; -+static int hf_rsl_local_ip = -1; -+static int hf_rsl_remote_ip = -1; -+static int hf_rsl_cstat_tx_pkts = -1; -+static int hf_rsl_cstat_tx_octs = -1; -+static int hf_rsl_cstat_rx_pkts = -1; -+static int hf_rsl_cstat_rx_octs = -1; -+static int hf_rsl_cstat_lost_pkts = -1; -+static int hf_rsl_cstat_ia_jitter = -1; -+static int hf_rsl_cstat_avg_tx_dly = -1; + static int proto_rsl = -1; +@@ -115,6 +118,25 @@ + static int hf_rsl_rtd = -1; + static int hf_rsl_delay_ind = -1; + static int hf_rsl_tfo = -1; ++static int hf_rsl_speech_mode_s = -1; ++static int hf_rsl_speech_mode_m = -1; ++static int hf_rsl_conn_stat = -1; ++static int hf_rsl_conn_id = -1; ++static int hf_rsl_rtp_payload = -1; ++static int hf_rsl_rtp_csd_fmt_d = -1; ++static int hf_rsl_rtp_csd_fmt_ir = -1; ++static int hf_rsl_local_port = -1; ++static int hf_rsl_remote_port = -1; ++static int hf_rsl_local_ip = -1; ++static int hf_rsl_remote_ip = -1; ++static int hf_rsl_cstat_tx_pkts = -1; ++static int hf_rsl_cstat_tx_octs = -1; ++static int hf_rsl_cstat_rx_pkts = -1; ++static int hf_rsl_cstat_rx_octs = -1; ++static int hf_rsl_cstat_lost_pkts = -1; ++static int hf_rsl_cstat_ia_jitter = -1; ++static int hf_rsl_cstat_avg_tx_dly = -1; ++ /* Initialize the subtree pointers */ static int ett_rsl = -1; -@@ -173,6 +195,15 @@ static int ett_ie_cause = -1; +@@ -172,6 +194,15 @@ static int ett_ie_meas_res_no = -1; static int ett_ie_message_id = -1; static int ett_ie_sys_info_type = -1; @@ -74,7 +67,7 @@ index bf83f6f..213ae28 100644 static proto_tree *top_tree; static dissector_handle_t gsm_a_ccch_handle; -@@ -180,6 +211,9 @@ static dissector_handle_t gsm_a_dtap_handle; +@@ -179,6 +210,9 @@ static gboolean is_si2q = FALSE; @@ -84,21 +77,20 @@ index bf83f6f..213ae28 100644 /* Forward declarations */ static int dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset); -@@ -208,8 +242,11 @@ static const value_string rsl_msg_disc_vals[] = { - { 0x06, "Common Channel Management messages" }, - { 0x08, "TRX Management messages" }, - { 0x16, "Location Services messages" }, -+ { 0x3f, "ip.access Vendor Specific messages" }, - { 0, NULL } +@@ -208,8 +242,10 @@ + { 0x06, "Common Channel Management messages" }, + { 0x08, "TRX Management messages" }, + { 0x16, "Location Services messages" }, ++ { 0x3f, "ip.access Vendor Specific messages" }, + { 0, NULL } }; +#define RSL_MSGDISC_IPACCESS 0x3f -+ /* * 9.2 MESSAGE TYPE */ -@@ -276,6 +313,49 @@ static const value_string rsl_msg_disc_vals[] = { - /* 0 1 - - - - - - Location Services messages: */ - #define RSL_MSG_LOC_INF 65 /* 8.7.1 */ +@@ -277,6 +313,49 @@ + /* 0 1 - - - - - - Location Services messages: */ + #define RSL_MSG_LOC_INF 65 /* 8.7.1 */ +/* Vendor-Specific messages of ip.access nanoBTS. There is no public documentation + * about those extensions, all information in this dissector is based on lawful @@ -145,39 +137,38 @@ index bf83f6f..213ae28 100644 +#define RSL_IE_IPAC_RTP_MPLEX_ID 0xfe static const value_string rsl_msg_type_vals[] = { - /* 0 0 0 0 - - - - Radio Link Layer Management messages: */ -@@ -338,6 +418,26 @@ static const value_string rsl_msg_type_vals[] = { - { 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */ - /* 0 1 - - - - - - Location Services messages: */ - { 0x41, "Location Information" }, /* 8.7.1 */ -+ /* ip.access */ -+ { 0x48, "ip.access PDCH ACTIVATION" }, -+ { 0x49, "ip.access PDCH ACTIVATION ACK" }, -+ { 0x4a, "ip.access PDCH ACTIVATION NACK" }, -+ { 0x4b, "ip.access PDCH DEACTIVATION" }, -+ { 0x4c, "ip.access PDCH DEACTIVATION ACK" }, -+ { 0x4d, "ip.access PDCH DEACTIVATION NACK" }, -+ { 0x60, "ip.access MEASurement PREPROCessing DeFauLT" }, -+ { 0x61, "ip.access HANDOover CANDidate ENQuiry" }, -+ { 0x62, "ip.access HANDOover CANDidate RESPonse" }, -+ { 0x70, "ip.access CRCX" }, -+ { 0x71, "ip.access CRCX ACK" }, -+ { 0x72, "ip.access CRCX NACK" }, -+ { 0x73, "ip.access MDCX" }, -+ { 0x74, "ip.access MDCX ACK" }, -+ { 0x75, "ip.access MDCX NACK" }, -+ { 0x76, "ip.access DLCX INDication" }, -+ { 0x77, "ip.access DLCX" }, -+ { 0x78, "ip.access DLCX ACK" }, -+ { 0x79, "ip.access DLCX NACK" }, - { 0, NULL } + /* 0 0 0 0 - - - - Radio Link Layer Management messages: */ +@@ -339,6 +418,26 @@ + { 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */ + /* 0 1 - - - - - - Location Services messages: */ + { 0x41, "Location Information" }, /* 8.7.1 */ ++ /* ip.access */ ++ { 0x48, "ip.access PDCH ACTIVATION" }, ++ { 0x49, "ip.access PDCH ACTIVATION ACK" }, ++ { 0x4a, "ip.access PDCH ACTIVATION NACK" }, ++ { 0x4b, "ip.access PDCH DEACTIVATION" }, ++ { 0x4c, "ip.access PDCH DEACTIVATION ACK" }, ++ { 0x4d, "ip.access PDCH DEACTIVATION NACK" }, ++ { 0x60, "ip.access MEASurement PREPROCessing DeFauLT" }, ++ { 0x61, "ip.access HANDOover CANDidate ENQuiry" }, ++ { 0x62, "ip.access HANDOover CANDidate RESPonse" }, ++ { 0x70, "ip.access CRCX" }, ++ { 0x71, "ip.access CRCX ACK" }, ++ { 0x72, "ip.access CRCX NACK" }, ++ { 0x73, "ip.access MDCX" }, ++ { 0x74, "ip.access MDCX ACK" }, ++ { 0x75, "ip.access MDCX NACK" }, ++ { 0x76, "ip.access DLCX INDication" }, ++ { 0x77, "ip.access DLCX" }, ++ { 0x78, "ip.access DLCX ACK" }, ++ { 0x79, "ip.access DLCX NACK" }, + { 0, NULL } }; -@@ -371,10 +471,10 @@ static const value_string rsl_msg_type_vals[] = { - #define RSL_IE_MESSAGE_ID 28 +@@ -373,9 +472,10 @@ + + #define RSL_IE_SYS_INFO_TYPE 30 - #define RSL_IE_SYS_INFO_TYPE 30 -- - - - @@ -185,13 +176,13 @@ index bf83f6f..213ae28 100644 +#define RSL_IE_BS_POWER_PARAM 32 +#define RSL_IE_PREPROC_PARAM 33 +#define RSL_IE_PREPROC_MEAS 34 - #define RSL_IE_FULL_IMM_ASS_INF 35 - #define RSL_IE_SMSCB_INF 36 - #define RSL_IE_FULL_MS_TIMING_OFFSET 37 -@@ -477,6 +577,24 @@ static const value_string rsl_ie_type_vals[] = { - Not used + #define RSL_IE_FULL_IMM_ASS_INF 35 + #define RSL_IE_SMSCB_INF 36 + #define RSL_IE_FULL_MS_TIMING_OFFSET 37 +@@ -478,6 +578,24 @@ + Not used - */ + */ + { 0xe0, "SRTP Configuration" }, + { 0xe1, "BSC Proxy UDP Port" }, + { 0xe2, "BSC Multiplex Timeout" }, @@ -210,11 +201,11 @@ index bf83f6f..213ae28 100644 + { 0xfc, "RTP Payload Type 2" }, + { 0xfd, "RTP Multiplex" }, + { 0xfe, "RTP Multiplex Identifier" }, - { 0, NULL } + { 0, NULL } }; -@@ -513,6 +631,27 @@ static const value_string rsl_ch_no_Cbits_vals[] = { - { 0, NULL } +@@ -514,6 +632,27 @@ + { 0, NULL } }; +/* From openbsc/include/openbsc/tlv.h */ @@ -238,18 +229,10 @@ index bf83f6f..213ae28 100644 +/* This structure is initialized in proto_register_rsl() */ +static struct tlv_definition rsl_att_tlvdef; + - /* 9.3.1 Channel number 9.3.1 M TV 2 */ + /* 9.3.1 Channel number 9.3.1 M TV 2 */ static int dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory) -@@ -2045,7 +2184,6 @@ dissect_rsl_ie_err_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int - proto_item_set_len(ti, length+2); - - proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, FALSE); -- offset++; - - /* Received Message */ - offset = dissct_rsl_msg(tvb, pinfo, ie_tree, offset); -@@ -2910,12 +3048,184 @@ dissect_rsl_ie_tfo_transp_cont(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree +@@ -2918,12 +3057,184 @@ } static int @@ -421,41 +404,41 @@ index bf83f6f..213ae28 100644 +static int dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) { -- guint8 msg_type; -+ guint8 msg_disc, msg_type; +- guint8 msg_type; ++ guint8 msg_disc, msg_type; -+ msg_disc = tvb_get_guint8(tvb, offset++) >> 1; - msg_type = tvb_get_guint8(tvb,offset)&0x7f; - proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, FALSE); ++ msg_disc = tvb_get_guint8(tvb, offset++) >> 1; + msg_type = tvb_get_guint8(tvb,offset)&0x7f; + proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN); + -+ if (msg_disc == RSL_MSGDISC_IPACCESS) { -+ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset); -+ return offset; -+ } - offset++; ++ if (msg_disc == RSL_MSGDISC_IPACCESS) { ++ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset); ++ return offset; ++ } + offset++; - switch (msg_type){ -@@ -3483,6 +3793,18 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) - /* LLP APDU 9.3.58 M LV 2-N */ - offset = dissect_rsl_ie_llp_apdu(tvb, pinfo, tree, offset, TRUE); - break; + switch (msg_type){ +@@ -3491,6 +3802,18 @@ + /* LLP APDU 9.3.58 M LV 2-N */ + offset = dissect_rsl_ie_llp_apdu(tvb, pinfo, tree, offset, TRUE); + break; + /* the following messages are ip.access specific but sent without + * ip.access memssage discriminator */ -+ case RSL_MSG_TYPE_IPAC_MEAS_PP_DEF: -+ case RSL_MSG_TYPE_IPAC_HO_CAND_INQ: -+ case RSL_MSG_TYPE_IPAC_HO_CAND_RESP: -+ case RSL_MSG_TYPE_IPAC_PDCH_ACT: -+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT: -+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: -+ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: -+ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset-1); - default: - break; - } -@@ -3490,6 +3812,40 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) - return offset; ++ case RSL_MSG_TYPE_IPAC_MEAS_PP_DEF: ++ case RSL_MSG_TYPE_IPAC_HO_CAND_INQ: ++ case RSL_MSG_TYPE_IPAC_HO_CAND_RESP: ++ case RSL_MSG_TYPE_IPAC_PDCH_ACT: ++ case RSL_MSG_TYPE_IPAC_PDCH_ACT_ACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_ACT_NACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_DEACT: ++ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_ACK: ++ case RSL_MSG_TYPE_IPAC_PDCH_DEACT_NACK: ++ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset-1); + default: + break; + } +@@ -3498,6 +3821,40 @@ + return offset; } + @@ -495,31 +478,31 @@ index bf83f6f..213ae28 100644 static void dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { -@@ -3512,12 +3868,19 @@ dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) - top_tree = tree; - if (tree) { - ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, FALSE); +@@ -3518,12 +3875,19 @@ + top_tree = tree; + if (tree) { + ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, ENC_BIG_ENDIAN); + -+ /* if nanoBTS specific vendor messages are not enabled, skip */ -+ if (!global_rsl_use_nano_bts) { -+ guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1; ++ /* if nanoBTS specific vendor messages are not enabled, skip */ ++ if (!global_rsl_use_nano_bts) { ++ guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1; + -+ if (msg_disc == RSL_MSGDISC_IPACCESS) -+ return; -+ } - rsl_tree = proto_item_add_subtree(ti, ett_rsl); ++ if (msg_disc == RSL_MSGDISC_IPACCESS) ++ return; ++ } + rsl_tree = proto_item_add_subtree(ti, ett_rsl); - /* 9.1 Message discriminator */ - proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, FALSE); - proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, FALSE); -- offset++; + /* 9.1 Message discriminator */ + proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, ENC_BIG_ENDIAN); +- offset++; - offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset); + offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset); -@@ -3892,6 +4255,86 @@ void proto_register_rsl(void) - FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03, - NULL, HFILL } - }, +@@ -3898,6 +4262,86 @@ + FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03, + NULL, HFILL } + }, + { &hf_rsl_speech_mode_s, + { "ip.access Speech Mode S", "rsl.ipacc.speech_mode_s", + FT_UINT8, BASE_HEX, VALS(rsl_ipacc_spm_s_vals), @@ -600,22 +583,22 @@ index bf83f6f..213ae28 100644 + { "Average Tx Delay", "rsl.ipacc.cstat.avg_tx_delay", + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } + }, - }; - static gint *ett[] = { - &ett_rsl, -@@ -3949,7 +4392,88 @@ void proto_register_rsl(void) - &ett_ie_meas_res_no, - &ett_ie_message_id, - &ett_ie_sys_info_type, -+ &ett_ie_speech_mode, -+ &ett_ie_conn_stat, -+ &ett_ie_conn_id, -+ &ett_ie_remote_ip, -+ &ett_ie_remote_port, -+ &ett_ie_local_port, -+ &ett_ie_local_ip, -+ &ett_ie_rtp_payload, - }; + }; + static gint *ett[] = { + &ett_rsl, +@@ -3955,7 +4399,88 @@ + &ett_ie_meas_res_no, + &ett_ie_message_id, + &ett_ie_sys_info_type, ++ &ett_ie_speech_mode, ++ &ett_ie_conn_stat, ++ &ett_ie_conn_id, ++ &ett_ie_remote_ip, ++ &ett_ie_remote_port, ++ &ett_ie_local_port, ++ &ett_ie_local_ip, ++ &ett_ie_rtp_payload, + }; + module_t *rsl_module; + +#define RSL_ATT_TLVDEF(_attr, _type, _fixed_len) \ @@ -690,11 +673,11 @@ index bf83f6f..213ae28 100644 + RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_ID, TLV_TYPE_FIXED, 2); + RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD2,TLV_TYPE_TV, 0); - /* Register the protocol name and description */ - proto_rsl = proto_register_protocol("Radio Signalling Link (RSL)", -@@ -3960,5 +4484,9 @@ void proto_register_rsl(void) + /* Register the protocol name and description */ + proto_rsl = proto_register_protocol("Radio Signalling Link (RSL)", +@@ -3966,5 +4491,9 @@ - register_dissector("gsm_abis_rsl", dissect_rsl, proto_rsl); + register_dissector("gsm_abis_rsl", dissect_rsl, proto_rsl); + rsl_module = prefs_register_protocol(proto_rsl, proto_reg_handoff_rsl); + prefs_register_bool_preference(rsl_module, "use_ipaccess_rsl", |