forked from osmocom/wireshark
Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="
statements. Move the setting of the Protocol column in various dissectors before anything is fetched from the packet, and also clear the Info column at that point in those and some other dissectors, so that if an exception is thrown, the columns don't reflect the previous protocol. "Tvbuffify" the Mobile IP dissector (it took old-style arguments, and then converted them into tvbuff arguments, so there wasn't much to do, other than to fix references to "fd" to refer to "pinfo->fd"). In the SCTP dissector, refer to the port type and source and destination ports through "pinfo" rather than through the global "pi", as it's a tvbuffified dissector. In the SMTP and Time Protocol dissectors, use "pinfo->match_port" rather than "TCP_PORT_SMTP" when checking whether the packet is a request or reply, just in case somebody makes a non-standard port be dissected as SMTP or Time. (Also, remove a bogus comment from the Time dissector; it was probably cut-and-pasted from the TFTP dissector.) svn path=/trunk/; revision=2938
This commit is contained in:
parent
a8649c0e74
commit
32d63ecb30
|
@ -1,7 +1,7 @@
|
|||
/* packet-ascend.c
|
||||
* Routines for decoding Lucent/Ascend packet traces
|
||||
*
|
||||
* $Id: packet-ascend.c,v 1.23 2001/01/09 06:31:33 guy Exp $
|
||||
* $Id: packet-ascend.c,v 1.24 2001/01/25 06:14:13 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -59,10 +59,6 @@ dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item *ti;
|
||||
union wtap_pseudo_header *pseudo_header = pinfo->pseudo_header;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_ascend, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "Lucent/Ascend";
|
||||
|
||||
/* load the top pane info. This should be overwritten by
|
||||
the next protocol in the stack */
|
||||
if(check_col(pinfo->fd, COL_RES_DL_SRC))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Heikki Vatiainen <hessu@cs.tut.fi>
|
||||
*
|
||||
* $Id: packet-auto_rp.c,v 1.12 2001/01/09 06:31:34 guy Exp $
|
||||
* $Id: packet-auto_rp.c,v 1.13 2001/01/25 06:14:13 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -124,12 +124,10 @@ static void dissect_auto_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
guint8 ver_type, rp_count;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_auto_rp, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "Auto-RP";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "Auto-RP");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
|
||||
ver_type = tvb_get_guint8(tvb, 0);
|
||||
rp_count = tvb_get_guint8(tvb, 1);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for the disassembly of the "Cisco Discovery Protocol"
|
||||
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
|
||||
*
|
||||
* $Id: packet-cdp.c,v 1.34 2001/01/15 21:36:53 guy Exp $
|
||||
* $Id: packet-cdp.c,v 1.35 2001/01/25 06:14:13 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -110,10 +110,6 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint32 naddresses;
|
||||
int addr_length;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_cdp, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "CDP";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "CDP");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-cgmp.c
|
||||
* Routines for the disassembly of the Cisco Group Management Protocol
|
||||
*
|
||||
* $Id: packet-cgmp.c,v 1.8 2001/01/09 06:31:34 guy Exp $
|
||||
* $Id: packet-cgmp.c,v 1.9 2001/01/25 06:14:13 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -66,10 +66,6 @@ dissect_cgmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
int offset = 0;
|
||||
guint8 count;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_cgmp, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "CGMP";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "CGMP");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-dec-bpdu.c
|
||||
* Routines for DEC BPDU (DEC Spanning Tree Protocol) disassembly
|
||||
*
|
||||
* $Id: packet-dec-bpdu.c,v 1.5 2001/01/14 08:25:14 guy Exp $
|
||||
* $Id: packet-dec-bpdu.c,v 1.6 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Copyright 2001 Paul Ionescu <paul@acorp.ro>
|
||||
*
|
||||
|
@ -78,13 +78,12 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
proto_tree *bpdu_tree;
|
||||
proto_item *ti;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_dec_bpdu, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "DEC_STP";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL)) {
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "DEC_STP");
|
||||
}
|
||||
if (check_col(pinfo->fd, COL_INFO)) {
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
}
|
||||
|
||||
bpdu_type = tvb_get_guint8(tvb, BPDU_TYPE);
|
||||
flags=tvb_get_guint8(tvb,BPDU_FLAGS);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright 2001, Paul Ionescu <paul@acorp.ro>
|
||||
*
|
||||
* $Id: packet-fr.c,v 1.7 2001/01/13 07:47:48 guy Exp $
|
||||
* $Id: packet-fr.c,v 1.8 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -70,9 +70,6 @@ static void dissect_fr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
guint8 fr_nlpid,fr_ctrl;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_fr, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "Frame Relay";
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "FR");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de>
|
||||
*
|
||||
* $Id: packet-iua.c,v 1.3 2001/01/14 10:15:56 guy Exp $
|
||||
* $Id: packet-iua.c,v 1.4 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@unicom.net>
|
||||
|
@ -845,10 +845,6 @@ dissect_iua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item *iua_item;
|
||||
proto_tree *iua_tree;
|
||||
|
||||
pinfo->current_proto = "IUA";
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_iua, message_tvb, pinfo, tree);
|
||||
|
||||
/* make entry in the Protocol column on summary display */
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_add_str(pinfo->fd, COL_PROTOCOL, "IUA");
|
||||
|
@ -1017,5 +1013,3 @@ proto_reg_handoff_iua(void)
|
|||
dissector_add("sctp.port", SCTP_PORT_IUA, dissect_iua, proto_iua);
|
||||
dissector_add("sctp.ppi", IUA_PAYLOAD_PROTO_ID, dissect_iua, proto_iua);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Laurent Cazalet <laurent.cazalet@mailclub.net>
|
||||
* Thomas Parvais <thomas.parvais@advalvas.be>
|
||||
*
|
||||
* $Id: packet-l2tp.c,v 1.20 2001/01/09 06:31:38 guy Exp $
|
||||
* $Id: packet-l2tp.c,v 1.21 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -295,11 +295,10 @@ dissect_l2tp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint16 control;
|
||||
tvbuff_t *next_tvb;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_l2tp, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "L2TP";
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL)) /* build output for closed L2tp frame displayed */
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "L2TP");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
|
||||
control = tvb_get_ntohs(tvb, 0);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Richard Sharpe <rsharpe@ns.aus.com> based on the lapb module by
|
||||
* Olivier Abad <oabad@cybercable.fr>
|
||||
*
|
||||
* $Id: packet-lapbether.c,v 1.4 2001/01/09 06:31:38 guy Exp $
|
||||
* $Id: packet-lapbether.c,v 1.5 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -54,12 +54,10 @@ dissect_lapbether(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
int len;
|
||||
tvbuff_t *next_tvb;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_lapbether, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "LAPBETHER";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "LAPBETHER");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
|
||||
len = tvb_get_guint8(tvb, 0) + tvb_get_guint8(tvb, 1) * 256;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-ldp.c
|
||||
* Routines for ldp packet disassembly
|
||||
*
|
||||
* $Id: packet-ldp.c,v 1.13 2001/01/09 06:31:38 guy Exp $
|
||||
* $Id: packet-ldp.c,v 1.14 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Copyright (c) November 2000 by Richard Sharpe <rsharpe@ns.aus.com>
|
||||
*
|
||||
|
@ -541,13 +541,10 @@ dissect_ldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
int offset = 0, msg_cnt = 0;
|
||||
guint16 ldp_message = 0;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_ldp, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "LDP";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
|
||||
col_add_str(pinfo->fd, COL_PROTOCOL, "LDP");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
|
||||
if (tree) { /* Build the tree info ..., this is wrong! FIXME */
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de>
|
||||
*
|
||||
* $Id: packet-m3ua.c,v 1.3 2001/01/14 10:15:56 guy Exp $
|
||||
* $Id: packet-m3ua.c,v 1.4 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@unicom.net>
|
||||
|
@ -821,10 +821,6 @@ dissect_m3ua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item *m3ua_item;
|
||||
proto_tree *m3ua_tree;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_m3ua, message_tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "M3UA";
|
||||
|
||||
/* make entry in the Protocol column on summary display */
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "M3UA");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-mapi.c
|
||||
* Routines for MSX mapi packet dissection
|
||||
*
|
||||
* $Id: packet-mapi.c,v 1.13 2001/01/09 06:31:38 guy Exp $
|
||||
* $Id: packet-mapi.c,v 1.14 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -55,10 +55,6 @@ dissect_mapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
proto_tree *mapi_tree, *ti;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_mapi, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "MAPI";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "MAPI");
|
||||
|
||||
|
|
28
packet-mip.c
28
packet-mip.c
|
@ -2,7 +2,7 @@
|
|||
* Routines for Mobile IP dissection
|
||||
* Copyright 2000, Stefan Raab <Stefan.Raab@nextel.com>
|
||||
*
|
||||
* $Id: packet-mip.c,v 1.12 2001/01/09 06:31:38 guy Exp $
|
||||
* $Id: packet-mip.c,v 1.13 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@unicom.net>
|
||||
|
@ -136,7 +136,7 @@ static const value_string mip_reply_codes[]= {
|
|||
|
||||
/* Code to actually dissect the packets */
|
||||
static void
|
||||
dissect_mip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
|
||||
dissect_mip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
|
||||
/* Set up structures we will need to add the protocol subtree and manage it */
|
||||
|
@ -144,25 +144,19 @@ dissect_mip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
|
|||
proto_tree *mip_tree;
|
||||
guint8 type, code;
|
||||
|
||||
/* Make our own tvb until the function call includes one */
|
||||
tvbuff_t *tvb;
|
||||
packet_info *pinfo = π
|
||||
tvb = tvb_create_from_top(offset);
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_mip, tvb, pinfo, tree);
|
||||
|
||||
/* Make entries in Protocol column and Info column on summary display */
|
||||
|
||||
pinfo->current_proto = "Mobile IP";
|
||||
if (check_col(fd, COL_PROTOCOL))
|
||||
col_set_str(fd, COL_PROTOCOL, "mip");
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "Mobile IP");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
|
||||
type = tvb_get_guint8(tvb, 0);
|
||||
|
||||
if (type==1) {
|
||||
|
||||
if (check_col(fd, COL_INFO))
|
||||
col_set_str(fd, COL_INFO, "Mobile IP Registration Request");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_set_str(pinfo->fd, COL_INFO, "Mobile IP Registration Request");
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_mip, tvb, 0, tvb_length(tvb), FALSE);
|
||||
|
@ -187,8 +181,8 @@ dissect_mip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
|
|||
|
||||
|
||||
if (type==3){
|
||||
if (check_col(fd, COL_INFO))
|
||||
col_set_str(fd, COL_INFO, "Mobile IP Registration Reply");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_set_str(pinfo->fd, COL_INFO, "Mobile IP Registration Reply");
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_mip, tvb, 0, tvb_length(tvb), FALSE);
|
||||
|
@ -299,5 +293,5 @@ void proto_register_mip(void)
|
|||
void
|
||||
proto_reg_handoff_mip(void)
|
||||
{
|
||||
old_dissector_add("udp.port", UDP_PORT_MIP, dissect_mip, proto_mip);
|
||||
dissector_add("udp.port", UDP_PORT_MIP, dissect_mip, proto_mip);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
|
||||
*
|
||||
* $Id: packet-mpls.c,v 1.16 2001/01/09 06:31:38 guy Exp $
|
||||
* $Id: packet-mpls.c,v 1.17 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -145,10 +145,6 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item *ti;
|
||||
tvbuff_t *next_tvb;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_mpls, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "MPLS";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL)) {
|
||||
col_set_str(pinfo->fd,COL_PROTOCOL, "MPLS");
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Jason Lango <jal@netapp.com>
|
||||
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
|
||||
*
|
||||
* $Id: packet-rtsp.c,v 1.35 2001/01/13 02:28:27 guy Exp $
|
||||
* $Id: packet-rtsp.c,v 1.36 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -659,12 +659,10 @@ dissect_rtsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
int offset = 0;
|
||||
int len;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_rtsp, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "RTSP";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "RTSP");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
|
||||
while (tvb_offset_exists(tvb, offset)) {
|
||||
len = (tvb_get_guint8(tvb, offset) == RTSP_FRAMEHDR)
|
||||
|
|
14
packet-sap.c
14
packet-sap.c
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Heikki Vatiainen <hessu@cs.tut.fi>
|
||||
*
|
||||
* $Id: packet-sap.c,v 1.18 2001/01/09 06:31:41 guy Exp $
|
||||
* $Id: packet-sap.c,v 1.19 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -142,8 +142,11 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item *si, *sif;
|
||||
proto_tree *sap_tree, *sap_flags_tree;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_sap, tvb, pinfo, tree);
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "SAP");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
|
||||
vers_flags = tvb_get_guint8(tvb, offset);
|
||||
is_ipv6 = vers_flags&MCAST_SAP_BIT_A;
|
||||
is_del = vers_flags&MCAST_SAP_BIT_T;
|
||||
|
@ -153,11 +156,6 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
sap_version = (vers_flags&MCAST_SAP_VERSION_MASK)>>MCAST_SAP_VERSION_SHIFT;
|
||||
addr_len = (is_ipv6) ? sizeof(struct e_in6_addr) : 4;
|
||||
|
||||
pinfo->current_proto = "SAP";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "SAP");
|
||||
|
||||
if (check_col(pinfo->fd, COL_INFO)) {
|
||||
col_add_fstr(pinfo->fd, COL_INFO, "%s (v%u)",
|
||||
(is_del) ? "Deletion" : "Announcement", sap_version);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for Stream Control Transmission Protocol dissection
|
||||
* Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de>
|
||||
*
|
||||
* $Id: packet-sctp.c,v 1.12 2001/01/14 08:27:25 guy Exp $
|
||||
* $Id: packet-sctp.c,v 1.13 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@unicom.net>
|
||||
|
@ -1630,10 +1630,6 @@ dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item *sctp_item;
|
||||
proto_tree *sctp_tree;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_sctp, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "SCTP";
|
||||
|
||||
/* Extract the common header */
|
||||
source_port = tvb_get_ntohs(tvb, SOURCE_PORT_OFFSET);
|
||||
destination_port = tvb_get_ntohs(tvb, DESTINATION_PORT_OFFSET);
|
||||
|
@ -1641,9 +1637,9 @@ dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
checksum = tvb_get_ntohl(tvb, CHECKSUM_OFFSET);
|
||||
|
||||
/* update pi structure */
|
||||
pi.ptype = PT_SCTP;
|
||||
pi.srcport = source_port;
|
||||
pi.destport = destination_port;
|
||||
pinfo->ptype = PT_SCTP;
|
||||
pinfo->srcport = source_port;
|
||||
pinfo->destport = destination_port;
|
||||
|
||||
/* make entry in the Protocol column on summary display */
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Jason Lango <jal@netapp.com>
|
||||
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
|
||||
*
|
||||
* $Id: packet-sdp.c,v 1.19 2001/01/09 06:31:43 guy Exp $
|
||||
* $Id: packet-sdp.c,v 1.20 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -61,10 +61,6 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
const char *typename;
|
||||
int datalen;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_sdp, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "SDP";
|
||||
|
||||
/*
|
||||
* As RFC 2327 says, "SDP is purely a format for session
|
||||
* description - it does not incorporate a transport protocol,
|
||||
|
|
13
packet-sip.c
13
packet-sip.c
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
|
||||
*
|
||||
* $Id: packet-sip.c,v 1.10 2001/01/09 06:31:43 guy Exp $
|
||||
* $Id: packet-sip.c,v 1.11 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -75,12 +75,17 @@ static void dissect_sip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tvbuff_t *next_tvb;
|
||||
gboolean is_request;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_sip, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "SIP";
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "SIP");
|
||||
|
||||
/*
|
||||
* Note that "tvb_strneql()" doesn't throw exceptions, so
|
||||
* "sip_is_request()" won't throw an exception.
|
||||
*
|
||||
* Note that "tvb_find_line_end()" will return a value that
|
||||
* is not longer than what's in the buffer, so the
|
||||
* "tvb_get_ptr()" call s below won't throw exceptions.
|
||||
*/
|
||||
offset = 0;
|
||||
is_request = sip_is_request(tvb, 0);
|
||||
eol = tvb_find_line_end(tvb, 0, -1, &next_offset);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-smtp.c
|
||||
* Routines for SMTP packet disassembly
|
||||
*
|
||||
* $Id: packet-smtp.c,v 1.14 2001/01/09 06:31:43 guy Exp $
|
||||
* $Id: packet-smtp.c,v 1.15 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
|
||||
*
|
||||
|
@ -174,10 +174,6 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
gboolean is_continuation_line;
|
||||
int cmdlen;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_smtp, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "SMTP";
|
||||
|
||||
/* As there is no guarantee that we will only see frames in the
|
||||
* the SMTP conversation once, and that we will see them in
|
||||
* order - in Ethereal, the user could randomly click on frames
|
||||
|
@ -204,10 +200,14 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* SMTP messages have a simple format ... */
|
||||
|
||||
request = pinfo -> destport == TCP_PORT_SMTP;
|
||||
request = pinfo -> destport == pinfo -> match_port;
|
||||
|
||||
/*
|
||||
* Get the first line from the buffer.
|
||||
*
|
||||
* Note that "tvb_find_line_end()" will return a value that
|
||||
* is not longer than what's in the buffer, so the
|
||||
* "tvb_get_ptr()" call won't throw an exception.
|
||||
*/
|
||||
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset);
|
||||
line = tvb_get_ptr(tvb, offset, linelen);
|
||||
|
|
11
packet-sna.c
11
packet-sna.c
|
@ -2,7 +2,7 @@
|
|||
* Routines for SNA
|
||||
* Gilbert Ramirez <gram@xiexie.org>
|
||||
*
|
||||
* $Id: packet-sna.c,v 1.24 2001/01/10 04:17:13 gram Exp $
|
||||
* $Id: packet-sna.c,v 1.25 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -327,9 +327,10 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
int sna_header_len = 0, th_header_len = 0;
|
||||
int offset;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_sna, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "SNA";
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "SNA");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
|
||||
/* SNA data should be printed in EBCDIC, not ASCII */
|
||||
pinfo->fd->flags.encoding = CHAR_EBCDIC;
|
||||
|
@ -338,8 +339,6 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
th_fid = hi_nibble(tvb_get_guint8(tvb, 0));
|
||||
|
||||
/* Summary information */
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "SNA");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_add_str(pinfo->fd, COL_INFO,
|
||||
val_to_str(th_fid, sna_th_fid_vals, "Unknown FID: %01x"));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright 2000, Gerald Combs <gerald@zing.org>
|
||||
*
|
||||
* $Id: packet-syslog.c,v 1.9 2001/01/09 06:31:44 guy Exp $
|
||||
* $Id: packet-syslog.c,v 1.10 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -145,9 +145,11 @@ static void dissect_syslog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree *syslog_tree;
|
||||
gchar msg_str[COL_INFO_LEN];
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_syslog, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "Syslog";
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "Syslog");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_clear(pinfo->fd, COL_INFO);
|
||||
|
||||
msg_len = tvb_length(tvb);
|
||||
|
||||
if (tvb_get_guint8(tvb, 0) == '<' && isdigit(tvb_get_guint8(tvb, 1))) {
|
||||
|
@ -174,9 +176,6 @@ static void dissect_syslog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
msg_str[msg_len] = '\0';
|
||||
}
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "Syslog");
|
||||
|
||||
if (check_col(pinfo->fd, COL_INFO)) {
|
||||
if (pri >= 0) {
|
||||
col_add_fstr(pinfo->fd, COL_INFO, "%s.%s: %s",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for telnet packet dissection
|
||||
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
|
||||
*
|
||||
* $Id: packet-telnet.c,v 1.23 2001/01/09 06:31:44 guy Exp $
|
||||
* $Id: packet-telnet.c,v 1.24 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -363,10 +363,6 @@ dissect_telnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
proto_tree *telnet_tree, *ti;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_telnet, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "TELNET";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "TELNET");
|
||||
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
* Routines for time packet dissection
|
||||
*
|
||||
* Richard Sharpe <rsharpe@ns.aus.com>
|
||||
* Craig Newell <CraigN@cheque.uq.edu.au>
|
||||
* RFC2347 TIME Option Extension
|
||||
*
|
||||
* $Id: packet-time.c,v 1.12 2001/01/09 06:31:44 guy Exp $
|
||||
* $Id: packet-time.c,v 1.13 2001/01/25 06:14:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -47,16 +45,12 @@ dissect_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree *time_tree;
|
||||
proto_item *ti;
|
||||
|
||||
CHECK_DISPLAY_AS_DATA(proto_time, tvb, pinfo, tree);
|
||||
|
||||
pinfo->current_proto = "TIME";
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "TIME");
|
||||
|
||||
if (check_col(pinfo->fd, COL_INFO)) {
|
||||
col_add_fstr(pinfo->fd, COL_INFO, "TIME %s",
|
||||
pinfo->srcport == UDP_PORT_TIME? "Response":"Request");
|
||||
pinfo->srcport == pinfo->match_port ? "Response":"Request");
|
||||
}
|
||||
|
||||
if (tree) {
|
||||
|
|
Loading…
Reference in New Issue