Add the "Edit:Protocols..." feature which currently only implements

the following:

It is now possible to enable/disable a particular protocol decoding
(i.e. the protocol dissector is void or not). When a protocol
is disabled, it is displayed as Data and of course, all linked
sub-protocols are disabled as well.

Disabling a protocol could be interesting:

- in case of buggy dissectors
- in case of wrong heuristics
- for performance reasons
- to decode the data as another protocol (TODO)

Currently (if I am not wrong), all dissectors but NFS can be disabled
(and dissectors that do not register protocols :-)

I do not like the way the RPC sub-dissectors are disabled (in the
sub-dissectors) since this could be done in the RPC dissector itself,
knowing the sub-protocol hfinfo entry (this is why, I've not modified
the NFS one yet).

Two functions are added in proto.c :

gboolean proto_is_protocol_enabled(int n);
void proto_set_decoding(int n, gboolean enabled);

and two MACROs which can be used in dissectors:

OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree)
CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree)

See also the XXX in proto_dlg.c and proto.c around the new functions.

svn path=/trunk/; revision=2267
This commit is contained in:
Laurent Deniel 2000-08-13 14:09:15 +00:00
parent db31ba13c8
commit cc36f0b931
123 changed files with 866 additions and 121 deletions

View File

@ -42,6 +42,7 @@ Laurent Deniel <deniel@worldnet.fr> {
Many display filters added
GUI enhancements (about & help windows)
Follow TCP stream for IPv6
Protocol activation/deactivation (Edit:protocols)
Miscellaneous enhancements and fixes
}

View File

@ -1,7 +1,7 @@
# Makefile.am
# Automake file for the GTK interface routines for Ethereal
#
# $Id: Makefile.am,v 1.29 2000/08/08 12:24:31 deniel Exp $
# $Id: Makefile.am,v 1.30 2000/08/13 14:03:49 deniel Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@zing.org>
@ -72,6 +72,8 @@ libui_a_SOURCES = \
print_prefs.c \
print_prefs.h \
progress_dlg.c \
proto_dlg.c \
proto_dlg.h \
proto_draw.c \
proto_draw.h \
simple_dialog.c \

View File

@ -35,6 +35,7 @@ OBJECTS=capture_dlg.obj \
print_dlg.obj \
print_prefs.obj \
progress_dlg.obj \
proto_dlg.obj \
proto_draw.obj \
simple_dialog.obj \
stream_prefs.obj \

View File

@ -1,7 +1,7 @@
/* menu.c
* Menu routines
*
* $Id: menu.c,v 1.34 2000/08/09 06:43:22 guy Exp $
* $Id: menu.c,v 1.35 2000/08/13 14:03:50 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -55,6 +55,7 @@
#include "print.h"
#include "follow_dlg.h"
#include "help_dlg.h"
#include "proto_dlg.h"
#include "keys.h"
#include "plugins.h"
@ -112,6 +113,7 @@ static GtkItemFactoryEntry menu_items[] =
{"/Edit/<separator>", NULL, NULL, 0, "<Separator>"},
{"/Edit/_Preferences...", NULL, GTK_MENU_FUNC(prefs_cb), 0, NULL},
{"/Edit/_Filters...", NULL, GTK_MENU_FUNC(filter_dialog_cb), 0, NULL},
{"/Edit/P_rotocols...", NULL, GTK_MENU_FUNC(proto_cb), 0, NULL},
#ifdef HAVE_LIBPCAP
{"/_Capture", NULL, NULL, 0, "<Branch>" },
{"/Capture/_Start...", "<control>K", GTK_MENU_FUNC(capture_prep_cb), 0, NULL},

287
gtk/proto_dlg.c Normal file
View File

@ -0,0 +1,287 @@
/* proto_dlg.c
*
* $Id: proto_dlg.c,v 1.1 2000/08/13 14:03:49 deniel Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2000 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.
*
*/
/*
* TODO :
*
* Modify proto.c to have a better protocol characteristics database
* such as ordered list or hash table. This would allow a quick search
* knowing the protocol abbreviation and to enhance this stuff by adding
* other fields (hfinfo is currently limited since protocols and fields
* share the same structure type).
*
* The protocol display should be sorted (by abbreviation).
*
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <gtk/gtk.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include "prefs.h"
#include "globals.h"
#include "gtkglobals.h"
#include "main.h"
#include "util.h"
#include "ui_util.h"
#include "dlg_utils.h"
#include "proto_dlg.h"
static void proto_ok_cb(GtkWidget *, gpointer);
static void proto_apply_cb(GtkWidget *, gpointer);
static void proto_close_cb(GtkWidget *, gpointer);
static void show_proto_selection(GtkWidget *main, GtkWidget *container);
static gboolean set_proto_selection(GtkWidget *);
static GtkWidget *proto_w = NULL;
void proto_cb(GtkWidget *w, gpointer data)
{
GtkWidget *main_vb, *bbox, *proto_nb, *apply_bt, *cancel_bt, *ok_bt,
*label, *scrolled_w, *selection_vb;
if (proto_w != NULL) {
reactivate_window(proto_w);
return;
}
proto_w = dlg_window_new();
gtk_window_set_title(GTK_WINDOW(proto_w), "Ethereal: Protocol");
gtk_signal_connect(GTK_OBJECT(proto_w), "destroy",
GTK_SIGNAL_FUNC(proto_close_cb), NULL);
gtk_widget_set_usize(GTK_WIDGET(proto_w), DEF_WIDTH * 2/3, DEF_HEIGHT * 2/3);
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 0);
gtk_container_border_width(GTK_CONTAINER(main_vb), 1);
gtk_container_add(GTK_CONTAINER(proto_w), main_vb);
gtk_widget_show(main_vb);
/* Protocol topics container */
proto_nb = gtk_notebook_new();
gtk_container_add(GTK_CONTAINER(main_vb), proto_nb);
/* XXX do not know why I need this to fill all space around buttons */
gtk_widget_set_usize(GTK_WIDGET(proto_nb), DEF_WIDTH * 2/3 - 50,
DEF_HEIGHT * 2/3 - 50);
/* Protocol selection panel ("enable/disable" protocols) */
selection_vb = gtk_vbox_new(FALSE, 0);
gtk_container_border_width(GTK_CONTAINER(selection_vb), 1);
label = gtk_label_new("Button pressed: protocol decoding is enabled");
gtk_widget_show(label);
gtk_box_pack_start(GTK_BOX(selection_vb), label, FALSE, FALSE, 0);
scrolled_w = gtk_scrolled_window_new(NULL, NULL);
gtk_container_set_border_width(GTK_CONTAINER(scrolled_w), 1);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_w),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_ALWAYS);
set_scrollbar_placement_scrollw(scrolled_w, prefs.gui_scrollbar_on_right);
remember_scrolled_window(scrolled_w);
gtk_box_pack_start(GTK_BOX(selection_vb), scrolled_w, TRUE, TRUE, 0);
show_proto_selection(proto_w, scrolled_w);
gtk_widget_show(scrolled_w);
gtk_widget_show(selection_vb);
label = gtk_label_new("Decoding");
gtk_notebook_append_page(GTK_NOTEBOOK(proto_nb), selection_vb, label);
label = gtk_label_new("Note that when a protocol is disabled, "
"all linked sub-protocols are as well");
gtk_widget_show(label);
gtk_box_pack_start(GTK_BOX(selection_vb), label, FALSE, FALSE, 0);
/* XXX add other protocol-related panels here ... */
gtk_widget_show(proto_nb);
/* Ok, Apply, Cancel Buttons */
bbox = gtk_hbutton_box_new();
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
gtk_container_add(GTK_CONTAINER(main_vb), bbox);
gtk_widget_show(bbox);
ok_bt = gtk_button_new_with_label ("OK");
gtk_signal_connect(GTK_OBJECT(ok_bt), "clicked",
GTK_SIGNAL_FUNC(proto_ok_cb), GTK_OBJECT(proto_w));
GTK_WIDGET_SET_FLAGS(ok_bt, GTK_CAN_DEFAULT);
gtk_box_pack_start(GTK_BOX (bbox), ok_bt, TRUE, TRUE, 0);
gtk_widget_grab_default(ok_bt);
gtk_widget_show(ok_bt);
apply_bt = gtk_button_new_with_label ("Apply");
gtk_signal_connect(GTK_OBJECT(apply_bt), "clicked",
GTK_SIGNAL_FUNC(proto_apply_cb), GTK_OBJECT(proto_w));
GTK_WIDGET_SET_FLAGS(apply_bt, GTK_CAN_DEFAULT);
gtk_box_pack_start(GTK_BOX (bbox), apply_bt, TRUE, TRUE, 0);
gtk_widget_show(apply_bt);
cancel_bt = gtk_button_new_with_label ("Cancel");
gtk_signal_connect(GTK_OBJECT(cancel_bt), "clicked",
GTK_SIGNAL_FUNC(proto_close_cb), GTK_OBJECT(proto_w));
GTK_WIDGET_SET_FLAGS(cancel_bt, GTK_CAN_DEFAULT);
gtk_box_pack_start(GTK_BOX (bbox), cancel_bt, TRUE, TRUE, 0);
gtk_widget_show(cancel_bt);
dlg_set_cancel(proto_w, cancel_bt);
gtk_quit_add_destroy(gtk_main_level(), GTK_OBJECT(proto_w));
gtk_widget_show(proto_w);
} /* proto_cb */
static void proto_close_cb(GtkWidget *w, gpointer data)
{
if (proto_w)
gtk_widget_destroy(proto_w);
proto_w = NULL;
}
static void proto_ok_cb(GtkWidget *ok_bt, gpointer parent_w)
{
gboolean redissect;
redissect = set_proto_selection(GTK_WIDGET(parent_w));
gtk_widget_destroy(GTK_WIDGET(parent_w));
if (redissect)
redissect_packets(&cfile);
}
static void proto_apply_cb(GtkWidget *ok_bt, gpointer parent_w)
{
if (set_proto_selection(GTK_WIDGET(parent_w)))
redissect_packets(&cfile);
}
static gboolean set_proto_selection(GtkWidget *parent_w)
{
int i;
gboolean need_redissect = FALSE;
for (i = 0; i < proto_registrar_n() ; i++) {
if (proto_registrar_is_protocol(i)) {
GtkWidget *button;
header_field_info *hfinfo;
hfinfo = proto_registrar_get_nth(i);
if (strcmp(hfinfo->abbrev, "data") == 0 ||
strcmp(hfinfo->abbrev, "text") == 0 ||
strcmp(hfinfo->abbrev, "malformed") == 0 ||
strcmp(hfinfo->abbrev, "short") == 0 ||
strcmp(hfinfo->abbrev, "frame") == 0) continue;
button = (GtkWidget *) gtk_object_get_data(GTK_OBJECT(parent_w),
hfinfo->abbrev);
/* XXX optimization but should not use display field */
if (hfinfo->display != GTK_TOGGLE_BUTTON (button)->active) {
proto_set_decoding(i, GTK_TOGGLE_BUTTON (button)->active);
need_redissect = TRUE;
}
}
}
return need_redissect;
} /* set_proto_selection */
static void show_proto_selection(GtkWidget *main, GtkWidget *container)
{
/* XXX : we should sort the protocol abbrev */
#define NB_COL 7
GtkTooltips *tooltips;
GtkWidget *table;
int i, t = 0, l = 0, nb_line, nb_proto = 0;
/* Obtain the number of "true" protocols */
for (i = 0; i < proto_registrar_n() ; i++) {
if (proto_registrar_is_protocol(i)) {
nb_proto ++;
}
}
/* XXX ignore "data", "malformed", "short", "frame", "text" */
nb_proto -= 5;
/* create a table (n x NB_COL) of buttons */
nb_line = (nb_proto % NB_COL) ? nb_proto / NB_COL + 1 : nb_proto / NB_COL;
table = gtk_table_new (nb_line, NB_COL, FALSE);
gtk_table_set_row_spacings(GTK_TABLE (table), 1);
gtk_table_set_col_spacings(GTK_TABLE (table), 1);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(container), table);
gtk_widget_show(table);
tooltips = gtk_tooltips_new();
nb_proto = 0;
for (i = 0; i < proto_registrar_n() ; i++) {
if (proto_registrar_is_protocol(i)) {
GtkWidget *button;
header_field_info *hfinfo;
hfinfo = proto_registrar_get_nth(i);
if (strcmp(hfinfo->abbrev, "data") == 0 ||
strcmp(hfinfo->abbrev, "text") == 0 ||
strcmp(hfinfo->abbrev, "malformed") == 0 ||
strcmp(hfinfo->abbrev, "short") == 0 ||
strcmp(hfinfo->abbrev, "frame") == 0) continue;
/* button label is the protocol abbrev */
button = gtk_toggle_button_new_with_label (hfinfo->abbrev);
/* tip is the complete protocol name */
gtk_tooltips_set_tip(tooltips, button, hfinfo->name, NULL);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), hfinfo->display);
gtk_object_set_data(GTK_OBJECT(main), hfinfo->abbrev, button);
gtk_table_attach_defaults (GTK_TABLE (table), button, l, l+1, t, t+1);
gtk_widget_show (button);
if (++nb_proto % NB_COL) {
l++;
}
else {
l = 0;
t++;
}
}
}
} /* show_proto_selection */

