forked from osmocom/wireshark
From Jeff Morriss:
support the ISUP CIC as a circuit ID; add a preference option to control whether to put the CIC into the Info column or not. svn path=/trunk/; revision=10265
This commit is contained in:
parent
5d61395421
commit
d4b00639d6
|
@ -1,7 +1,7 @@
|
|||
/* column-utils.c
|
||||
* Routines for column utilities.
|
||||
*
|
||||
* $Id: column-utils.c,v 1.45 2004/02/05 23:57:15 obiot Exp $
|
||||
* $Id: column-utils.c,v 1.46 2004/02/29 08:47:11 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -771,6 +771,13 @@ col_set_circuit_id(packet_info *pinfo, int col)
|
|||
snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", pinfo->circuit_id);
|
||||
break;
|
||||
|
||||
case CT_ISUP:
|
||||
snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", pinfo->circuit_id);
|
||||
strcpy(pinfo->cinfo->col_expr[col], "isup.cic");
|
||||
snprintf(pinfo->cinfo->col_expr_val[col], COL_MAX_LEN, "%u", pinfo->circuit_id);
|
||||
pinfo->cinfo->col_expr_val[col][COL_MAX_LEN - 1] = '\0';
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet_info.h
|
||||
* Definitions for packet info structures and routines
|
||||
*
|
||||
* $Id: packet_info.h,v 1.38 2003/12/29 22:44:50 guy Exp $
|
||||
* $Id: packet_info.h,v 1.39 2004/02/29 08:47:11 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -119,7 +119,8 @@ typedef enum {
|
|||
CT_NONE, /* no port number */
|
||||
CT_DLCI, /* Frame Relay DLCI */
|
||||
CT_ISDN, /* ISDN channel number */
|
||||
CT_X25 /* X.25 logical channel number */
|
||||
CT_X25, /* X.25 logical channel number */
|
||||
CT_ISUP /* ISDN User Part CIC */
|
||||
/* Could also have ATM VPI/VCI pairs */
|
||||
} circuit_type;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* Modified 2004-01-10 by Anders Broman to add abillity to dissect
|
||||
* Content type application/ISUP RFC 3204 used in SIP-T
|
||||
*
|
||||
* $Id: packet-isup.c,v 1.50 2004/02/09 19:36:19 guy Exp $
|
||||
* $Id: packet-isup.c,v 1.51 2004/02/29 08:47:10 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -45,6 +45,7 @@
|
|||
#include <epan/packet.h>
|
||||
#include <epan/ipv6-utils.h>
|
||||
#include <tap.h>
|
||||
#include <prefs.h>
|
||||
#include "packet-q931.h"
|
||||
#include "packet-isup.h"
|
||||
|
||||
|
@ -1181,6 +1182,10 @@ static const true_false_string isup_Sequence_ind_value = {
|
|||
/* Initialize the protocol and registered fields */
|
||||
static int proto_isup = -1;
|
||||
static int proto_bicc = -1;
|
||||
static module_t *isup_module;
|
||||
|
||||
static gboolean isup_show_cic_in_info = TRUE;
|
||||
|
||||
static int hf_isup_cic = -1;
|
||||
static int hf_bicc_cic = -1;
|
||||
|
||||
|
@ -5694,8 +5699,17 @@ dissect_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
recursive message dissector call */
|
||||
cic = tvb_get_letohs(tvb, CIC_OFFSET) & 0x0FFF; /*since upper 4 bits spare */
|
||||
|
||||
|
||||
pinfo->ctype = CT_ISUP;
|
||||
pinfo->circuit_id = cic;
|
||||
|
||||
if (check_col(pinfo->cinfo, COL_INFO))
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s(CIC %u)", val_to_str(message_type, isup_message_type_value_acro, "reserved"),cic);
|
||||
{
|
||||
if (isup_show_cic_in_info)
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s(CIC %u) ", val_to_str(message_type, isup_message_type_value_acro, "reserved"), cic);
|
||||
else
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, isup_message_type_value_acro, "reserved"));
|
||||
}
|
||||
|
||||
/* In the interest of speed, if "tree" is NULL, don't do any work not
|
||||
necessary to generate protocol tree items. */
|
||||
|
@ -6484,6 +6498,12 @@ proto_register_isup(void)
|
|||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
||||
isup_tap = register_tap("isup");
|
||||
|
||||
isup_module = prefs_register_protocol(proto_isup, NULL);
|
||||
|
||||
prefs_register_bool_preference(isup_module, "show_cic_in_info", "Show CIC in Info column",
|
||||
"Show the CIC value (in addition to the message type) in the Info column",
|
||||
(gint *)&isup_show_cic_in_info);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue