re-add wireshark and linux-kernel patches

This commit is contained in:
Harald Welte 2009-06-10 05:42:52 +08:00
parent 13e10daa33
commit 2d112adc3b
3 changed files with 929 additions and 0 deletions

View File

@ -0,0 +1,144 @@
diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linux-2.6.27.4-clean/drivers/isdn/mISDN/layer2.c linux-2.6.27.4/drivers/isdn/mISDN/layer2.c
--- linux-2.6.27.4-clean/drivers/isdn/mISDN/layer2.c 2008-10-26 00:05:07.000000000 +0200
+++ linux-2.6.27.4/drivers/isdn/mISDN/layer2.c 2008-12-23 16:16:29.000000000 +0100
@@ -94,8 +94,10 @@
struct layer2 *l2 = fi->userdata;
va_list va;
+#if 0
if (!(*debug & DEBUG_L2_FSM))
return;
+#endif
va_start(va, fmt);
printk(KERN_DEBUG "l2 (tei %d): ", l2->tei);
vprintk(fmt, va);
@@ -882,6 +884,8 @@
l2->va = 0;
l2->vr = 0;
l2->sow = 0;
+ l2->sapi = skb->data[0] >> 2;
+ set_channel_address(&l2->ch, l2->sapi, l2->tei);
clear_exception(l2);
send_uframe(l2, NULL, UA | get_PollFlag(l2, skb), RSP);
mISDN_FsmChangeState(fi, ST_L2_7);
@@ -898,6 +902,7 @@
struct layer2 *l2 = fi->userdata;
struct sk_buff *skb = arg;
+ printk(KERN_DEBUG "l2_send_UA()\n");
send_uframe(l2, skb, UA | get_PollFlag(l2, skb), RSP);
}
@@ -931,6 +936,8 @@
l2->va = 0;
l2->vr = 0;
l2->sow = 0;
+ l2->sapi = skb->data[0] >> 2;
+ set_channel_address(&l2->ch, l2->sapi, l2->tei);
mISDN_FsmChangeState(fi, ST_L2_7);
stop_t200(l2, 3);
mISDN_FsmRestartTimer(&l2->t203, l2->T203, EV_L2_T203, NULL, 3);
@@ -982,6 +989,8 @@
} else if (l2->vs != l2->va) {
skb_queue_purge(&l2->i_queue);
pr = DL_ESTABLISH_IND;
+ //l2->sapi = skb->data[0] >> 2;
+ //set_channel_address(&l2->ch, l2->sapi, l2->tei);
}
stop_t200(l2, 5);
l2->vr = 0;
@@ -1841,11 +1850,14 @@
u_int l;
int c = 0;
+ printk(KERN_DEBUG "ph_data_indication 0x%x 0x%x 0x%x\n", datap[0], datap[1], datap[2]);
+
l = l2addrsize(l2);
if (skb->len <= l) {
mISDN_FsmEvent(&l2->l2m, EV_L2_FRAME_ERROR, (void *) 'N');
return ret;
}
+#if 0
if (test_bit(FLG_LAPD, &l2->flag)) { /* Maybe not needed */
psapi = *datap++;
ptei = *datap++;
@@ -1875,6 +1887,7 @@
return 0;
}
} else
+#endif
datap += l;
if (!(*datap & 1)) { /* I-Frame */
c = iframe_error(l2, skb);
@@ -1890,6 +1903,7 @@
ret = mISDN_FsmEvent(&l2->l2m, EV_L2_UI, skb);
} else if (IsSABME(datap, l2)) {
c = unnum_error(l2, skb, CMD);
+ printk(KERN_DEBUG "IsSABME() returned true, unnum_error=%d\n", c);
if (!c)
ret = mISDN_FsmEvent(&l2->l2m, EV_L2_SABME, skb);
} else if (IsUA(datap)) {
@@ -2087,7 +2101,7 @@
test_and_set_bit(FLG_LAPD, &l2->flag);
test_and_set_bit(FLG_LAPD_NET, &l2->flag);
test_and_set_bit(FLG_MOD128, &l2->flag);
- l2->sapi = 0;
+ l2->sapi = 62;
l2->maxlen = MAX_DFRAME_LEN;
if (test_bit(OPTION_L2_PMX, &options))
l2->window = 7;
diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linux-2.6.27.4-clean/drivers/isdn/mISDN/tei.c linux-2.6.27.4/drivers/isdn/mISDN/tei.c
--- linux-2.6.27.4-clean/drivers/isdn/mISDN/tei.c 2008-10-26 00:05:07.000000000 +0200
+++ linux-2.6.27.4/drivers/isdn/mISDN/tei.c 2008-12-23 16:32:59.000000000 +0100
@@ -830,18 +830,29 @@
int tei, ri;
struct layer2 *l2;
+ printk(KERN_DEBUG "new tei request: tei=%d\n", dp[3] >> 1);
+
ri = dp[0] << 8;
ri += dp[1];
- if (!mgr->up)
- goto denied;
- tei = get_free_tei(mgr);
- if (tei < 0) {
- printk(KERN_WARNING "%s:No free tei\n", __func__);
+ if (!mgr->up) {
+ printk(KERN_DEBUG "mgr->up == NULL\n");
goto denied;
}
+ if (dp[3] != 0xff) {
+ /* This is a TEI request according to 3GPP TS 08.56 6.1.11.2 */
+ tei = dp[3] >> 1;
+ } else {
+ tei = get_free_tei(mgr);
+ if (tei < 0) {
+ printk(KERN_WARNING "%s:No free tei\n", __func__);
+ goto denied;
+ }
+ }
l2 = create_new_tei(mgr, tei);
- if (!l2)
+ if (!l2) {
+ printk(KERN_DEBUG "create_new_tei == NULL\n");
goto denied;
+ }
else
mISDN_FsmEvent(&l2->tm->tei_m, EV_ASSIGN_REQ, dp);
return;
@@ -1159,12 +1170,14 @@
return -ENOTCONN;
if (skb->len != 3)
return -ENOTCONN;
+#if 0
if (skb->data[0] != 0)
/* only SAPI 0 command */
return -ENOTCONN;
+#endif
if (!(skb->data[1] & 1)) /* invalid EA1 */
return -EINVAL;
- tei = skb->data[1] >> 0;
+ tei = skb->data[1] >> 1;
if (tei > 63) /* not a fixed tei */
return -ENOTCONN;
if ((skb->data[2] & ~0x10) != SABME)

304
wireshark/abisip.patch Normal file
View File

@ -0,0 +1,304 @@
Index: epan/dissectors/Makefile.common
===================================================================
--- epan/dissectors/Makefile.common.orig
+++ epan/dissectors/Makefile.common
@@ -873,6 +873,7 @@
# Dissectors with warnings.
#
DIRTY_DISSECTOR_SRC = \
+ packet-abis_ip.c \
packet-k12.c \
packet-nbd.c \
packet-sccp.c \
Index: epan/dissectors/packet-rsl.c
===================================================================
--- epan/dissectors/packet-rsl.c.orig
+++ epan/dissectors/packet-rsl.c
@@ -3950,6 +3950,7 @@
proto_register_field_array(proto_rsl, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ register_dissector("gsm_abis_rsl", dissect_rsl, proto_rsl);
}
Index: epan/dissectors/packet-abis_ip.c
===================================================================
--- /dev/null
+++ epan/dissectors/packet-abis_ip.c
@@ -0,0 +1,275 @@
+/* packet-abis_ip.c
+ * Routines for packet dissection of ip.access A-bis over IP
+ * Copyright 2009 by Harald Welte <laforge@gnumonks.org>
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+
+#include <epan/packet.h>
+#include <epan/emem.h>
+
+/* Initialize the protocol and registered fields */
+static int proto_abisip = -1;
+static int proto_ipaccess = -1;
+
+static int hf_abisip_data_len = -1;
+static int hf_abisip_protocol = -1;
+
+static int hf_ipaccess_msgtype = -1;
+static int hf_ipaccess_attr_tag = -1;
+static int hf_ipaccess_attr_string = -1;
+
+/* Initialize the subtree pointers */
+static gint ett_abisip = -1;
+static gint ett_ipaccess = -1;
+
+enum {
+ SUB_OML,
+ SUB_RSL,
+ SUB_IPACCESS,
+
+ SUB_MAX
+};
+
+static dissector_handle_t sub_handles[SUB_MAX];
+
+#define TCP_PORT_ABISIP_PRIM 3002
+#define TCP_PORT_ABISIP_SEC 3003
+#define TCP_PORT_ABISIP_INST 3006
+
+#define ABISIP_RSL 0x00
+#define ABISIP_IPACCESS 0xfe
+#define ABISIP_OML 0xff
+
+static const value_string abisip_protocol_vals[] = {
+ { 0x00, "RSL" },
+ { 0xfe, "IPA" },
+ { 0xff, "OML" },
+ { 0, NULL }
+};
+
+static const value_string ipaccess_msgtype_vals[] = {
+ { 0x00, "PING?" },
+ { 0x01, "PONG!" },
+ { 0x04, "IDENTITY REQUEST" },
+ { 0x05, "IDENTITY RESPONSE" },
+ { 0x06, "IDENTITY CONF" },
+ { 0, NULL }
+};
+
+static const value_string ipaccess_idtag_vals[] = {
+ { 0x00, "Serial Number" },
+ { 0x01, "Unit Name" },
+ { 0x02, "Location" },
+ { 0x04, "Equipment Version" },
+ { 0x05, "Software Version" },
+ { 0x06, "IP Address" },
+ { 0x07, "MAC Address" },
+ { 0x08, "Unit ID" },
+};
+
+static gint
+dissect_ipa_attr(tvbuff_t *tvb, int base_offs, packet_info *pinfo, proto_tree *tree)
+{
+ guint8 len, tag, attr_type;
+
+ int offset = base_offs;
+
+ while (tvb_reported_length_remaining(tvb, offset) != 0) {
+ attr_type = tvb_get_guint8(tvb, offset);
+
+ switch (attr_type) {
+ case 0x00: /* a string prefixed by its length */
+ len = tvb_get_guint8(tvb, offset+1);
+ tag = tvb_get_guint8(tvb, offset+2);
+ proto_tree_add_item(tree, hf_ipaccess_attr_tag,
+ tvb, offset+2, 1, FALSE);
+ proto_tree_add_item(tree, hf_ipaccess_attr_string,
+ tvb, offset+3, len-1, FALSE);
+ break;
+ case 0x01: /* a single-byte reqest for a certain attr */
+ len = 0;
+ proto_tree_add_item(tree, hf_ipaccess_attr_tag,
+ tvb, offset+1, 1, FALSE);
+ break;
+ };
+ offset += len + 2;
+ };
+ return offset;
+}
+
+/* Dissect an ip.access specific message */
+static gint
+dissect_ipaccess(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ proto_item *ti;
+ proto_tree *ipaccess_tree;
+ guint8 msg_type;
+
+ msg_type = tvb_get_guint8(tvb, 0);
+
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(msg_type, ipaccess_msgtype_vals,
+ "unknown 0x%02x"));
+ if (tree) {
+ ti = proto_tree_add_item(tree, proto_ipaccess, tvb, 0, -1, FALSE);
+ ipaccess_tree = proto_item_add_subtree(ti, ett_ipaccess);
+ proto_tree_add_item(ipaccess_tree, hf_ipaccess_msgtype,
+ tvb, 0, 1, FALSE);
+ switch (msg_type) {
+ case 4:
+ case 5:
+ dissect_ipa_attr(tvb, 1, pinfo, ipaccess_tree);
+ break;
+ }
+ }
+
+ return 1;
+}
+
+
+/* Code to actually dissect the packets */
+static void
+dissect_abisip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+
+ int offset = 0;
+
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Abis/IP");
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_clear(pinfo->cinfo, COL_INFO);
+
+ while (tvb_reported_length_remaining(tvb, offset) != 0) {
+ proto_item *ti;
+ proto_tree *abisip_tree;
+ guint8 len, msg_type;
+ tvbuff_t *next_tvb;
+
+ len = tvb_get_guint8(tvb, offset+1);
+ msg_type = tvb_get_guint8(tvb, offset+2);
+
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(msg_type, abisip_protocol_vals,
+ "unknown 0x%02x"));
+
+ if (tree) {
+ ti = proto_tree_add_item(tree, proto_abisip, tvb,
+ offset, len+3, FALSE);
+ abisip_tree = proto_item_add_subtree(ti, ett_abisip);
+ proto_tree_add_item(abisip_tree, hf_abisip_data_len,
+ tvb, offset+1, 1, FALSE);
+ proto_tree_add_item(abisip_tree, hf_abisip_protocol,
+ tvb, offset+2, 1, FALSE);
+ }
+
+ next_tvb = tvb_new_subset(tvb, offset+3, len, len);
+
+ switch (msg_type) {
+ case ABISIP_RSL:
+ /* hand this off to the standard A-bis RSL dissector */
+ call_dissector(sub_handles[SUB_RSL], next_tvb, pinfo, tree);
+ break;
+ case ABISIP_OML:
+ /* hand this off to the standard A-bis OML dissector */
+#if 0
+ call_dissector(sub_handles[SUB_OML], next_tvb,
+ pinfo, tree);
+#endif
+ break;
+ case ABISIP_IPACCESS:
+ dissect_ipaccess(next_tvb, pinfo, tree);
+ break;
+ }
+ offset += len + 3;
+ }
+}
+
+void proto_register_abisip(void)
+{
+ static hf_register_info hf[] = {
+ {&hf_abisip_data_len,
+ {"DataLen", "abisip.data_len",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "The length of the data (in bytes)", HFILL}
+ },
+ {&hf_abisip_protocol,
+ {"Protocol", "abisip.protocol",
+ FT_UINT8, BASE_HEX, VALS(abisip_protocol_vals), 0x0,
+ "The A-bis/IP Sub-Protocol", HFILL}
+ },
+ };
+ static hf_register_info hf_ipa[] = {
+ {&hf_ipaccess_msgtype,
+ {"MessageType", "ipaccess.msg_type",
+ FT_UINT8, BASE_HEX, VALS(ipaccess_msgtype_vals), 0x0,
+ "type of ip.access messsage", HFILL}
+ },
+ {&hf_ipaccess_attr_tag,
+ {"Tag", "ipaccess.attr_tag",
+ FT_UINT8, BASE_HEX, VALS(ipaccess_idtag_vals), 0x0,
+ "Attribute Tag", HFILL}
+ },
+ {&hf_ipaccess_attr_string,
+ {"String", "ipaccess.attr_string",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "String attribute", HFILL}
+ },
+ };
+
+ static gint *ett[] = {
+ &ett_abisip,
+ &ett_ipaccess,
+ };
+
+ proto_abisip =
+ proto_register_protocol("A-bis/IP protocol as used by ip.access",
+ "A-bis/IP", "abis_ip");
+ proto_ipaccess =
+ proto_register_protocol("A-bis/IP ip.access sub-protocol",
+ "IPA", "ipaccess");
+
+ proto_register_field_array(proto_abisip, hf, array_length(hf));
+ proto_register_field_array(proto_ipaccess, hf_ipa, array_length(hf_ipa));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void proto_reg_handoff_abisip(void)
+{
+ dissector_handle_t abisip_handle;
+
+ sub_handles[SUB_RSL] = find_dissector("gsm_abis_rsl");
+ sub_handles[SUB_OML] = find_dissector("gsm_abis_oml");
+
+ abisip_handle = create_dissector_handle(dissect_abisip, proto_abisip);
+ dissector_add("tcp.port", TCP_PORT_ABISIP_PRIM, abisip_handle);
+ dissector_add("tcp.port", TCP_PORT_ABISIP_SEC, abisip_handle);
+ dissector_add("tcp.port", TCP_PORT_ABISIP_INST, abisip_handle);
+ dissector_add("udp.port", TCP_PORT_ABISIP_INST, abisip_handle);
+}

View File

@ -0,0 +1,481 @@
Index: wireshark/epan/dissectors/packet-rsl.c
===================================================================
--- wireshark.orig/epan/dissectors/packet-rsl.c 2009-02-22 15:39:34.000000000 +0100
+++ wireshark/epan/dissectors/packet-rsl.c 2009-02-22 17:27:51.000000000 +0100
@@ -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: packet-rsl.c 27065 2008-12-20 00:09:02Z wmeier $
*
@@ -116,6 +117,14 @@
static int hf_rsl_rtd = -1;
static int hf_rsl_delay_ind = -1;
static int hf_rsl_tfo = -1;
+static int hf_rsl_f4 = -1;
+static int hf_rsl_f6 = -1;
+static int hf_rsl_f8 = -1;
+static int hf_rsl_fc = -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;
/* Initialize the subtree pointers */
static int ett_rsl = -1;
@@ -173,6 +182,15 @@
static int ett_ie_meas_res_no = -1;
static int ett_ie_message_id = -1;
static int ett_ie_sys_info_type = -1;
+static int ett_ie_f4 = -1;
+static int ett_ie_f6 = -1;
+static int ett_ie_f8 = -1;
+static int ett_ie_remote_ip = -1;
+static int ett_ie_remote_port = -1;
+static int ett_ie_local_port = -1;
+static int ett_ie_local_ip = -1;
+static int ett_ie_fc = -1;
+
proto_tree *top_tree;
dissector_handle_t gsm_a_ccch_handle;
@@ -208,8 +226,11 @@
{ 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
*/
@@ -338,6 +359,14 @@
{ 0x3f, "TFO MODification REQuest" }, /* 8.4.31 */
/* 0 1 - - - - - - Location Services messages: */
{ 0x41, "Location Information" }, /* 8.7.1 */
+ /* ip.access */
+ { 0x70, "ip.access BIND" },
+ { 0x71, "ip.access BIND ACK" },
+ { 0x72, "ip.access BIND NACK" },
+ { 0x73, "ip.access CONNECT" },
+ { 0x74, "ip.access CONNECT ACK" },
+ { 0x75, "ip.access CONNECT NACK" },
+ { 0x76, "ip.access DISCONNECT INDication" },
{ 0, NULL }
};
@@ -477,6 +506,10 @@
Not used
*/
+ { 0xf0, "Remote IP Address" },
+ { 0xf1, "Remote RTP Port" },
+ { 0xf3, "Local RTP Port" },
+ { 0xf5, "Local IP Address" },
{ 0, NULL }
};
@@ -2043,7 +2076,6 @@
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);
@@ -2907,13 +2939,320 @@
return ie_offset + length;
}
+/* Vendor-Specific messages of ip.access nanoBTS. There is no public documentation
+ * about those extensions, all information in this dissector is based on lawful
+ * protocol reverse enginering by Harald Welte <laforge@gnumonks.org> */
+#define RSL_MSG_TYPE_IPAC_BIND 0x70
+#define RSL_MSG_TYPE_IPAC_BIND_ACK 0x71
+#define RSL_MSG_TYPE_IPAC_BIND_NACK 0x72
+#define RSL_MSG_TYPE_IPAC_CONNECT 0x73
+#define RSL_MSG_TYPE_IPAC_CONNECT_ACK 0x74
+#define RSL_MSG_TYPE_IPAC_CONNECT_NACK 0x75
+#define RSL_MSG_TYPE_IPAC_DISC_IND 0x76
+#define RSL_IE_IPAC_REMOTE_IP 0xf0
+#define RSL_IE_IPAC_REMOTE_PORT 0xf1
+#define RSL_IE_IPAC_LOCAL_PORT 0xf3
+#define RSL_IE_IPAC_LOCAL_IP 0xf5
+
+static int
+dissect_rsl_ipac_ie_f8(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
+{
+ proto_item *ti;
+ proto_tree *ie_tree;
+ guint8 ie_id;
+
+ if (is_mandatory == FALSE) {
+ ie_id = tvb_get_guint8(tvb, offset);
+ if (ie_id != 0xf8)
+ return offset;
+ }
+
+ ti = proto_tree_add_text(tree, tvb, offset, 0, "Unknown 0xf8 IE");
+ ie_tree = proto_item_add_subtree(ti, ett_ie_f8);
+
+ /* Element identifier */
+ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
+ offset++;
+ /* Fixed Length */
+ proto_item_set_len(ti, 3);
+
+ proto_tree_add_item(ie_tree, hf_rsl_f8, tvb, offset, 2, FALSE);
+ offset += 2;
+
+ return offset;
+}
+
+static int
+dissect_rsl_ipac_ie_local_port(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
+{
+ proto_item *ti;
+ proto_tree *ie_tree;
+ guint8 ie_id;
+
+ if (is_mandatory == FALSE) {
+ ie_id = tvb_get_guint8(tvb, offset);
+ if (ie_id != RSL_IE_IPAC_LOCAL_PORT)
+ return offset;
+ }
+
+ ti = proto_tree_add_text(tree, tvb, offset, 0, "Local RTP Port IE");
+ ie_tree = proto_item_add_subtree(ti, ett_ie_local_port);
+
+ /* Element identifier */
+ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
+ offset++;
+ /* Fixed Length */
+ proto_item_set_len(ti, 3);
+
+ proto_tree_add_item(ie_tree, hf_rsl_local_port, tvb, offset, 2, FALSE);
+ offset += 2;
+
+ return offset;
+}
+
+static int
+dissect_rsl_ipac_ie_remote_port(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
+{
+ proto_item *ti;
+ proto_tree *ie_tree;
+ guint8 ie_id;
+
+ if (is_mandatory == FALSE) {
+ ie_id = tvb_get_guint8(tvb, offset);
+ if (ie_id != RSL_IE_IPAC_REMOTE_PORT)
+ return offset;
+ }
+
+ ti = proto_tree_add_text(tree, tvb, offset, 0, "Remote RTP Port IE");
+ ie_tree = proto_item_add_subtree(ti, ett_ie_remote_port);
+
+ /* Element identifier */
+ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
+ offset++;
+ /* Fixed Length */
+ proto_item_set_len(ti, 3);
+
+ proto_tree_add_uint(ie_tree, hf_rsl_remote_port, tvb, offset, 2, FALSE);
+ offset += 2;
+
+ return offset;
+}
+
+static int
+dissect_rsl_ipac_ie_local_ip(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
+{
+ proto_item *ti;
+ proto_tree *ie_tree;
+ guint8 ie_id;
+ guint32 ip;
+
+ if (is_mandatory == FALSE) {
+ ie_id = tvb_get_guint8(tvb, offset);
+ if (ie_id != RSL_IE_IPAC_LOCAL_IP)
+ return offset;
+ }
+
+ ti = proto_tree_add_text(tree, tvb, offset, 0, "Local IP Address IE");
+ ie_tree = proto_item_add_subtree(ti, ett_ie_local_ip);
+
+ /* Element identifier */
+ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
+ offset++;
+ /* Fixed Length */
+ proto_item_set_len(ti, 5);
+
+ ip = tvb_get_ipv4(tvb, offset);
+ proto_tree_add_ipv4(ie_tree, hf_rsl_local_ip, tvb, offset, 4, ip);
+ offset += 4;
+
+ return offset;
+}
+
+static int
+dissect_rsl_ipac_ie_remote_ip(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
+{
+ proto_item *ti;
+ proto_tree *ie_tree;
+ guint8 ie_id;
+ guint32 ip;
+
+ if (is_mandatory == FALSE) {
+ ie_id = tvb_get_guint8(tvb, offset);
+ if (ie_id != RSL_IE_IPAC_REMOTE_IP)
+ return offset;
+ }
+
+ ti = proto_tree_add_text(tree, tvb, offset, 0, "Remote IP Address IE");
+ ie_tree = proto_item_add_subtree(ti, ett_ie_remote_ip);
+
+ /* Element identifier */
+ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
+ offset++;
+ /* Fixed Length */
+ proto_item_set_len(ti, 5);
+
+ ip = tvb_get_ipv4(tvb, offset);
+ proto_tree_add_ipv4(ie_tree, hf_rsl_remote_ip, tvb, offset, 4, ip);
+ offset += 4;
+
+ return offset;
+}
+
+static int
+dissect_rsl_ipac_ie_f6(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
+{
+ proto_item *ti;
+ proto_tree *ie_tree;
+ guint8 length;
+ guint8 ie_id;
+
+ if (is_mandatory == FALSE) {
+ ie_id = tvb_get_guint8(tvb, offset);
+ if (ie_id != 0xf6)
+ return offset;
+ }
+
+ ti = proto_tree_add_text(tree, tvb, offset, 0, "Unknown 0xf6 IE");
+ ie_tree = proto_item_add_subtree(ti, ett_ie_f6);
+
+ /* Element identifier */
+ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
+ offset++;
+
+ /* Length */
+ length = tvb_get_guint8(tvb, offset);
+ offset++;
+ proto_item_set_len(ti, length+2);
+
+ proto_tree_add_bytes(ie_tree, hf_rsl_f6, tvb, offset, length,
+ tvb_get_ptr(tvb, offset, length));
+ offset += length;
+
+ return offset;
+}
+
+static int
+dissect_rsl_ipac_ie_f4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
+{
+ proto_item *ti;
+ proto_tree *ie_tree;
+ guint8 ie_id;
+
+ if (is_mandatory == FALSE) {
+ ie_id = tvb_get_guint8(tvb, offset);
+ if (ie_id != 0xf4)
+ return offset;
+ }
+
+ ti = proto_tree_add_text(tree, tvb, offset, 0, "Unknown 0xf4 IE");
+ ie_tree = proto_item_add_subtree(ti, ett_ie_f4);
+
+ /* Element identifier */
+ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
+ offset++;
+ /* Fixed Length */
+ proto_item_set_len(ti, 2);
+ proto_tree_add_item(ie_tree, hf_rsl_f4, tvb, offset, 1, FALSE);
+ offset++;
+
+ return offset;
+}
+
+static int
+dissect_rsl_ipac_ie_fc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, gboolean is_mandatory)
+{
+ proto_item *ti;
+ proto_tree *ie_tree;
+ guint8 ie_id;
+
+ if (is_mandatory == FALSE) {
+ ie_id = tvb_get_guint8(tvb, offset);
+ if (ie_id != 0xfc)
+ return offset;
+ }
+
+ ti = proto_tree_add_text(tree, tvb, offset, 0, "Unknown 0xfc IE");
+ ie_tree = proto_item_add_subtree(ti, ett_ie_fc);
+
+ /* Element identifier */
+ proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, FALSE);
+ offset++;
+ /* Fixed Length */
+ proto_item_set_len(ti, 2);
+ proto_tree_add_item(ie_tree, hf_rsl_fc, tvb, offset, 1, FALSE);
+ offset++;
+
+ return offset;
+}
+
+static int
+dissct_rsl_ipaccess_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
+{
+ guint8 msg_type;
+
+ msg_type = tvb_get_guint8(tvb, offset)&0x7f;
+ offset++;
+
+ switch (msg_type) {
+ case RSL_MSG_TYPE_IPAC_BIND:
+ /* Channel number 9.3.1 M TV 2 */
+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
+ break;
+ case RSL_MSG_TYPE_IPAC_BIND_ACK:
+ /* Channel number 9.3.1 M TV 2 */
+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_f8(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_local_port(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_local_ip(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_fc(tvb, pinfo, tree, offset, TRUE);
+ break;
+ case RSL_MSG_TYPE_IPAC_BIND_NACK:
+ /* Channel number 9.3.1 M TV 2 */
+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
+ break;
+ case RSL_MSG_TYPE_IPAC_CONNECT:
+ /* Channel number 9.3.1 M TV 2 */
+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_remote_ip(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_remote_port(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_f4(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_fc(tvb, pinfo, tree, offset, TRUE);
+ break;
+ case RSL_MSG_TYPE_IPAC_CONNECT_ACK:
+ /* Channel number 9.3.1 M TV 2 */
+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_f8(tvb, pinfo, tree, offset, TRUE);
+ break;
+ case RSL_MSG_TYPE_IPAC_CONNECT_NACK:
+ /* Channel number 9.3.1 M TV 2 */
+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
+ break;
+ case RSL_MSG_TYPE_IPAC_DISC_IND:
+ /* Channel number 9.3.1 M TV 2 */
+ offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_f8(tvb, pinfo, tree, offset, TRUE);
+ offset = dissect_rsl_ipac_ie_f6(tvb, pinfo, tree, offset, TRUE);
+ /* Cause 9.3.26 M TLV >=3 */
+ offset = dissect_rsl_ie_cause(tvb, pinfo, tree, offset, TRUE);
+ break;
+ }
+
+ return offset;
+}
+
static int
dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
- 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);
+
+ if (msg_disc == RSL_MSGDISC_IPACCESS) {
+ offset = dissct_rsl_ipaccess_msg(tvb, pinfo, tree, offset);
+ return offset;
+ }
offset++;
switch (msg_type){
@@ -3517,7 +3856,6 @@
/* 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++;
offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset);
@@ -3883,6 +4221,46 @@
FT_UINT8, BASE_DEC, VALS(rsl_emlpp_prio_vals), 0x03,
"eMLPP Priority", HFILL }
},
+ { &hf_rsl_f4,
+ { "unknown F4 IE", "rsl.ipacc.f4",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "unknown F4 IE", HFILL }
+ },
+ { &hf_rsl_f6,
+ { "unknown F6 IE", "rsl.ipacc.f6",
+ FT_BYTES, BASE_HEX, NULL, 0x0,
+ "unknown F6 IE", HFILL }
+ },
+ { &hf_rsl_f8,
+ { "unknown F8 IE", "rsl.ipacc.f8",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "unknown F8 IE", HFILL }
+ },
+ { &hf_rsl_fc,
+ { "unknown FC IE", "rsl.ipacc.fc",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "unknown FC IE", HFILL }
+ },
+ { &hf_rsl_local_port,
+ { "ip.access Local RTP Port", "rsl.ipacc.local_port",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "ip.access Local RTP Port", HFILL },
+ },
+ { &hf_rsl_remote_port,
+ { "ip.access Remote RTP Port", "rsl.ipacc.remote_port",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "ip.access Remote RTP Port", HFILL },
+ },
+ { &hf_rsl_local_ip,
+ { "ip.access Local IP Address", "rsl.ipacc.local_ip",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ "ip.access Local IP Address", HFILL },
+ },
+ { &hf_rsl_remote_ip,
+ { "ip.access Remote IP Address", "rsl.ipacc.remote_ip",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ "ip.access Remote IP Address", HFILL },
+ },
};
static gint *ett[] = {
&ett_rsl,
@@ -3941,6 +4319,14 @@
&ett_ie_meas_res_no,
&ett_ie_message_id,
&ett_ie_sys_info_type,
+ &ett_ie_f4,
+ &ett_ie_f6,
+ &ett_ie_f8,
+ &ett_ie_remote_ip,
+ &ett_ie_remote_port,
+ &ett_ie_local_port,
+ &ett_ie_local_ip,
+ &ett_ie_fc,
};
/* Register the protocol name and description */