Wrap the dissect_fddi() call (with a 4th argument) with

dissect_fddi_not_bitswapped() and dissect_fddi_bitswapped(), both of which
use the standard 3-argument tvbuffified-dissector argument list.

Add a dissector table called "wtap_encap" which is used to call dissectors
from dissect_frame(). The switch() statement from this top-level dissector
is removed.

The link-layer dissectors register themselves with the "wtap_encap"
dissector table. The dissectors are now static where possible.

svn path=/trunk/; revision=2708
This commit is contained in:
Gilbert Ramirez 2000-11-29 05:16:15 +00:00
parent d6d2a9ccc9
commit d673500082
27 changed files with 117 additions and 266 deletions

View File

@ -1,7 +1,7 @@
# Makefile.am
# Automake file for Ethereal
#
# $Id: Makefile.am,v 1.252 2000/11/22 04:03:22 gram Exp $
# $Id: Makefile.am,v 1.253 2000/11/29 05:16:14 gram Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@zing.org>
@ -184,9 +184,7 @@ noinst_HEADERS = \
packet-afs-register-info.h \
packet-afs-defs.h \
packet-arp.h \
packet-ascend.h\
packet-atalk.h \
packet-atm.h \
packet-bgp.h \
packet-bootparams.h \
packet-cdp.h \
@ -214,8 +212,6 @@ noinst_HEADERS = \
packet-isis-snp.h \
packet-isl.h \
packet-kerberos.h \
packet-lapb.h \
packet-lapd.h \
packet-ldap.h \
packet-llc.h \
packet-mount.h \
@ -252,7 +248,6 @@ noinst_HEADERS = \
packet-tr.h \
packet-trmac.h \
packet-udp.h \
packet-v120.h \
packet-vines.h \
packet-vlan.h \
packet-vtp.h \

View File

@ -1,7 +1,7 @@
/* packet-ascend.c
* Routines for decoding Lucent/Ascend packet traces
*
* $Id: packet-ascend.c,v 1.20 2000/11/19 08:53:54 guy Exp $
* $Id: packet-ascend.c,v 1.21 2000/11/29 05:16:14 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -32,7 +32,6 @@
#include <glib.h>
#include <string.h>
#include "packet.h"
#include "packet-ascend.h"
static int proto_ascend = -1;
static int hf_link_type = -1;
@ -53,7 +52,7 @@ static const value_string encaps_vals[] = {
static dissector_handle_t eth_handle;
static dissector_handle_t ppp_handle;
void
static void
dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *fh_tree;
@ -157,4 +156,5 @@ proto_reg_handoff_ascend(void)
*/
eth_handle = find_dissector("eth");
ppp_handle = find_dissector("ppp");
dissector_add("wtap_encap", WTAP_ENCAP_ASCEND, dissect_ascend);
}

View File

@ -1,30 +0,0 @@
/* packet-ascend.h
*
* $Id: packet-ascend.h,v 1.5 2000/08/11 13:34:18 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 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 __PACKET_ASCEND_H__
#define __PACKET_ASCEND_H__
void dissect_ascend(tvbuff_t *, packet_info *, proto_tree *);
#endif

View File

@ -1,7 +1,7 @@
/* packet-atm.c
* Routines for ATM packet disassembly
*
* $Id: packet-atm.c,v 1.27 2000/11/19 08:53:55 guy Exp $
* $Id: packet-atm.c,v 1.28 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -37,7 +37,6 @@
#include "oui.h"
#include "resolv.h"
#include "packet-atm.h"
#include "packet-eth.h"
#include "packet-llc.h"
#include "packet-snmp.h"
@ -556,7 +555,7 @@ atm_guess_content(tvbuff_t *tvb, packet_info *pinfo)
}
}
void
static void
dissect_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *atm_tree;
@ -790,3 +789,9 @@ proto_register_atm(void)
proto_atm_lane = proto_register_protocol("ATM LANE", "lane");
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_atm(void)
{
dissector_add("wtap_encap", WTAP_ENCAP_ATM_SNIFFER, dissect_atm);
}

View File

@ -1,30 +0,0 @@
/* packet-atm.h
*
* $Id: packet-atm.h,v 1.5 2000/08/11 13:34:17 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 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 __PACKET_ATM_H__
#define __PACKET_ATM_H__
void dissect_atm(tvbuff_t *, packet_info *, proto_tree *);
#endif

View File

@ -1,7 +1,7 @@
/* packet-clip.c
* Routines for clip packet disassembly
*
* $Id: packet-clip.c,v 1.12 2000/11/19 08:53:56 guy Exp $
* $Id: packet-clip.c,v 1.13 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -48,7 +48,7 @@ capture_clip( const u_char *pd, packet_counts *ld ) {
capture_ip(pd, 0, ld);
}
void
static void
dissect_clip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *fh_tree;
@ -102,4 +102,5 @@ proto_reg_handoff_clip(void)
* Get a handle for the IP dissector.
*/
ip_handle = find_dissector("ip");
dissector_add("wtap_encap", WTAP_ENCAP_LINUX_ATM_CLIP, dissect_clip);
}

