* Based on 3GPP TS 25.413 V3.4.0
* Copyright 2001, Martin Held <Martin.Held@icn.siemens.de>
*
- * $Id: packet-ranap.c,v 1.8 2001/12/03 03:59:38 guy Exp $
+ * $Id: packet-ranap.c,v 1.11 2002/01/24 09:20:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
# include "snprintf.h"
#endif
-#include "packet.h"
+#include <epan/packet.h>
#define SCCP_SSN_RANAP 0x8E
static int
dissect_unknown_IE(tvbuff_t *tvb, proto_tree *ie_tree)
{
- guint length;
-
if (ie_tree)
{
- length = tvb_length(tvb);
-
- proto_tree_add_text(ie_tree, tvb, 0, length,
+ proto_tree_add_text(ie_tree, tvb, 0, -1,
"IE Contents (dissection not implemented)");
}
return(0);
gint tmp_bitoffset = 0;
guint extension_present;
- gint ie_tvb_length;
tvbuff_t *ie_tvb;
/* make entry in the Protocol column on summary display */
- if (check_col(pinfo->fd, COL_PROTOCOL))
- col_set_str(pinfo->fd, COL_PROTOCOL, "RANAP");
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RANAP");
/* extract header fields which are needed even if no tree exists */
{
/* extended choice */
/* decoding is not supported */
- col_append_str(pinfo->fd, COL_INFO, "RANAP-PDU Protocol extension present, dissection not supported");
+ col_append_str(pinfo->cinfo, COL_INFO, "RANAP-PDU Protocol extension present, dissection not supported");
return;
}
tmp_offset += 1;
/* add Procedure Code to Info Column */
- if (check_col(pinfo->fd, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
if (procedure_code <= PC_max)
{
- col_append_str(pinfo->fd, COL_INFO,
+ col_append_str(pinfo->cinfo, COL_INFO,
val_to_str(pdu_index, ranap_message_names[procedure_code],
"unknown message"));
- col_append_str(pinfo->fd, COL_INFO, " ");
+ col_append_str(pinfo->cinfo, COL_INFO, " ");
}
}
if (tree)
{
/* create the ranap protocol tree */
- ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, tvb_length(tvb), FALSE);
+ ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, -1, FALSE);
ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap);
/* Add fields to ranap protocol tree */
offset = PDU_NUMBER_OF_OCTETS_OFFSET + number_of_octets_size;
/* create a tvb containing the remainder of the PDU */
- ie_tvb_length = tvb_length(tvb)- offset;
- ie_tvb = tvb_new_subset(tvb, offset, ie_tvb_length, ie_tvb_length);
+ ie_tvb = tvb_new_subset(tvb, offset, -1, -1);
/* dissect the ies */
dissect_ranap_ie_container(ie_tvb, pinfo, tree, ranap_tree);