32
gtk/proto_dlg.h Normal file
View File

@ -0,0 +1,32 @@
/* proto_dlg.h
*
* $Id: proto_dlg.h,v 1.1 2000/08/13 14:03:49 deniel Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2000 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.
*
*/
#ifndef __PROTO_DLG_H__
#define __PROTO_DLG_H__
void proto_cb(GtkWidget *, gpointer);
#endif

View File

@ -1,7 +1,7 @@
/* packet-aarp.c
* Routines for Appletalk ARP packet disassembly
*
* $Id: packet-aarp.c,v 1.21 2000/08/07 03:20:20 guy Exp $
* $Id: packet-aarp.c,v 1.22 2000/08/13 14:07:55 deniel Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@ -139,6 +139,8 @@ dissect_aarp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
int sha_offset, spa_offset, tha_offset, tpa_offset;
gchar *sha_str, *spa_str, *tha_str, *tpa_str;
OLD_CHECK_DISPLAY_AS_DATA(proto_aarp, pd, offset, fd, tree);
if (!BYTES_ARE_IN_FRAME(offset, MIN_AARP_HEADER_SIZE)) {
old_dissect_data(pd, offset, fd, tree);
return;

View File

@ -6,7 +6,7 @@
* Portions based on information retrieved from the RX definitions
* in Arla, the free AFS client at http://www.stacken.kth.se/project/arla/
*
* $Id: packet-afs.c,v 1.12 2000/06/21 04:41:30 guy Exp $
* $Id: packet-afs.c,v 1.13 2000/08/13 14:07:56 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -728,6 +728,8 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
void (*dissector)(const u_char *pd, int offset,
frame_data *fd, proto_tree *tree, int opcode);
OLD_CHECK_DISPLAY_AS_DATA(proto_afs, pd, offset, fd, tree);
rxh = (struct rx_header *) &pd[offset];
doffset = offset + sizeof(struct rx_header);
afsh = (struct afs_header *) &pd[doffset];

View File

@ -1,7 +1,7 @@
/* packet-arp.c
* Routines for ARP packet disassembly
*
* $Id: packet-arp.c,v 1.32 2000/08/10 20:09:29 deniel Exp $
* $Id: packet-arp.c,v 1.33 2000/08/13 14:07:58 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -564,6 +564,8 @@ dissect_arp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int sha_offset, spa_offset, tha_offset, tpa_offset;
gchar *sha_str, *spa_str, *tha_str, *tpa_str;
OLD_CHECK_DISPLAY_AS_DATA(proto_arp, pd, offset, fd, tree);
if (!BYTES_ARE_IN_FRAME(offset, MIN_ARP_HEADER_SIZE)) {
old_dissect_data(pd, offset, fd, tree);
return;

View File

@ -1,7 +1,7 @@
/* packet-ascend.c
* Routines for decoding Lucent/Ascend packet traces
*
* $Id: packet-ascend.c,v 1.16 2000/05/31 05:06:51 guy Exp $
* $Id: packet-ascend.c,v 1.17 2000/08/13 14:08:00 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -59,6 +59,8 @@ 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

View File

@ -1,7 +1,7 @@
/* packet-atalk.c
* Routines for Appletalk packet disassembly (DDP, currently).
*
* $Id: packet-atalk.c,v 1.39 2000/08/07 03:20:22 guy Exp $
* $Id: packet-atalk.c,v 1.40 2000/08/13 14:08:00 deniel Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@ -196,6 +196,8 @@ dissect_rtmp_data(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
guint16 node; /* might be more than 8 bits */
int i;
OLD_CHECK_DISPLAY_AS_DATA(proto_rtmp, pd, offset, fd, tree);
if (!BYTES_ARE_IN_FRAME(offset, 3)) {
old_dissect_data(pd, offset, fd, tree);
return;
@ -292,6 +294,8 @@ dissect_nbp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
guint op, count;
int i;
OLD_CHECK_DISPLAY_AS_DATA(proto_nbp, pd, offset, fd, tree);
if (!BYTES_ARE_IN_FRAME(offset, 2)) {
old_dissect_data(pd, offset, fd, tree);
return;
@ -370,6 +374,8 @@ dissect_ddp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
proto_item *ti;
static struct atalk_ddp_addr src, dst;
OLD_CHECK_DISPLAY_AS_DATA(proto_ddp, pd, offset, fd, tree);
if (!BYTES_ARE_IN_FRAME(offset, DDP_HEADER_SIZE)) {
old_dissect_data(pd, offset, fd, tree);
return;

View File

@ -1,7 +1,7 @@
/* packet-atm.c
* Routines for ATM packet disassembly
*
* $Id: packet-atm.c,v 1.23 2000/08/07 03:20:22 guy Exp $
* $Id: packet-atm.c,v 1.24 2000/08/13 14:08:02 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -378,6 +378,8 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb;
tvbuff_t *next_tvb_le_client;
CHECK_DISPLAY_AS_DATA(proto_atm_lane, tvb, pinfo, tree);
pinfo->current_proto = "ATM LANE";
if (check_col(pinfo->fd, COL_PROTOCOL))
@ -564,6 +566,8 @@ dissect_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const guint8 *pd;
int offset;
CHECK_DISPLAY_AS_DATA(proto_atm, tvb, pinfo, tree);
pinfo->current_proto = "ATM";
aal_type = pinfo->pseudo_header->ngsniffer_atm.AppTrafType & ATT_AALTYPE;
@ -736,6 +740,7 @@ dissect_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case ATT_HL_ILMI:
CHECK_DISPLAY_AS_DATA(proto_ilmi, tvb, pinfo, tree);
tvb_compat(tvb, &pd, &offset);
dissect_snmp_pdu(pd, offset, pinfo->fd, tree, "ILMI", proto_ilmi, ett_ilmi);
break;

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-auto_rp.c,v 1.7 2000/08/07 03:20:23 guy Exp $
* $Id: packet-auto_rp.c,v 1.8 2000/08/13 14:08:02 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -123,6 +123,8 @@ static void dissect_auto_rp(const u_char *pd, int offset, frame_data *fd, proto_
struct auto_rp_fixed_hdr arh;
gboolean short_hdr = FALSE;
OLD_CHECK_DISPLAY_AS_DATA(proto_auto_rp, pd, offset, fd, tree);
if (sizeof(struct auto_rp_fixed_hdr) > END_OF_FRAME)
short_hdr = TRUE;
else

View File

@ -2,7 +2,7 @@
* Routines for BGP packet dissection.
* Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org>
*
* $Id: packet-bgp.c,v 1.25 2000/08/11 13:35:29 deniel Exp $
* $Id: packet-bgp.c,v 1.26 2000/08/13 14:08:02 deniel Exp $
*
* Supports:
* RFC1771 A Border Gateway Protocol 4 (BGP-4)
@ -1137,6 +1137,8 @@ dissect_bgp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int hlen; /* BGP header length */
char *typ; /* BGP message type */
OLD_CHECK_DISPLAY_AS_DATA(proto_bgp, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "BGP");

View File

@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-bootp.c,v 1.39 2000/08/09 06:14:57 guy Exp $
* $Id: packet-bootp.c,v 1.40 2000/08/13 14:08:03 deniel Exp $
*
* The information used comes from:
* RFC 951: Bootstrap Protocol
@ -622,6 +622,8 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
guint32 ip_addr;
const char *dhcp_type;
OLD_CHECK_DISPLAY_AS_DATA(proto_bootp, pd, offset, fd, tree);
dhcp_type = NULL;
if (check_col(fd, COL_PROTOCOL))

View File

@ -1,7 +1,7 @@
/* packet-bootparams.c
* Routines for bootparams dissection
*
* $Id: packet-bootparams.c,v 1.11 2000/05/31 05:06:55 guy Exp $
* $Id: packet-bootparams.c,v 1.12 2000/08/13 14:08:04 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -58,6 +58,9 @@ int dissect_bp_address(const u_char *pd, int offset, frame_data *fd,
guint32 type;
guint32 ipaddr;
if (!proto_is_protocol_enabled(proto_bootparams))
return offset;
/* get the address type */
if ( !BYTES_ARE_IN_FRAME(offset, 1)) return offset;
type = pntohl(&pd[offset]); /* type of address */
@ -89,6 +92,9 @@ ZZZZZZZZZZZZZZZZZZZ Check type:
int dissect_getfile_call(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_bootparams))
return offset;
if ( tree )
{
offset = dissect_rpc_string(pd,offset,fd,tree,hf_bootparams_host,NULL);
@ -102,6 +108,9 @@ int dissect_getfile_call(const u_char *pd, int offset, frame_data *fd,
int dissect_getfile_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_bootparams))
return offset;
if ( tree )
{
offset = dissect_rpc_string(pd,offset,fd,tree,hf_bootparams_host,NULL);
@ -116,6 +125,9 @@ int dissect_getfile_reply(const u_char *pd, int offset, frame_data *fd,
int dissect_whoami_call(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_bootparams))
return offset;
if ( tree )
{
offset = dissect_bp_address(pd,offset,fd,tree,hf_bootparams_hostaddr);
@ -128,6 +140,9 @@ int dissect_whoami_call(const u_char *pd, int offset, frame_data *fd,
int dissect_whoami_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_bootparams))
return offset;
if ( tree )
{
offset = dissect_rpc_string(pd,offset,fd,tree,hf_bootparams_host,NULL);

View File

@ -1,7 +1,7 @@
/* packet-bpdu.c
* Routines for BPDU (Spanning Tree Protocol) disassembly
*
* $Id: packet-bpdu.c,v 1.12 2000/08/07 03:20:25 guy Exp $
* $Id: packet-bpdu.c,v 1.13 2000/08/13 14:08:04 deniel Exp $
*
* Copyright 1999 Christophe Tronche <ch.tronche@computer.org>
*
@ -95,6 +95,8 @@ void dissect_bpdu(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
proto_item *ti;
const u_char *bpdu;
OLD_CHECK_DISPLAY_AS_DATA(proto_bpdu, pd, offset, fd, tree);
bpdu = pd + offset;
bpdu_type = (guint8) bpdu[BPDU_TYPE];
flags = (guint8) bpdu[BPDU_FLAGS];

View File

@ -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.24 2000/08/07 03:20:25 guy Exp $
* $Id: packet-cdp.c,v 1.25 2000/08/13 14:08:04 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -101,6 +101,8 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
guint32 naddresses;
int addr_length;
OLD_CHECK_DISPLAY_AS_DATA(proto_cdp, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "CDP");
if (check_col(fd, COL_INFO))

View File

@ -1,7 +1,7 @@
/* packet-cgmp.c
* Routines for the disassembly of the Cisco Group Management Protocol
*
* $Id: packet-cgmp.c,v 1.3 2000/05/31 05:06:58 guy Exp $
* $Id: packet-cgmp.c,v 1.4 2000/08/13 14:08:05 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -65,6 +65,8 @@ dissect_cgmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_tree *cgmp_tree = NULL;
guint8 count;
OLD_CHECK_DISPLAY_AS_DATA(proto_cgmp, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "CGMP");
if (check_col(fd, COL_INFO))

View File

@ -1,7 +1,7 @@
/* packet-clnp.c
* Routines for ISO/OSI network and transport protocol packet disassembly
*
* $Id: packet-clnp.c,v 1.12 2000/08/07 03:20:26 guy Exp $
* $Id: packet-clnp.c,v 1.13 2000/08/13 14:08:05 deniel Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@ -1510,6 +1510,7 @@ static gboolean dissect_ositp_internal(const u_char *pd, int offset,
void dissect_ositp(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
OLD_CHECK_DISPLAY_AS_DATA(proto_cotp, pd, offset, fd, tree);
if (!dissect_ositp_internal(pd, offset, fd, tree, FALSE))
old_dissect_data(pd, offset, fd, tree);
}
@ -1534,6 +1535,8 @@ static void dissect_clnp(const u_char *pd, int offset, frame_data *fd,
guint16 segment_offset = 0;
guint len;
OLD_CHECK_DISPLAY_AS_DATA(proto_clnp, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "CLNP");

View File

@ -4,7 +4,7 @@
*
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-cops.c,v 1.3 2000/08/07 03:20:27 guy Exp $
* $Id: packet-cops.c,v 1.4 2000/08/13 14:08:07 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -151,6 +151,8 @@ static void dissect_cops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint8 op_code;
CHECK_DISPLAY_AS_DATA(proto_cops, tvb, pinfo, tree);
pinfo->current_proto = "COPS";
if (check_col(pinfo->fd, COL_PROTOCOL))
col_add_str(pinfo->fd, COL_PROTOCOL, "COPS");

View File

@ -3,7 +3,7 @@
* see http://ddt.sourceforge.net/
* Olivier Abad <oabad@cybercable.fr>
*
* $Id: packet-ddtp.c,v 1.9 2000/08/07 03:20:27 guy Exp $
* $Id: packet-ddtp.c,v 1.10 2000/08/13 14:08:08 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -103,6 +103,8 @@ dissect_ddtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *ddtp_tree;
proto_item *ti;
CHECK_DISPLAY_AS_DATA(proto_ddtp, tvb, pinfo, tree);
pinfo->current_proto = "DDTP";
if (check_col(pinfo->fd, COL_PROTOCOL)) {
/* Indicate what kind of message this is. */

View File

@ -1,7 +1,7 @@
/* packet-diameter.c
* Routines for DIAMETER packet disassembly
*
* $Id: packet-diameter.c,v 1.4 2000/08/07 03:20:28 guy Exp $
* $Id: packet-diameter.c,v 1.5 2000/08/13 14:08:08 deniel Exp $
*
* Copyright (c) 2000 by David Frascone <chaos@mindspring.com>
*
@ -500,6 +500,7 @@ void dissect_diameter(const u_char *pd, int offset, frame_data *fd,
gchar *codestrval;
OLD_CHECK_DISPLAY_AS_DATA(proto_diameter, pd, offset, fd, tree);
if (gbl_commandCodeInHeader)
hdrlength=sizeof(e_diameterhdr);

View File

@ -1,7 +1,7 @@
/* packet-dns.c
* Routines for DNS packet disassembly
*
* $Id: packet-dns.c,v 1.51 2000/08/09 07:15:19 guy Exp $
* $Id: packet-dns.c,v 1.52 2000/08/13 14:08:08 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1728,6 +1728,8 @@ dissect_dns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{ RCODE_REFUSED, "Refused" },
{ 0, NULL } };
OLD_CHECK_DISPLAY_AS_DATA(proto_dns, pd, offset, fd, tree);
dns_data_offset = offset;
if (check_col(fd, COL_PROTOCOL))

View File

@ -1,6 +1,6 @@
/* packet-eigrp.c
*
* $Id: packet-eigrp.c,v 1.5 2000/08/07 03:20:29 guy Exp $
* $Id: packet-eigrp.c,v 1.6 2000/08/13 14:08:09 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -92,6 +92,8 @@ dissect_eigrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
proto_item *ti;
guint16 cksum;
OLD_CHECK_DISPLAY_AS_DATA(proto_eigrp, pd, offset, fd, tree);
/* Avoids alignment problems on many architectures. */
memcpy(&ih, &pd[offset], sizeof(e_eigrp));
/* To do: check for runts, errs, etc. */

View File

@ -2,7 +2,7 @@
* Routines for ISO/OSI End System to Intermediate System
* Routeing Exchange Protocol ISO 9542.
*
* $Id: packet-esis.c,v 1.6 2000/08/10 16:04:33 deniel Exp $
* $Id: packet-esis.c,v 1.7 2000/08/13 14:08:09 deniel Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
@ -299,6 +299,8 @@ dissect_esis(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
int variable_len = 0;
u_int tmp_uint = 0;
OLD_CHECK_DISPLAY_AS_DATA(proto_esis, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "ESIS");

View File

@ -1,7 +1,7 @@
/* packet-eth.c
* Routines for ethernet packet disassembly
*
* $Id: packet-eth.c,v 1.43 2000/08/07 03:20:32 guy Exp $
* $Id: packet-eth.c,v 1.44 2000/08/13 14:08:10 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -157,6 +157,8 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static tvbuff_t *trailer_tvb;
static proto_tree *fh_tree;
CHECK_DISPLAY_AS_DATA(proto_eth, tvb, pinfo, tree);
tvb_compat(tvb, &pd, (int*)&eth_offset);
/* Reset this static variable to NULL since I test it's value later */

View File

@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
* $Id: packet-fddi.c,v 1.37 2000/08/07 03:20:33 guy Exp $
* $Id: packet-fddi.c,v 1.38 2000/08/13 14:08:10 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -265,6 +265,8 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
u_char src_swapped[6], dst_swapped[6];
tvbuff_t *next_tvb;
CHECK_DISPLAY_AS_DATA(proto_fddi, tvb, pinfo, tree);
pinfo->current_proto = "FDDI";
if (check_col(pinfo->fd, COL_PROTOCOL))
col_add_str(pinfo->fd, COL_PROTOCOL, "FDDI");

View File

@ -2,7 +2,7 @@
* Routines for ftp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-ftp.c,v 1.17 2000/08/07 03:20:34 guy Exp $
* $Id: packet-ftp.c,v 1.18 2000/08/13 14:08:11 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -66,6 +66,8 @@ dissect_ftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int i2;
int max_data = pi.captured_len - offset;
OLD_CHECK_DISPLAY_AS_DATA(proto_ftp, pd, offset, fd, tree);
memset(rr, '\0', sizeof(rr));
memset(rd, '\0', sizeof(rd));

View File

@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
* $Id: packet-giop.c,v 1.16 2000/08/07 03:20:34 guy Exp $
* $Id: packet-giop.c,v 1.17 2000/08/13 14:08:11 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -214,6 +214,9 @@ dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
LocateRequestHeader locate_req;
int i;
if (!proto_is_protocol_enabled(proto_giop))
return FALSE;
#define END_OF_GIOP_MESSAGE (offset - first_offset - GIOP_HEADER_SIZE)
if (!BYTES_ARE_IN_FRAME(offset, GIOP_HEADER_SIZE)) {

View File

@ -2,7 +2,7 @@
* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
* $Id: packet-gre.c,v 1.24 2000/08/07 03:20:35 guy Exp $
* $Id: packet-gre.c,v 1.25 2000/08/13 14:08:11 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -83,6 +83,8 @@ dissect_gre(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
guint8 sre_length;
tvbuff_t *next_tvb;
OLD_CHECK_DISPLAY_AS_DATA(proto_gre, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "GRE");

View File

@ -2,7 +2,7 @@
* Routines for Sinec H1 packet disassembly
* Gerrit Gehnen <G.Gehnen@atrie.de>
*
* $Id: packet-h1.c,v 1.11 2000/08/07 03:20:35 guy Exp $
* $Id: packet-h1.c,v 1.12 2000/08/13 14:08:11 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -114,6 +114,9 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
unsigned int position = 3;
unsigned int offset=0;
if (!proto_is_protocol_enabled(proto_h1))
return FALSE;
if (!(tvb_get_guint8(tvb,offset) == 'S' && tvb_get_guint8(tvb,offset+1) == '5')) {
return FALSE;
}

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-hsrp.c,v 1.6 2000/08/07 03:20:36 guy Exp $
* $Id: packet-hsrp.c,v 1.7 2000/08/13 14:08:12 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -93,6 +93,8 @@ dissect_hsrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
struct hsrp_packet hsrp;
gboolean short_packet = FALSE;
OLD_CHECK_DISPLAY_AS_DATA(proto_hsrp, pd, offset, fd, tree);
if (sizeof(struct hsrp_packet) > END_OF_FRAME)
short_packet = TRUE;
else

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-http.c,v 1.20 2000/08/07 03:20:36 guy Exp $
* $Id: packet-http.c,v 1.21 2000/08/13 14:08:12 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -72,6 +72,8 @@ void dissect_http(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
u_char c;
http_type_t http_type = HTTP_OTHERS;
OLD_CHECK_DISPLAY_AS_DATA(proto_http, pd, offset, fd, tree);
data = &pd[offset];
dataend = data + END_OF_FRAME;

View File

@ -1,7 +1,7 @@
/* packet-icmpv6.c
* Routines for ICMPv6 packet disassembly
*
* $Id: packet-icmpv6.c,v 1.19 2000/08/11 13:35:27 deniel Exp $
* $Id: packet-icmpv6.c,v 1.20 2000/08/13 14:08:13 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -204,6 +204,8 @@ dissect_icmpv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
char *codename, *typename;
int len;
OLD_CHECK_DISPLAY_AS_DATA(proto_icmpv6, pd, offset, fd, tree);
dp = (struct icmp6_hdr *)&pd[offset];
codename = typename = "Unknown";
len = sizeof(*dp);

View File

@ -2,7 +2,7 @@
* Routines for ICP (internet cache protocol) packet disassembly
* RFC 2186 && RFC 2187
*
* $Id: packet-icp.c,v 1.10 2000/08/07 03:20:38 guy Exp $
* $Id: packet-icp.c,v 1.11 2000/08/13 14:08:14 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Peter Torvals
@ -181,6 +181,8 @@ static void dissect_icp(const u_char *pd, int offset, frame_data *fd,
gchar *opcodestrval;
OLD_CHECK_DISPLAY_AS_DATA(proto_icp, pd, offset, fd, tree);
/* TBD: check if this is a fragment or first part of udp packet */
icph.opcode=pd[offset];
icph.version=pd[offset+1];

View File

@ -1,7 +1,7 @@
/* packet-icq.c
* Routines for ICQ packet disassembly
*
* $Id: packet-icq.c,v 1.20 2000/08/11 13:35:24 deniel Exp $
* $Id: packet-icq.c,v 1.21 2000/08/13 14:08:15 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Johan Feyaerts
@ -2427,6 +2427,8 @@ static void dissect_icq(const u_char *pd,
{
int version = 0;
OLD_CHECK_DISPLAY_AS_DATA(proto_icq, pd, offset, fd, tree);
version = pletohs(&pd[offset + ICQ_VERSION]);
switch (version) {
case 0x0005:

View File

@ -2,7 +2,7 @@
* Routines for imap packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-imap.c,v 1.8 2000/08/07 03:20:39 guy Exp $
* $Id: packet-imap.c,v 1.9 2000/08/13 14:08:16 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -60,6 +60,8 @@ dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int i2;
int max_data = pi.captured_len - offset;
OLD_CHECK_DISPLAY_AS_DATA(proto_imap, pd, offset, fd, tree);
memset(rr, '\0', sizeof(rr));
memset(rd, '\0', sizeof(rd));

View File

@ -1,7 +1,7 @@
/* packet-ip.c
* Routines for IP and miscellaneous IP protocol packet disassembly
*
* $Id: packet-ip.c,v 1.101 2000/08/11 13:35:20 deniel Exp $
* $Id: packet-ip.c,v 1.102 2000/08/13 14:08:16 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -827,6 +827,8 @@ dissect_ip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
guint8 nxt;
guint16 ipsum;
OLD_CHECK_DISPLAY_AS_DATA(proto_ip, pd, offset, fd, tree);
/* To do: check for errs, etc. */
if (!BYTES_ARE_IN_FRAME(offset, IPH_MIN_LEN)) {
old_dissect_data(pd, offset, fd, tree);
@ -1007,6 +1009,8 @@ dissect_icmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
guint8 addr_entry_size = 0;
int i;
OLD_CHECK_DISPLAY_AS_DATA(proto_icmp, pd, offset, fd, tree);
/* Avoids alignment problems on many architectures. */
memcpy(&ih, &pd[offset], sizeof(e_icmp));
/* To do: check for runts, errs, etc. */
@ -1208,6 +1212,8 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
gchar *type_str;
CHECK_DISPLAY_AS_DATA(proto_igmp, tvb, pinfo, tree);
pinfo->current_proto = "IGMP";
if (check_col(pinfo->fd, COL_PROTOCOL))
col_add_str(pinfo->fd, COL_PROTOCOL, "IGMP");

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-ipp.c,v 1.11 2000/08/07 03:20:41 guy Exp $
* $Id: packet-ipp.c,v 1.12 2000/08/13 14:08:17 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -167,6 +167,8 @@ void dissect_ipp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
guint16 status_code;
gchar *status_fmt;
OLD_CHECK_DISPLAY_AS_DATA(proto_ipp, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "IPP");
if (check_col(fd, COL_INFO)) {

View File

@ -1,7 +1,7 @@
/* packet-ipsec.c
* Routines for IPsec/IPComp packet disassembly
*
* $Id: packet-ipsec.c,v 1.19 2000/08/07 03:20:41 guy Exp $
* $Id: packet-ipsec.c,v 1.20 2000/08/13 14:08:17 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -153,6 +153,8 @@ dissect_ah(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
struct newah ah;
int advance;
OLD_CHECK_DISPLAY_AS_DATA(proto_ah, pd, offset, fd, tree);
memcpy(&ah, (void *) &pd[offset], sizeof(ah));
advance = sizeof(ah) + ((ah.ah_len - 1) << 2);
@ -210,6 +212,8 @@ dissect_esp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_item *ti;
struct newesp esp;
OLD_CHECK_DISPLAY_AS_DATA(proto_esp, pd, offset, fd, tree);
memcpy(&esp, (void *) &pd[offset], sizeof(esp));
/*
@ -248,6 +252,8 @@ dissect_ipcomp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
struct ipcomp ipcomp;
char *p;
OLD_CHECK_DISPLAY_AS_DATA(proto_ipcomp, pd, offset, fd, tree);
memcpy(&ipcomp, (void *) &pd[offset], sizeof(ipcomp));
/*

View File

@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
* $Id: packet-ipv6.c,v 1.42 2000/08/11 22:18:13 deniel Exp $
* $Id: packet-ipv6.c,v 1.43 2000/08/13 14:08:06 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -295,6 +295,8 @@ dissect_ipv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
struct ip6_hdr ipv6;
OLD_CHECK_DISPLAY_AS_DATA(proto_ipv6, pd, offset, fd, tree);
memcpy(&ipv6, (void *) &pd[offset], sizeof(ipv6));
pi.ipproto = ipv6.ip6_nxt; /* XXX make work TCP follow (ipproto = 6) */

View File

@ -2,7 +2,7 @@
* Routines for NetWare's IPX
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-ipx.c,v 1.63 2000/08/07 03:20:42 guy Exp $
* $Id: packet-ipx.c,v 1.64 2000/08/13 14:08:18 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -290,6 +290,7 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 ipx_dsocket, ipx_ssocket;
CHECK_DISPLAY_AS_DATA(proto_ipx, tvb, pinfo, tree);
pinfo->current_proto = "IPX";
@ -440,6 +441,8 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 conn_ctrl;
guint8 datastream_type;
CHECK_DISPLAY_AS_DATA(proto_spx, tvb, pinfo, tree);
pinfo->current_proto = "SPX";
if (check_col(pinfo->fd, COL_PROTOCOL))
col_add_str(pinfo->fd, COL_PROTOCOL, "SPX");
@ -483,6 +486,8 @@ dissect_ipxmsg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
guint8 conn_number, sig_char;
CHECK_DISPLAY_AS_DATA(proto_ipxmsg, tvb, pinfo, tree);
pinfo->current_proto = "IPX MSG";
if (check_col(pinfo->fd, COL_PROTOCOL))
@ -522,6 +527,8 @@ dissect_ipxrip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
char *rip_type[3] = { "Request", "Response", "Unknown" };
CHECK_DISPLAY_AS_DATA(proto_ipxrip, tvb, pinfo, tree);
pinfo->current_proto = "IPX RIP";
if (check_col(pinfo->fd, COL_PROTOCOL))
col_add_str(pinfo->fd, COL_PROTOCOL, "IPX RIP");
@ -668,6 +675,8 @@ dissect_ipxsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
char *sap_type[4] = { "General Query", "General Response",
"Nearest Query", "Nearest Response" };
CHECK_DISPLAY_AS_DATA(proto_sap, tvb, pinfo, tree);
pinfo->current_proto = "IPX SAP";
if (check_col(pinfo->fd, COL_PROTOCOL))
col_add_str(pinfo->fd, COL_PROTOCOL, "IPX SAP");

View File

@ -1,7 +1,7 @@
/* packet-irc.c
* Routines for MSX irc packet dissection
*
* $Id: packet-irc.c,v 1.7 2000/08/07 03:20:45 guy Exp $
* $Id: packet-irc.c,v 1.8 2000/08/13 14:08:18 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -78,6 +78,8 @@ dissect_irc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int start, cur, len;
const u_char *i;
OLD_CHECK_DISPLAY_AS_DATA(proto_irc, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "IRC");

View File

@ -3,7 +3,7 @@
* (ISAKMP) (RFC 2408)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
* $Id: packet-isakmp.c,v 1.25 2000/08/11 13:35:18 deniel Exp $
* $Id: packet-isakmp.c,v 1.26 2000/08/13 14:08:18 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -350,6 +350,8 @@ dissect_isakmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
struct isakmp_hdr * hdr = (struct isakmp_hdr *)(pd + offset);
guint32 len;
OLD_CHECK_DISPLAY_AS_DATA(proto_isakmp, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "ISAKMP");

View File

@ -1,7 +1,7 @@
/* packet-isis-hello.c
* Routines for decoding isis hello packets and their CLVs
*
* $Id: packet-isis-hello.c,v 1.9 2000/06/19 08:33:48 guy Exp $
* $Id: packet-isis-hello.c,v 1.10 2000/08/13 14:08:19 deniel Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@ -427,6 +427,8 @@ isis_dissect_isis_hello(int hello_type, int header_length, int id_length,
int hlen;
guint16 pdu_length;
OLD_CHECK_DISPLAY_AS_DATA(proto_isis_hello, pd, offset, fd, tree);
if (hello_type == ISIS_TYPE_PTP_HELLO) {
hlen = 1+id_length+2+2+1;
} else {

View File

@ -1,7 +1,7 @@
/* packet-isis-lsp.c
* Routines for decoding isis lsp packets and their CLVs
*
* $Id: packet-isis-lsp.c,v 1.8 2000/06/19 08:33:48 guy Exp $
* $Id: packet-isis-lsp.c,v 1.9 2000/08/13 14:08:22 deniel Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@ -795,6 +795,8 @@ isis_dissect_isis_lsp(int lsp_type, int header_length, int id_length,
char sbuf[128];
int inx, q, some, value, len;
OLD_CHECK_DISPLAY_AS_DATA(proto_isis_lsp, pd, offset, fd, tree);
hlen = 2+2+id_length+2+4+2+1;
if (!BYTES_ARE_IN_FRAME(offset, hlen)) {

View File

@ -1,7 +1,7 @@
/* packet-isis-snp.c
* Routines for decoding isis complete & partial SNP and their payload
*
* $Id: packet-isis-snp.c,v 1.6 2000/06/19 08:33:49 guy Exp $
* $Id: packet-isis-snp.c,v 1.7 2000/08/13 14:08:22 deniel Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@ -248,6 +248,8 @@ isis_dissect_isis_csnp(int type, int header_length, int id_length,
guint16 pdu_length;
int len;
OLD_CHECK_DISPLAY_AS_DATA(proto_isis_csnp, pd, offset, fd, tree);
hlen = 2+id_length+1+id_length+2+id_length+2;
if (!BYTES_ARE_IN_FRAME(offset, hlen)) {
@ -331,6 +333,8 @@ isis_dissect_isis_psnp(int type, int header_length, int id_length,
guint16 pdu_length;
int len;
OLD_CHECK_DISPLAY_AS_DATA(proto_isis_psnp, pd, offset, fd, tree);
hlen = 2+id_length+1;
if (!BYTES_ARE_IN_FRAME(offset, hlen)) {

View File

@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly, core
* bits.
*
* $Id: packet-isis.c,v 1.13 2000/08/10 16:04:33 deniel Exp $
* $Id: packet-isis.c,v 1.14 2000/08/13 14:08:23 deniel Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@ -139,6 +139,8 @@ dissect_isis(const u_char *pd, int offset, frame_data *fd,
proto_tree *isis_tree = NULL;
int id_length;
OLD_CHECK_DISPLAY_AS_DATA(proto_isis, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "ISIS");

View File

@ -1,7 +1,7 @@
/* packet-isl.c
* Routines for Cisco ISL Ethernet header disassembly
*
* $Id: packet-isl.c,v 1.14 2000/08/07 03:20:46 guy Exp $
* $Id: packet-isl.c,v 1.15 2000/08/13 14:08:23 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -145,6 +145,8 @@ dissect_isl(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
guint8 type;
guint16 length;
tvbuff_t *next_tvb;
OLD_CHECK_DISPLAY_AS_DATA(proto_isl, pd, offset, fd, tree);
if (!BYTES_ARE_IN_FRAME(offset, ISL_HEADER_SIZE)) {
old_dissect_data(pd, offset, fd, tree);

View File

@ -3,7 +3,7 @@
* Wes Hardaker (c) 2000
* wjhardaker@ucdavis.edu
*
* $Id: packet-kerberos.c,v 1.2 2000/08/11 08:21:07 guy Exp $
* $Id: packet-kerberos.c,v 1.3 2000/08/13 14:08:23 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -289,6 +289,8 @@ dissect_kerberos(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
guchar *str;
int tmp_pos1, tmp_pos2;
OLD_CHECK_DISPLAY_AS_DATA(proto_kerberos, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "KRB5");

View File

@ -7,7 +7,7 @@
* Laurent Cazalet <laurent.cazalet@mailclub.net>
* Thomas Parvais <thomas.parvais@advalvas.be>
*
* $Id: packet-l2tp.c,v 1.14 2000/08/07 03:20:47 guy Exp $
* $Id: packet-l2tp.c,v 1.15 2000/08/13 14:08:24 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -294,6 +294,8 @@ dissect_l2tp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
tvbuff_t *tvb;
tvbuff_t *next_tvb;
OLD_CHECK_DISPLAY_AS_DATA(proto_l2tp, pd, offset, fd, tree);
pi.current_proto = "L2TP";
if (check_col(fd, COL_PROTOCOL)) /* build output for closed L2tp frame displayed */
col_add_str(fd, COL_PROTOCOL, "L2TP");

View File

@ -2,7 +2,7 @@
* Routines for lapb frame disassembly
* Olivier Abad <oabad@cybercable.fr>
*
* $Id: packet-lapb.c,v 1.21 2000/05/31 03:58:53 gram Exp $
* $Id: packet-lapb.c,v 1.22 2000/08/13 14:08:24 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -57,6 +57,8 @@ dissect_lapb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 byte0;
tvbuff_t *next_tvb;
CHECK_DISPLAY_AS_DATA(proto_lapb, tvb, pinfo, tree);
pinfo->current_proto = "LAPB";
if (check_col(pinfo->fd, COL_PROTOCOL))

View File

@ -2,7 +2,7 @@
* Routines for LAPD frame disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-lapd.c,v 1.12 2000/08/07 03:20:48 guy Exp $
* $Id: packet-lapd.c,v 1.13 2000/08/13 14:08:24 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -94,6 +94,8 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean is_response;
tvbuff_t *next_tvb;
CHECK_DISPLAY_AS_DATA(proto_lapd, tvb, pinfo, tree);
pinfo->current_proto = "LAPD";
if (check_col(pinfo->fd, COL_PROTOCOL))

View File

@ -1,7 +1,7 @@
/* packet-ldap.c
* Routines for ldap packet dissection
*
* $Id: packet-ldap.c,v 1.14 2000/08/11 13:35:15 deniel Exp $
* $Id: packet-ldap.c,v 1.15 2000/08/13 14:08:24 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -837,6 +837,8 @@ dissect_ldap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int first_time = 1;
int ret;
OLD_CHECK_DISPLAY_AS_DATA(proto_ldap, pd, offset, fd, tree);
if (tree)
{
ti = proto_tree_add_item(tree, proto_ldap, NullTVB, offset, END_OF_FRAME, FALSE);

View File

@ -2,7 +2,7 @@
* Routines for IEEE 802.2 LLC layer
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-llc.c,v 1.67 2000/08/11 08:19:32 guy Exp $
* $Id: packet-llc.c,v 1.68 2000/08/13 14:08:26 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -278,6 +278,8 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const guint8 *pd;
int offset;
CHECK_DISPLAY_AS_DATA(proto_llc, tvb, pinfo, tree);
pinfo->current_proto = "LLC";
if (check_col(pinfo->fd, COL_PROTOCOL)) {

View File

@ -2,7 +2,7 @@
* Routines for LPR and LPRng packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-lpd.c,v 1.21 2000/08/07 03:20:51 guy Exp $
* $Id: packet-lpd.c,v 1.22 2000/08/13 14:08:27 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -78,6 +78,8 @@ dissect_lpd(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
"Bad job format, do not retry"
};
OLD_CHECK_DISPLAY_AS_DATA(proto_lpd, pd, offset, fd, tree);
/* rfc1179 states that all responses are 1 byte long */
if (END_OF_FRAME == 1) {
lpr_packet_type = response;

View File

@ -1,7 +1,7 @@
/* packet-mapi.c
* Routines for MSX mapi packet dissection
*
* $Id: packet-mapi.c,v 1.8 2000/08/07 03:20:51 guy Exp $
* $Id: packet-mapi.c,v 1.9 2000/08/13 14:08:27 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -55,6 +55,8 @@ dissect_mapi(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *mapi_tree, *ti;
OLD_CHECK_DISPLAY_AS_DATA(proto_mapi, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "MAPI");

View File

@ -2,7 +2,7 @@
* Routines for Mobile IP dissection
* Copyright 2000, Stefan Raab <Stefan.Raab@nextel.com>
*
* $Id: packet-mip.c,v 1.7 2000/08/11 13:35:14 deniel Exp $
* $Id: packet-mip.c,v 1.8 2000/08/13 14:08:28 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@ -147,6 +147,8 @@ dissect_mip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
packet_info *pinfo = &pi;
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";

View File

@ -1,7 +1,7 @@
/* packet-mount.c
* Routines for mount dissection
*
* $Id: packet-mount.c,v 1.15 2000/05/31 05:07:18 guy Exp $
* $Id: packet-mount.c,v 1.16 2000/08/13 14:08:29 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -83,6 +83,9 @@ dissect_fhstatus(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
guint32 status;
if (!proto_is_protocol_enabled(proto_mount))
return offset;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
status = EXTRACT_UINT(pd, offset+0);
if (tree) {
@ -107,6 +110,10 @@ static int
dissect_mount_dirpath_call(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_mount))
return offset;
if ( tree )
{
offset = dissect_rpc_string(pd,offset,fd,tree,hf_mount_path,NULL);
@ -121,6 +128,10 @@ static int
dissect_mount_mnt_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_mount))
return offset;
offset = dissect_fhstatus(pd, offset, fd, tree);
return offset;
@ -138,6 +149,9 @@ dissect_mountlist(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
char* hostname;
char* directory;
if (!proto_is_protocol_enabled(proto_mount))
return offset;
if (tree) {
mountlist_item = proto_tree_add_item(tree, hf_mount_mountlist, NullTVB,
offset+0, END_OF_FRAME, FALSE);
@ -167,6 +181,10 @@ static int
dissect_mount_dump_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_mount))
return offset;
offset = dissect_rpc_list(pd,offset,fd,tree,dissect_mountlist);
return offset;
@ -178,6 +196,10 @@ dissect_mount_dump_reply(const u_char *pd, int offset, frame_data *fd,
static int
dissect_group(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_mount))
return offset;
offset = dissect_rpc_string(pd, offset, fd, tree, hf_mount_groups_group,NULL);
return offset;
@ -197,6 +219,9 @@ dissect_exportlist(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
proto_item* groups_tree = NULL;
char* directory;
if (!proto_is_protocol_enabled(proto_mount))
return offset;
if (tree) {
exportlist_item = proto_tree_add_item(tree, hf_mount_exportlist, NullTVB,
offset+0, END_OF_FRAME, FALSE);
@ -241,6 +266,10 @@ static int
dissect_mount_export_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_mount))
return offset;
offset = dissect_rpc_list(pd,offset,fd,tree,dissect_exportlist);
return offset;
@ -318,6 +347,9 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
proto_item *ti;
proto_tree *mask_tree;
if (!proto_is_protocol_enabled(proto_mount))
return offset;
/*
* Extract the mask first, so we know which other fields the
* server was able to return to us.
@ -506,6 +538,9 @@ dissect_mountstat3(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
{
guint32 mountstat3;
if (!proto_is_protocol_enabled(proto_mount))
return offset;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
mountstat3 = EXTRACT_UINT(pd, offset+0);
@ -528,7 +563,10 @@ dissect_mount3_mnt_reply(const u_char *pd, int offset, frame_data *fd,
guint32 auth_flavors;
guint32 auth_flavor;
guint32 auth_flavor_i;
if (!proto_is_protocol_enabled(proto_mount))
return offset;
offset = dissect_mountstat3(pd, offset, fd, tree, hf_mount_status, &status);
switch (status) {
case 0:

View File

@ -3,7 +3,7 @@
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
* $Id: packet-mpls.c,v 1.8 2000/08/07 03:20:51 guy Exp $
* $Id: packet-mpls.c,v 1.9 2000/08/13 14:08:29 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -134,6 +134,8 @@ dissect_mpls(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_tree *mpls_tree;
proto_item *ti;
OLD_CHECK_DISPLAY_AS_DATA(proto_mpls, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL)) {
col_add_str(fd,COL_PROTOCOL, "MPLS");
}

View File

@ -2,7 +2,7 @@
* Routines for Microsoft Proxy packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-msproxy.c,v 1.8 2000/08/11 13:35:11 deniel Exp $
* $Id: packet-msproxy.c,v 1.9 2000/08/13 14:08:29 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1164,6 +1164,7 @@ static void dissect_msproxy(const u_char *pd, int offset, frame_data *fd, proto_
hash_entry_t *hash_info;
conversation_t *conversation;
OLD_CHECK_DISPLAY_AS_DATA(proto_msproxy, pd, offset, fd, tree);
conversation = find_conversation( &pi.src, &pi.dst, pi.ptype,
pi.srcport, pi.destport);

View File

@ -2,7 +2,7 @@
* Routines for NetBIOS over IPX packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-nbipx.c,v 1.22 2000/08/07 03:20:52 guy Exp $
* $Id: packet-nbipx.c,v 1.23 2000/08/13 14:08:30 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -117,6 +117,8 @@ dissect_nbipx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
int max_data = pi.captured_len - offset;
OLD_CHECK_DISPLAY_AS_DATA(proto_nbipx, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "NBIPX");

View File

@ -4,7 +4,7 @@
* Gilbert Ramirez <gram@xiexie.org>
* Much stuff added by Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-nbns.c,v 1.44 2000/08/07 03:20:53 guy Exp $
* $Id: packet-nbns.c,v 1.45 2000/08/13 14:08:30 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1133,6 +1133,8 @@ dissect_nbns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
guint16 id, flags, quest, ans, auth, add;
int cur_off;
OLD_CHECK_DISPLAY_AS_DATA(proto_nbns, pd, offset, fd, tree);
nbns_data_offset = offset;
if (check_col(fd, COL_PROTOCOL))
@ -1293,6 +1295,8 @@ dissect_nbdgm(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int name_type;
int len;
OLD_CHECK_DISPLAY_AS_DATA(proto_nbdgm, pd, offset, fd, tree);
header.msg_type = pd[offset];
flags = pd[offset+1];
@ -1586,6 +1590,8 @@ dissect_nbss(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int max_data;
int is_cifs;
OLD_CHECK_DISPLAY_AS_DATA(proto_nbss, pd, offset, fd, tree);
msg_type = pd[offset];
if (pi.match_port == TCP_PORT_CIFS) {

View File

@ -3,7 +3,7 @@
* Gilbert Ramirez <gram@xiexie.org>
* Modified to allow NCP over TCP/IP decodes by James Coe <jammer@cin.net>
*
* $Id: packet-ncp.c,v 1.39 2000/08/07 03:20:54 guy Exp $
* $Id: packet-ncp.c,v 1.40 2000/08/13 14:08:31 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -259,6 +259,8 @@ dissect_ncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int hdr_offset = 0;
int commhdr;
CHECK_DISPLAY_AS_DATA(proto_ncp, tvb, pinfo, tree);
pinfo->current_proto = "NCP";
if (check_col(pinfo->fd, COL_PROTOCOL))
col_add_str(pinfo->fd, COL_PROTOCOL, "NCP");

View File

@ -5,7 +5,7 @@
*
* derived from the packet-nbns.c
*
* $Id: packet-netbios.c,v 1.21 2000/08/07 03:20:55 guy Exp $
* $Id: packet-netbios.c,v 1.22 2000/08/13 14:08:32 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -974,6 +974,8 @@ static void dissect_netbios(const u_char *pd, int offset, frame_data *fd,
/* Find NetBIOS marker EFFF, this is done because I have seen an extra LLC */
/* byte on our network. This only checks for one extra LLC byte. */
OLD_CHECK_DISPLAY_AS_DATA(proto_netbios, pd, offset, fd, tree);
if (( pd[offset + 2] != 0xff) || ( pd[offset + 3] != 0xef)){
++offset;
if (( pd[offset + 2] != 0xff)

View File

@ -1,7 +1,7 @@
/* packet-nlm.c
* Routines for nlm dissection
*
* $Id: packet-nlm.c,v 1.7 2000/08/08 06:22:08 girlich Exp $
* $Id: packet-nlm.c,v 1.8 2000/08/13 14:08:33 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -105,6 +105,9 @@ dissect_nlm_lock(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int versio
tvb_compat(tvb, &pd, &compat_offset);
if (!proto_is_protocol_enabled(proto_nlm))
return offset;
if (tree) {
lock_item = proto_tree_add_item(tree, hf_nlm_lock, tvb,
offset, tvb_length_remaining(tvb, offset), FALSE);
@ -148,6 +151,9 @@ dissect_nlm1_lock_call(const u_char* pd, int offset, frame_data* fd, proto_tree*
#endif
int noffset;
if (!proto_is_protocol_enabled(proto_nlm))
return tvb_raw_offset(tvb);
noffset = dissect_rpc_data_tvb(tvb, pinfo, tree, hf_nlm_cookie, 0);
noffset = dissect_rpc_bool_tvb(tvb, pinfo, tree, hf_nlm_block, noffset);
noffset = dissect_rpc_bool_tvb(tvb, pinfo, tree, hf_nlm_exclusive, noffset);
@ -171,6 +177,9 @@ dissect_nlm1_unlock_call(const u_char* pd, int offset, frame_data* fd, proto_tre
#endif
int noffset;
if (!proto_is_protocol_enabled(proto_nlm))
return tvb_raw_offset(tvb);
noffset = dissect_rpc_data_tvb(tvb, pinfo, tree, hf_nlm_cookie, 0);
noffset = dissect_nlm_lock(tvb, pinfo, tree, 1, noffset);
return tvb_raw_offset(tvb) + noffset;
@ -190,6 +199,9 @@ dissect_nlm1_gen_reply(const u_char* pd, int offset, frame_data* fd, proto_tree*
#endif
int noffset;
if (!proto_is_protocol_enabled(proto_nlm))
return tvb_raw_offset(tvb);
noffset = dissect_rpc_data_tvb(tvb, pinfo, tree, hf_nlm_cookie, 0);
noffset = dissect_rpc_uint32_tvb(tvb, pinfo, tree, hf_nlm_state, noffset);
return tvb_raw_offset(tvb) + noffset;
@ -298,6 +310,9 @@ dissect_nlm4_test_call(const u_char* pd, int offset, frame_data* fd, proto_tree*
#endif
int noffset;
if (!proto_is_protocol_enabled(proto_nlm))
return tvb_raw_offset(tvb);
noffset = dissect_rpc_data_tvb(tvb, pinfo, tree, hf_nlm_cookie, 0);
dissect_rpc_bool_tvb(tvb, pinfo, tree, hf_nlm_exclusive, noffset);
noffset += 4;

View File

@ -2,7 +2,7 @@
* Routines for nntp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-nntp.c,v 1.11 2000/08/07 03:20:56 guy Exp $
* $Id: packet-nntp.c,v 1.12 2000/08/13 14:08:31 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -59,6 +59,8 @@ dissect_nntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int linelen;
int max_data = pi.captured_len - offset;
OLD_CHECK_DISPLAY_AS_DATA(proto_nntp, pd, offset, fd, tree);
data = &pd[offset];
dataend = data + END_OF_FRAME;
if (dataend > data + max_data)

View File

@ -2,7 +2,7 @@
* Routines for NTP packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
* $Id: packet-ntp.c,v 1.15 2000/08/11 13:35:09 deniel Exp $
* $Id: packet-ntp.c,v 1.16 2000/08/13 14:08:25 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -236,6 +236,8 @@ dissect_ntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
gchar buff[NTP_TS_SIZE];
int i;
OLD_CHECK_DISPLAY_AS_DATA(proto_ntp, pd, offset, fd, tree);
/* get at least a full packet structure */
if ( !BYTES_ARE_IN_FRAME(offset, 48) ) /* 48 without keyid or mac */
return;

View File

@ -1,7 +1,7 @@
/* packet-null.c
* Routines for null packet disassembly
*
* $Id: packet-null.c,v 1.26 2000/08/07 03:20:57 guy Exp $
* $Id: packet-null.c,v 1.27 2000/08/13 14:08:36 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -228,6 +228,8 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const guint8 *next_pd;
int next_offset;
CHECK_DISPLAY_AS_DATA(proto_null, tvb, pinfo, tree);
/*
* See comment in "capture_null()" for an explanation of what we're
* doing.

View File

@ -2,7 +2,7 @@
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
* $Id: packet-ospf.c,v 1.26 2000/08/07 03:20:58 guy Exp $
* $Id: packet-ospf.c,v 1.27 2000/08/13 14:08:36 deniel Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@ -98,6 +98,8 @@ dissect_ospf(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
{OSPF_LS_ACK, "LS Acknowledge" },
{0, NULL } };
OLD_CHECK_DISPLAY_AS_DATA(proto_ospf, pd, offset, fd, tree);
memcpy(&ospfh, &pd[offset], sizeof(e_ospfhdr));
packet_type = match_strval(ospfh.packet_type, pt_vals);

View File

@ -2,7 +2,7 @@
* Routines for PIM disassembly
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
*
* $Id: packet-pim.c,v 1.16 2000/08/11 13:35:08 deniel Exp $
* $Id: packet-pim.c,v 1.17 2000/08/13 14:08:37 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -193,6 +193,8 @@ dissect_pim(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
proto_tree *pimopt_tree = NULL;
proto_item *tiopt;
OLD_CHECK_DISPLAY_AS_DATA(proto_pim, pd, offset, fd, tree);
/* avoid alignment problem */
memcpy(&pim, &pd[offset], sizeof(pim));

View File

@ -2,7 +2,7 @@
* Routines for pop packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-pop.c,v 1.16 2000/08/07 03:20:59 guy Exp $
* $Id: packet-pop.c,v 1.17 2000/08/13 14:08:37 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -62,6 +62,8 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int i2;
int max_data = pi.captured_len - offset;
OLD_CHECK_DISPLAY_AS_DATA(proto_pop, pd, offset, fd, tree);
memset(rr, '\0', sizeof(rr));
memset(rd, '\0', sizeof(rd));

View File

@ -1,7 +1,7 @@
/* packet-portmap.c
* Routines for portmap dissection
*
* $Id: packet-portmap.c,v 1.17 2000/06/12 08:47:34 guy Exp $
* $Id: packet-portmap.c,v 1.18 2000/08/13 14:07:55 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -65,6 +65,10 @@ int dissect_getport_call(const u_char *pd, int offset, frame_data *fd,
{
guint32 proto;
guint32 prog;
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
if ( !BYTES_ARE_IN_FRAME(offset, 16)) return offset;
if ( tree )
@ -90,6 +94,9 @@ int dissect_getport_call(const u_char *pd, int offset, frame_data *fd,
int dissect_getport_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
if ( !BYTES_ARE_IN_FRAME(offset, 4)) return offset;
if ( tree )
{
@ -105,6 +112,10 @@ int dissect_set_call(const u_char *pd, int offset, frame_data *fd,
{
guint32 proto;
guint32 prog;
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
if ( !BYTES_ARE_IN_FRAME(offset, 16)) return offset;
if ( tree )
@ -133,6 +144,10 @@ int dissect_unset_call(const u_char *pd, int offset, frame_data *fd,
{
guint32 proto;
guint32 prog;
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
if ( !BYTES_ARE_IN_FRAME(offset, 16)) return offset;
if ( tree )
@ -158,6 +173,9 @@ int dissect_unset_call(const u_char *pd, int offset, frame_data *fd,
int dissect_set_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
if ( tree )
{
if ( !BYTES_ARE_IN_FRAME(offset, 4)) return offset;
@ -175,6 +193,9 @@ dissect_dump_entry(const u_char* pd, int offset, frame_data* fd, proto_tree* tre
int prog, version, proto, port;
proto_item *ti, *subtree;
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
if ( ! BYTES_ARE_IN_FRAME(offset, 16) )
{
if ( tree )
@ -211,6 +232,9 @@ dissect_dump_entry(const u_char* pd, int offset, frame_data* fd, proto_tree* tre
int dissect_dump_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
offset = dissect_rpc_list(pd, offset, fd, tree, dissect_dump_entry);
return offset;
}
@ -296,6 +320,9 @@ dissect_rpcb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int dissect_rpcb3_getaddr_call(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
offset = dissect_rpcb(pd, offset, fd, tree);
return offset;
@ -306,6 +333,9 @@ int dissect_rpcb3_getaddr_call(const u_char *pd, int offset, frame_data *fd,
int dissect_rpcb3_getaddr_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
offset = dissect_rpc_string(pd, offset, fd, tree, hf_portmap_uaddr,NULL);
return offset;
@ -316,6 +346,9 @@ int dissect_rpcb3_getaddr_reply(const u_char *pd, int offset, frame_data *fd,
int dissect_rpcb3_dump_reply(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
if (!proto_is_protocol_enabled(proto_portmap))
return offset;
offset = dissect_rpc_list(pd, offset, fd, tree, dissect_rpcb);
return offset;
}

View File

@ -1,7 +1,7 @@
/* packet-ppp.c
* Routines for ppp packet disassembly
*
* $Id: packet-ppp.c,v 1.38 2000/08/07 03:21:00 guy Exp $
* $Id: packet-ppp.c,v 1.39 2000/08/13 14:08:38 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1046,6 +1046,8 @@ dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int first, last;
tvbuff_t *next_tvb;
CHECK_DISPLAY_AS_DATA(proto_mp, tvb, pinfo, tree);
flags = tvb_get_guint8(tvb, 0);
first = flags && MP_FRAG_FIRST;
last = flags && MP_FRAG_LAST;
@ -1123,6 +1125,8 @@ dissect_ppp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
tvbuff_t *next_tvb;
guint8 byte0;
CHECK_DISPLAY_AS_DATA(proto_ppp, tvb, pinfo, tree);
pinfo->current_proto = "PPP";
byte0 = tvb_get_guint8(tvb, 0);

View File

@ -2,7 +2,7 @@
* Routines for Q.2931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-q2931.c,v 1.10 2000/05/31 05:07:30 guy Exp $
* $Id: packet-q2931.c,v 1.11 2000/08/13 14:08:42 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1988,6 +1988,8 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int codeset;
gboolean non_locking_shift;
CHECK_DISPLAY_AS_DATA(proto_q2931, tvb, pinfo, tree);
pinfo->current_proto = "Q.2931";
if (check_col(pinfo->fd, COL_PROTOCOL))

View File

@ -2,7 +2,7 @@
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-q931.c,v 1.16 2000/05/31 05:07:31 guy Exp $
* $Id: packet-q931.c,v 1.17 2000/08/13 14:08:38 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -2067,6 +2067,8 @@ dissect_q931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int codeset;
gboolean non_locking_shift;
CHECK_DISPLAY_AS_DATA(proto_q931, tvb, pinfo, tree);
pinfo->current_proto = "Q.931";
if (check_col(pinfo->fd, COL_PROTOCOL))

View File

@ -4,7 +4,7 @@
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
* $Id: packet-quake.c,v 1.3 2000/08/07 03:21:02 guy Exp $
* $Id: packet-quake.c,v 1.4 2000/08/13 14:08:36 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -543,6 +543,8 @@ dissect_quake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint rest_length;
tvbuff_t *next_tvb;
CHECK_DISPLAY_AS_DATA(proto_quake, tvb, pinfo, tree);
if (!tvb_bytes_exist(tvb, 0, 4)) return;
length = tvb_get_ntohl(tvb, 0);

View File

@ -1,7 +1,7 @@
/* packet-radius.c
* Routines for RADIUS packet disassembly
*
* $Id: packet-radius.c,v 1.16 2000/08/07 03:21:03 guy Exp $
* $Id: packet-radius.c,v 1.17 2000/08/13 14:08:35 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Johan Feyaerts
@ -680,6 +680,8 @@ proto_tree
return;
}
OLD_CHECK_DISPLAY_AS_DATA(proto_radius, pd, offset, fd, tree);
memcpy(&rh,&pd[offset],sizeof(e_radiushdr));

View File

@ -2,7 +2,7 @@
* Routines for RIPv1 and RIPv2 packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
* $Id: packet-rip.c,v 1.17 2000/08/07 03:21:04 guy Exp $
* $Id: packet-rip.c,v 1.18 2000/08/13 14:08:42 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -63,6 +63,8 @@ dissect_rip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
"Traceon", "Traceoff", "Vendor specific (Sun)" };
static char *version[3] = { "RIP", "RIPv1", "RIPv2" };
OLD_CHECK_DISPLAY_AS_DATA(proto_rip, pd, offset, fd, tree);
/* avoid alignment problem */
memcpy(&rip_header, &pd[offset], sizeof(rip_header));

View File

@ -3,7 +3,7 @@
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
* derived from packet-rip.c
*
* $Id: packet-ripng.c,v 1.13 2000/08/07 03:21:04 guy Exp $
* $Id: packet-ripng.c,v 1.14 2000/08/13 14:08:43 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -67,6 +67,8 @@ dissect_ripng(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
};
const char *cmd;
OLD_CHECK_DISPLAY_AS_DATA(proto_ripng, pd, offset, fd, tree);
/* avoid alignment problem */
memcpy(&rip6, &pd[offset], sizeof(rip6));

View File

@ -2,7 +2,7 @@
* Routines for unix rlogin packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-rlogin.c,v 1.8 2000/08/11 13:35:07 deniel Exp $
* $Id: packet-rlogin.c,v 1.9 2000/08/13 14:08:37 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -365,6 +365,8 @@ dissect_rlogin(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
rlogin_hash_entry_t *hash_info = 0;
conversation_t *conversation;
OLD_CHECK_DISPLAY_AS_DATA(proto_rlogin, pd, offset, fd, tree);
/* Lookup this connection*/
conversation = find_conversation( &pi.src, &pi.dst, pi.ptype,
pi.srcport, pi.destport);

View File

@ -2,7 +2,7 @@
* Routines for rpc dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
*
* $Id: packet-rpc.c,v 1.35 2000/08/08 06:19:51 girlich Exp $
* $Id: packet-rpc.c,v 1.36 2000/08/13 14:07:54 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1042,6 +1042,9 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
dissect_function_t *dissect_function = NULL;
if (!proto_is_protocol_enabled(proto_rpc))
return FALSE;
/* TCP uses record marking */
use_rm = (pi.ptype == PT_TCP);

View File

@ -4,7 +4,7 @@
* Robert Tsai <rtsai@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-rsh.c,v 1.2 2000/08/12 12:56:23 deniel Exp $
* $Id: packet-rsh.c,v 1.3 2000/08/13 14:08:43 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -55,6 +55,8 @@ dissect_rsh(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
const u_char *lineend, *eol;
int linelen;
OLD_CHECK_DISPLAY_AS_DATA(proto_rsh, pd, offset, fd, tree);
data = &pd[offset];
dataend = data + END_OF_FRAME;

View File

@ -3,7 +3,7 @@
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
* $Id: packet-rsvp.c,v 1.26 2000/08/11 13:35:04 deniel Exp $
* $Id: packet-rsvp.c,v 1.27 2000/08/13 14:07:58 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -847,6 +847,8 @@ dissect_rsvp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
struct e_in6_addr *ip6a;
guint32 ip_addr;
OLD_CHECK_DISPLAY_AS_DATA(proto_rsvp, pd, offset, fd, tree);
hdr = (rsvp_header *)&pd[offset];
packet_type = match_strval(hdr->message_type, message_type_vals);
if (check_col(fd, COL_PROTOCOL))

View File

@ -3,7 +3,7 @@
*
* Jason Lango <jal@netapp.com>
*
* $Id: packet-rtcp.c,v 1.3 2000/05/31 05:07:37 guy Exp $
* $Id: packet-rtcp.c,v 1.4 2000/08/13 14:08:43 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -422,6 +422,8 @@ dissect_rtcp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
int end_offset;
OLD_CHECK_DISPLAY_AS_DATA(proto_rtcp, pd, offset, fd, tree);
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "RTCP");

View File

@ -3,7 +3,7 @@
*
* Jason Lango <jal@netapp.com>
*
* $Id: packet-rtp.c,v 1.4 2000/05/31 05:07:37 guy Exp $
* $Id: packet-rtp.c,v 1.5 2000/08/13 14:08:43 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -84,6 +84,8 @@ dissect_rtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
guint32 *csrc_ptr;
rtp_hdr_ext_t ext;
OLD_CHECK_DISPLAY_AS_DATA(proto_rtp, pd, offset, fd, tree);
data = &pd[offset];
dataend = data + END_OF_FRAME;
end_offset = offset + END_OF_FRAME;

View File

@ -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.15 2000/08/07 03:21:07 guy Exp $
* $Id: packet-rtsp.c,v 1.16 2000/08/13 14:08:43 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -149,6 +149,8 @@ static void dissect_rtsp(const u_char *pd, int offset, frame_data *fd,
int is_sdp = 0;
int end_offset;
OLD_CHECK_DISPLAY_AS_DATA(proto_rtsp, pd, offset, fd, tree);
data = &pd[offset];
dataend = data + END_OF_FRAME;
end_offset = offset + END_OF_FRAME;

View File

@ -4,7 +4,7 @@
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
*
* $Id: packet-rx.c,v 1.13 2000/08/07 03:21:07 guy Exp $
* $Id: packet-rx.c,v 1.14 2000/08/13 14:08:44 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -103,6 +103,8 @@ dissect_rx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
struct rx_header *rxh;
int reply;
OLD_CHECK_DISPLAY_AS_DATA(proto_rx, pd, offset, fd, tree);
rxh = (struct rx_header *) &pd[offset];
/* get at least a full packet structure */

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-sap.c,v 1.9 2000/08/07 03:21:08 guy Exp $
* $Id: packet-sap.c,v 1.10 2000/08/13 14:08:44 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -137,6 +137,8 @@ dissect_sap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_item *si, *sif;
proto_tree *sap_tree, *sap_flags_tree;
OLD_CHECK_DISPLAY_AS_DATA(proto_sap, pd, offset, fd, tree);
is_ipv6 = pd[offset]&MCAST_SAP_BIT_A;
is_del = pd[offset]&MCAST_SAP_BIT_T;
is_enc = pd[offset]&MCAST_SAP_BIT_E;

View File

@ -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.4 2000/08/11 13:35:00 deniel Exp $
* $Id: packet-sctp.c,v 1.5 2000/08/13 14:08:45 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@ -1482,6 +1482,8 @@ dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
proto_tree *sctp_tree;
CHECK_DISPLAY_AS_DATA(proto_sctp, tvb, pinfo, tree);
pinfo->current_proto = "SCTP";
/* Extract the common header */

View File

@ -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.8 2000/05/31 05:07:40 guy Exp $
* $Id: packet-sdp.c,v 1.9 2000/08/13 14:08:46 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -58,6 +58,8 @@ void dissect_sdp(const u_char *pd, int offset, frame_data *fd,
int valuelen;
const char *typename;
OLD_CHECK_DISPLAY_AS_DATA(proto_sdp, pd, offset, fd, tree);
data = &pd[offset];
dataend = data + END_OF_FRAME;

View File

@ -2,7 +2,7 @@
* Routines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-smb-browse.c,v 1.4 2000/05/31 05:07:40 guy Exp $
* $Id: packet-smb-browse.c,v 1.5 2000/08/13 14:08:48 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -150,6 +150,9 @@ dissect_mailslot_browse(const u_char *pd, int offset, frame_data *fd, proto_tree
guint32 loc_offset = DataOffset, count = 0;
int i;
if (!proto_is_protocol_enabled(proto_smb_browse))
return 0;
if (check_col(fd, COL_PROTOCOL))
col_add_str(fd, COL_PROTOCOL, "BROWSER");

View File

@ -2,7 +2,7 @@
* Routines for smb net logon packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-smb-logon.c,v 1.7 2000/08/06 10:04:14 guy Exp $
* $Id: packet-smb-logon.c,v 1.8 2000/08/13 14:08:49 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -524,6 +524,9 @@ static void (*dissect_smb_logon_cmds[])(const u_char *, int, frame_data *,
proto_tree *smb_logon_tree;
proto_item *ti;
if (!proto_is_protocol_enabled(proto_smb_logon))
return 0;
/* get the Command field */
cmd = MIN( GBYTE(pd, offset), array_length(dissect_smb_logon_cmds)-1);

View File

@ -2,7 +2,7 @@
* Routines for smb mailslot packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-smb-mailslot.c,v 1.5 2000/05/31 05:07:41 guy Exp $
* $Id: packet-smb-mailslot.c,v 1.6 2000/08/13 14:08:49 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -71,12 +71,14 @@ dissect_mailslot_smb(const u_char *pd, int offset, frame_data *fd,
/* decode the SMB mail slot protocol */
proto_tree *smb_msp_tree = 0;
proto_item *ti;
guint16 Temp16;
const char *StrPtr;
if (!proto_is_protocol_enabled(proto_smb_msp))
return 0;
/* do the Op code field */

View File

@ -2,7 +2,7 @@
* Routines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-smb-pipe.c,v 1.9 2000/05/31 05:07:41 guy Exp $
* $Id: packet-smb-pipe.c,v 1.10 2000/08/13 14:08:49 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1227,6 +1227,9 @@ guint32
dissect_pipe_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, const u_char *command, int DataOffset, int DataCount, int ParameterOffset, int ParameterCount)
{
if (!proto_is_protocol_enabled(proto_smb_lanman))
return 0;
if (strcmp(command, "LANMAN") == 0) { /* Try to decode a LANMAN */
return dissect_pipe_lanman(pd, offset, fd, parent, tree, si, max_data, SMB_offset, errcode, dirn, command, DataOffset, DataCount, ParameterOffset, ParameterCount);

View File

@ -2,7 +2,7 @@
* Routines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-smb.c,v 1.70 2000/08/07 14:49:03 sharpe Exp $
* $Id: packet-smb.c,v 1.71 2000/08/13 14:08:50 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -10595,6 +10595,8 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
int SMB_offset = offset;
struct smb_info si;
OLD_CHECK_DISPLAY_AS_DATA(proto_smb, pd, offset, fd, tree);
si.unicode = 0;
cmd = pd[offset + SMB_hdr_com_offset];

View File

@ -2,7 +2,7 @@
* Routines for SNA
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-sna.c,v 1.17 2000/08/07 03:21:10 guy Exp $
* $Id: packet-sna.c,v 1.18 2000/08/13 14:08:58 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -310,6 +310,8 @@ dissect_sna(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
guint8 th_fid;
int sna_header_len = 0, th_header_len = 0;
OLD_CHECK_DISPLAY_AS_DATA(proto_sna, pd, offset, fd, tree);
/* SNA data should be printed in EBCDIC, not ASCII */
fd->flags.encoding = CHAR_EBCDIC;

View File

@ -2,7 +2,7 @@
* Routines for SNMP (simple network management protocol)
* D.Jorand (c) 1998
*
* $Id: packet-snmp.c,v 1.46 2000/08/07 03:21:11 guy Exp $
* $Id: packet-snmp.c,v 1.47 2000/08/13 14:09:00 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1893,12 +1893,14 @@ dissect_smux_pdu(const u_char *pd, int offset, frame_data *fd,
static void
dissect_snmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
OLD_CHECK_DISPLAY_AS_DATA(proto_snmp, pd, offset, fd, tree);
dissect_snmp_pdu(pd, offset, fd, tree, "SNMP", proto_snmp, ett_snmp);
}
static void
dissect_smux(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
OLD_CHECK_DISPLAY_AS_DATA(proto_smux, pd, offset, fd, tree);
dissect_smux_pdu(pd, offset, fd, tree, proto_smux, ett_smux);
}

View File

@ -2,7 +2,7 @@
* Routines for socks versions 4 &5 packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-socks.c,v 1.9 2000/08/11 13:34:59 deniel Exp $
* $Id: packet-socks.c,v 1.10 2000/08/13 14:09:01 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -954,6 +954,7 @@ dissect_socks(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
socks_hash_entry_t *hash_info;
conversation_t *conversation;
OLD_CHECK_DISPLAY_AS_DATA(proto_socks, pd, offset, fd, tree);
conversation = find_conversation( &pi.src, &pi.dst, pi.ptype,
pi.srcport, pi.destport);

Some files were not shown because too many files have changed in this diff Show More