diff options
-rw-r--r-- | packet-ascend.c | 6 | ||||
-rw-r--r-- | packet-auto_rp.c | 8 | ||||
-rw-r--r-- | packet-cdp.c | 6 | ||||
-rw-r--r-- | packet-cgmp.c | 6 | ||||
-rw-r--r-- | packet-dec-bpdu.c | 9 | ||||
-rw-r--r-- | packet-fr.c | 5 | ||||
-rw-r--r-- | packet-iua.c | 8 | ||||
-rw-r--r-- | packet-l2tp.c | 7 | ||||
-rw-r--r-- | packet-lapbether.c | 8 | ||||
-rw-r--r-- | packet-ldp.c | 9 | ||||
-rw-r--r-- | packet-m3ua.c | 6 | ||||
-rw-r--r-- | packet-mapi.c | 6 | ||||
-rw-r--r-- | packet-mip.c | 28 | ||||
-rw-r--r-- | packet-mpls.c | 6 | ||||
-rw-r--r-- | packet-rtsp.c | 8 | ||||
-rw-r--r-- | packet-sap.c | 14 | ||||
-rw-r--r-- | packet-sctp.c | 12 | ||||
-rw-r--r-- | packet-sdp.c | 6 | ||||
-rw-r--r-- | packet-sip.c | 13 | ||||
-rw-r--r-- | packet-smtp.c | 12 | ||||
-rw-r--r-- | packet-sna.c | 11 | ||||
-rw-r--r-- | packet-syslog.c | 13 | ||||
-rw-r--r-- | packet-telnet.c | 6 | ||||
-rw-r--r-- | packet-time.c | 10 |
24 files changed, 78 insertions, 145 deletions
diff --git a/packet-ascend.c b/packet-ascend.c index 0f14be87a4..d9f4e23aaf 100644 --- a/packet-ascend.c +++ b/packet-ascend.c @@ -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)) diff --git a/packet-auto_rp.c b/packet-auto_rp.c index 5fe5d79b67..8c13753085 100644 --- a/packet-auto_rp.c +++ b/packet-auto_rp.c @@ -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); diff --git a/packet-cdp.c b/packet-cdp.c index 71705b55e9..8c90cd4acb 100644 --- a/packet-cdp.c +++ b/packet-cdp.c @@ -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)) diff --git a/packet-cgmp.c b/packet-cgmp.c index 5d53e01e62..9a5d50baba 100644 --- a/packet-cgmp.c +++ b/packet-cgmp.c @@ -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)) diff --git a/packet-dec-bpdu.c b/packet-dec-bpdu.c index 11eff73ed0..9bb850f0dc 100644 --- a/packet-dec-bpdu.c +++ b/packet-dec-bpdu.c @@ -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); diff --git a/packet-fr.c b/packet-fr.c index 89e0c8a597..3d0efc7d1d 100644 --- a/packet-fr.c +++ b/packet-fr.c @@ -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)) diff --git a/packet-iua.c b/packet-iua.c index 867e8f7b68..d88ddf155f 100644 --- a/packet-iua.c +++ b/packet-iua.c @@ -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); } - - diff --git a/packet-l2tp.c b/packet-l2tp.c index 1a40ccfd3e..13b5a7a931 100644 --- a/packet-l2tp.c +++ b/packet-l2tp.c @@ -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); diff --git a/packet-lapbether.c b/packet-lapbether.c index 50fc818fb5..d9e4164382 100644 --- a/packet-lapbether.c +++ b/packet-lapbether.c @@ -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; diff --git a/packet-ldp.c b/packet-ldp.c index fa3b23915e..7edade1830 100644 --- a/packet-ldp.c +++ b/packet-ldp.c @@ -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 */ diff --git a/packet-m3ua.c b/packet-m3ua.c index 9ecea83f7b..bebb6853e7 100644 --- a/packet-m3ua.c +++ b/packet-m3ua.c @@ -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"); diff --git a/packet-mapi.c b/packet-mapi.c index 0716e93697..d7f0c90177 100644 --- a/packet-mapi.c +++ b/packet-mapi.c @@ -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"); diff --git a/packet-mip.c b/packet-mip.c index f7016d7e21..1c0bf06fde 100644 --- a/packet-mip.c +++ b/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); } diff --git a/packet-mpls.c b/packet-mpls.c index d8017a6eac..26896897fa 100644 --- a/packet-mpls.c +++ b/packet-mpls.c @@ -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"); } diff --git a/packet-rtsp.c b/packet-rtsp.c index bd7015d80b..6a2016b6bf 100644 --- a/packet-rtsp.c +++ b/packet-rtsp.c @@ -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) diff --git a/packet-sap.c b/packet-sap.c index 071cdef3c5..8485a667bc 100644 --- a/packet-sap.c +++ b/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); diff --git a/packet-sctp.c b/packet-sctp.c index 9b7eb3173a..fe4f202445 100644 --- a/packet-sctp.c +++ b/packet-sctp.c @@ -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)) diff --git a/packet-sdp.c b/packet-sdp.c index 73c465047c..b76019c05b 100644 --- a/packet-sdp.c +++ b/packet-sdp.c @@ -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, diff --git a/packet-sip.c b/packet-sip.c index 0463916ada..c51b9a0aaf 100644 --- a/packet-sip.c +++ b/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); diff --git a/packet-smtp.c b/packet-smtp.c index ae4ca6e633..3ad8e2be84 100644 --- a/packet-smtp.c +++ b/packet-smtp.c @@ -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); diff --git a/packet-sna.c b/packet-sna.c index a4550cff3c..b36f0e9664 100644 --- a/packet-sna.c +++ b/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")); diff --git a/packet-syslog.c b/packet-syslog.c index 9759d4032c..dba6252a6e 100644 --- a/packet-syslog.c +++ b/packet-syslog.c @@ -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", diff --git a/packet-telnet.c b/packet-telnet.c index 57d0d8d643..93a8809a61 100644 --- a/packet-telnet.c +++ b/packet-telnet.c @@ -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"); diff --git a/packet-time.c b/packet-time.c index d5be771020..4f1bb40f5f 100644 --- a/packet-time.c +++ b/packet-time.c @@ -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) { |