View File

@ -1,6 +1,6 @@
/* packet-clip.h
*
* $Id: packet-clip.h,v 1.3 2000/08/11 13:34:15 deniel Exp $
* $Id: packet-clip.h,v 1.4 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -26,6 +26,5 @@
#define __PACKET_CLIP_H__
void capture_clip(const u_char *, packet_counts *);
void dissect_clip(tvbuff_t *, packet_info *, proto_tree *);
#endif

View File

@ -1,7 +1,7 @@
/* packet-eth.c
* Routines for ethernet packet disassembly
*
* $Id: packet-eth.c,v 1.49 2000/11/19 08:53:57 guy Exp $
* $Id: packet-eth.c,v 1.50 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -376,3 +376,9 @@ proto_register_eth(void)
register_dissector("eth", dissect_eth);
}
void
proto_reg_handoff_eth(void)
{
dissector_add("wtap_encap", WTAP_ENCAP_ETHERNET, dissect_eth);
}

View File

@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
* $Id: packet-fddi.c,v 1.42 2000/11/19 08:53:57 guy Exp $
* $Id: packet-fddi.c,v 1.43 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -219,7 +219,8 @@ fddifc_to_str(int fc)
}
}
void
static void
dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gboolean bitswapped)
{
@ -324,6 +325,19 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
} /* fc */
} /* dissect_fddi */
static void
dissect_fddi_bitswapped(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
dissect_fddi(tvb, pinfo, tree, TRUE);
}
static void
dissect_fddi_not_bitswapped(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
dissect_fddi(tvb, pinfo, tree, FALSE);
}
void
proto_register_fddi(void)
{
@ -359,3 +373,10 @@ proto_register_fddi(void)
proto_register_field_array(proto_fddi, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_fddi(void)
{
dissector_add("wtap_encap", WTAP_ENCAP_FDDI, dissect_fddi_not_bitswapped);
dissector_add("wtap_encap", WTAP_ENCAP_FDDI_BITSWAPPED, dissect_fddi_bitswapped);
}

View File

@ -1,6 +1,6 @@
/* packet-fddi.h
*
* $Id: packet-fddi.h,v 1.3 2000/08/11 13:34:13 deniel Exp $
* $Id: packet-fddi.h,v 1.4 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -26,6 +26,5 @@
#define __PACKET_FDDI_H__
void capture_fddi(const u_char *, packet_counts *);
void dissect_fddi(tvbuff_t*, packet_info*, proto_tree*, gboolean bitswapped);
#endif

View File

@ -2,7 +2,7 @@
*
* Top-most dissector. Decides dissector based on Wiretap Encapsulation Type.
*
* $Id: packet-frame.c,v 1.2 2000/11/15 05:41:42 guy Exp $
* $Id: packet-frame.c,v 1.3 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -34,25 +34,6 @@
#include "tvbuff.h"
#include "packet-frame.h"
#include "packet-ascend.h"
#include "packet-atalk.h"
#include "packet-atm.h"
#include "packet-clip.h"
#include "packet-eth.h"
#include "packet-fddi.h"
#include "packet-ipv6.h"
#include "packet-lapb.h"
#include "packet-lapd.h"
#include "packet-llc.h"
#include "packet-null.h"
#include "packet-ppp.h"
#include "packet-raw.h"
#include "packet-sna.h"
#include "packet-tr.h"
#include "packet-v120.h"
#include "packet-vines.h"
#include "packet-ieee80211.h"
static int proto_frame = -1;
static int hf_frame_arrival_time = -1;
static int hf_frame_time_delta = -1;
@ -70,6 +51,8 @@ static const value_string p2p_dirs[] = {
{ P2P_DIR_RECV, "Received" },
{ 0, NULL }
};
static dissector_table_t wtap_encap_dissector_table;
void
dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@ -130,56 +113,14 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
TRY {
switch (pinfo->fd->lnk_t) {
case WTAP_ENCAP_ETHERNET :
dissect_eth(tvb, pinfo, tree);
break;
case WTAP_ENCAP_FDDI :
dissect_fddi(tvb, pinfo, tree, FALSE);
break;
case WTAP_ENCAP_FDDI_BITSWAPPED :
dissect_fddi(tvb, pinfo, tree, TRUE);
break;
case WTAP_ENCAP_TOKEN_RING :
dissect_tr(tvb, pinfo, tree);
break;
case WTAP_ENCAP_NULL :
dissect_null(tvb, pinfo, tree);
break;
case WTAP_ENCAP_PPP :
case WTAP_ENCAP_PPP_WITH_PHDR :
dissect_ppp(tvb, pinfo, tree);
break;
case WTAP_ENCAP_LAPB :
dissect_lapb(tvb, pinfo, tree);
break;
case WTAP_ENCAP_RAW_IP :
dissect_raw(tvb, pinfo, tree);
break;
case WTAP_ENCAP_LINUX_ATM_CLIP :
dissect_clip(tvb, pinfo, tree);
break;
case WTAP_ENCAP_ATM_SNIFFER :
dissect_atm(tvb, pinfo, tree);
break;
case WTAP_ENCAP_ASCEND :
dissect_ascend(tvb, pinfo, tree);
break;
case WTAP_ENCAP_LAPD :
dissect_lapd(tvb, pinfo, tree);
break;
case WTAP_ENCAP_V120 :
dissect_v120(tvb, pinfo, tree);
break;
case WTAP_ENCAP_ATM_RFC1483:
dissect_llc(tvb, pinfo, tree);
break;
case WTAP_ENCAP_IEEE_802_11 :
dissect_ieee80211(tvb,pinfo,tree);
break;
default:
g_assert_not_reached();
break;
if (!dissector_try_port(wtap_encap_dissector_table, pinfo->fd->lnk_t,
tvb, pinfo, tree)) {
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "UNKNOWN");
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "WTAP_ENCAP = 0x%x", pinfo->fd->lnk_t);
dissect_data(tvb, 0, pinfo, tree);
}
}
CATCH(BoundsError) {
@ -226,6 +167,8 @@ proto_register_frame(void)
&ett_frame,
};
wtap_encap_dissector_table = register_dissector_table("wtap_encap");
proto_frame = proto_register_protocol("Frame", "frame");
proto_register_field_array(proto_frame, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));

View File

@ -3,7 +3,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
* $Id: packet-ieee80211.c,v 1.3 2000/11/19 08:53:58 guy Exp $
* $Id: packet-ieee80211.c,v 1.4 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@ -1737,3 +1737,9 @@ proto_register_wlan (void)
proto_register_field_array (proto_wlan, hf, array_length (hf));
proto_register_subtree_array (tree_array, array_length (tree_array));
}
void
proto_reg_handoff_iee380211(void)
{
dissector_add("wtap_encap", WTAP_ENCAP_IEEE_802_11, dissect_ieee80211);
}

View File

@ -4,7 +4,7 @@
* Copyright 2000, Axis Communications AB
* Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
*
* $Id: packet-ieee80211.h,v 1.1 2000/11/15 05:41:42 guy Exp $
* $Id: packet-ieee80211.h,v 1.2 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@ -28,4 +28,3 @@
*/
void capture_ieee80211 (const u_char *, int, packet_counts *);
void dissect_ieee80211 (tvbuff_t *, packet_info *, proto_tree *);

View File

@ -2,7 +2,7 @@
* Routines for lapb frame disassembly
* Olivier Abad <oabad@cybercable.fr>
*
* $Id: packet-lapb.c,v 1.23 2000/11/19 08:53:59 guy Exp $
* $Id: packet-lapb.c,v 1.24 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -36,7 +36,6 @@
#include <glib.h>
#include <string.h>
#include "packet.h"
#include "packet-lapb.h"
#include "packet-x25.h"
#include "xdlc.h"
@ -49,7 +48,7 @@ static int hf_lapb_control = -1;
static gint ett_lapb = -1;
static gint ett_lapb_control = -1;
void
static void
dissect_lapb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *lapb_tree, *ti;
@ -136,3 +135,9 @@ proto_register_lapb(void)
proto_register_field_array (proto_lapb, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_lapb(void)
{
dissector_add("wtap_encap", WTAP_ENCAP_LAPB, dissect_lapb);
}

View File

@ -1,30 +0,0 @@
/* packet-lapb.h
*
* $Id: packet-lapb.h,v 1.5 2000/08/11 13:34:10 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 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 __PACKET_LAPB_H__
#define __PACKET_LAPB_H__
void dissect_lapb(tvbuff_t *, packet_info *, proto_tree *);
#endif

View File

@ -2,7 +2,7 @@
* Routines for LAPD frame disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-lapd.c,v 1.16 2000/11/19 08:53:59 guy Exp $
* $Id: packet-lapd.c,v 1.17 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -36,7 +36,6 @@
#include <glib.h>
#include <string.h>
#include "packet.h"
#include "packet-lapd.h"
#include "packet-q931.h"
#include "xdlc.h"
@ -83,7 +82,7 @@ static const value_string lapd_sapi_vals[] = {
{ 0, NULL }
};
void
static void
dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *lapd_tree, *addr_tree;
@ -202,3 +201,9 @@ proto_register_lapd(void)
proto_register_field_array (proto_lapd, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_lapd(void)
{
dissector_add("wtap_encap", WTAP_ENCAP_LAPD, dissect_lapd);
}

View File

@ -1,30 +0,0 @@
/* packet-lapd.h
*
* $Id: packet-lapd.h,v 1.5 2000/08/11 13:33:59 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 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 __PACKET_LAPD_H__
#define __PACKET_LAPD_H__
void dissect_lapd(tvbuff_t *, packet_info *, proto_tree *);
#endif

View File

@ -2,7 +2,7 @@
* Routines for IEEE 802.2 LLC layer
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-llc.c,v 1.71 2000/11/19 08:53:59 guy Exp $
* $Id: packet-llc.c,v 1.72 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -504,4 +504,5 @@ proto_reg_handoff_llc(void)
* Get a handle for the BPDU dissector.
*/
bpdu_handle = find_dissector("bpdu");
dissector_add("wtap_encap", WTAP_ENCAP_ATM_RFC1483, dissect_llc);
}

View File

@ -1,7 +1,7 @@
/* packet-null.c
* Routines for null packet disassembly
*
* $Id: packet-null.c,v 1.34 2000/11/19 08:54:00 guy Exp $
* $Id: packet-null.c,v 1.35 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -209,7 +209,7 @@ capture_null( const u_char *pd, packet_counts *ld )
}
}
void
static void
dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint32 null_header;
@ -320,4 +320,5 @@ proto_reg_handoff_null(void)
* Get a handle for the PPP dissector.
*/
ppp_handle = find_dissector("ppp");
dissector_add("wtap_encap", WTAP_ENCAP_NULL, dissect_null);
}

View File

@ -1,6 +1,6 @@
/* packet-null.h
*
* $Id: packet-null.h,v 1.3 2000/08/11 13:34:05 deniel Exp $
* $Id: packet-null.h,v 1.4 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -26,6 +26,5 @@
#define __PACKET_NULL_H__
void capture_null(const u_char *, packet_counts *);
void dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
#endif

View File

@ -1,7 +1,7 @@
/* packet-ppp.c
* Routines for ppp packet disassembly
*
* $Id: packet-ppp.c,v 1.44 2000/11/19 08:54:01 guy Exp $
* $Id: packet-ppp.c,v 1.45 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1224,3 +1224,10 @@ proto_register_mp(void)
proto_register_field_array(proto_mp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_ppp(void)
{
dissector_add("wtap_encap", WTAP_ENCAP_PPP, dissect_ppp);
dissector_add("wtap_encap", WTAP_ENCAP_PPP_WITH_PHDR, dissect_ppp);
}

View File

@ -1,6 +1,6 @@
/* packet-ppp.h
*
* $Id: packet-ppp.h,v 1.5 2000/11/19 02:00:03 guy Exp $
* $Id: packet-ppp.h,v 1.6 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -26,6 +26,5 @@
#define __PACKET_PPP_H__
void capture_ppp(const u_char *, int, packet_counts *);
void dissect_ppp(tvbuff_t *, packet_info *, proto_tree *);
#endif

View File

@ -1,7 +1,7 @@
/* packet-raw.c
* Routines for raw packet disassembly
*
* $Id: packet-raw.c,v 1.22 2000/11/19 08:54:04 guy Exp $
* $Id: packet-raw.c,v 1.23 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -79,7 +79,7 @@ capture_raw(const u_char *pd, packet_counts *ld)
}
}
void
static void
dissect_raw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *fh_tree;
@ -163,4 +163,5 @@ proto_reg_handoff_raw(void)
*/
ip_handle = find_dissector("ip");
ppp_handle = find_dissector("ppp");
dissector_add("wtap_encap", WTAP_ENCAP_RAW_IP, dissect_raw);
}

View File

@ -1,6 +1,6 @@
/* packet-raw.h
*
* $Id: packet-raw.h,v 1.3 2000/08/11 13:34:02 deniel Exp $
* $Id: packet-raw.h,v 1.4 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -26,6 +26,5 @@
#define __PACKET_RAW_H__
void capture_raw(const u_char *, packet_counts *);
void dissect_raw(tvbuff_t *, packet_info *, proto_tree *);
#endif

View File

@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-tr.c,v 1.51 2000/11/19 08:54:10 guy Exp $
* $Id: packet-tr.c,v 1.52 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -671,3 +671,8 @@ proto_register_tr(void)
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_tr(void)
{
dissector_add("wtap_encap", WTAP_ENCAP_TOKEN_RING, dissect_tr);
}

View File

@ -2,7 +2,7 @@
* Routines for v120 frame disassembly
* Bert Driehuis <driehuis@playbeing.org>
*
* $Id: packet-v120.c,v 1.14 2000/11/19 08:54:10 guy Exp $
* $Id: packet-v120.c,v 1.15 2000/11/29 05:16:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -36,7 +36,6 @@
#include <glib.h>
#include <string.h>
#include "packet.h"
#include "packet-v120.h"
#include "xdlc.h"
#define FROM_DCE 0x80
@ -53,7 +52,7 @@ static gint ett_v120_header = -1;
static int dissect_v120_header(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
void
static void
dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *v120_tree, *tc, *address_tree;
@ -231,3 +230,9 @@ proto_register_v120(void)
proto_register_field_array (proto_v120, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_v120(void)
{
dissector_add("wtap_encap", WTAP_ENCAP_V120, dissect_v120);
}

View File

@ -1,30 +0,0 @@
/* packet-v120.h
*
* $Id: packet-v120.h,v 1.5 2000/08/11 13:33:57 deniel Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 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 __PACKET_V120_H__
#define __PACKET_V120_H__
void dissect_v120(tvbuff_t *, packet_info *, proto_tree *);
#endif