diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-05-30 03:35:55 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-05-30 03:35:55 +0000 |
commit | 86e1e74fb97c4f218ee886c4b87d5d154105916c (patch) | |
tree | c0e05a11792c41f2f8041d360f362322f93b4ef4 | |
parent | 11b7f3727d041ac0de1e655154a12a726546e0b5 (diff) |
Give the IPX dissector dissector hash tables for the IPX type and socket
number, and have the protocols encapsulated inside IPX register
themselves with that table.
svn path=/trunk/; revision=2028
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | packet-atalk.c | 3 | ||||
-rw-r--r-- | packet-eigrp.c | 7 | ||||
-rw-r--r-- | packet-eigrp.h | 26 | ||||
-rw-r--r-- | packet-ipx.c | 175 | ||||
-rw-r--r-- | packet-ipx.h | 49 | ||||
-rw-r--r-- | packet-nbipx.c | 10 | ||||
-rw-r--r-- | packet-nbipx.h | 3 | ||||
-rw-r--r-- | packet-ncp.c | 7 | ||||
-rw-r--r-- | packet-ncp.h | 27 | ||||
-rw-r--r-- | packet-snmp.c | 7 | ||||
-rw-r--r-- | packet-snmp.h | 4 | ||||
-rw-r--r-- | packet-udp.c | 3 |
13 files changed, 118 insertions, 207 deletions
diff --git a/Makefile.am b/Makefile.am index 8c670d290a..5bf45e1dd0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ # Makefile.am # Automake file for Ethereal # -# $Id: Makefile.am,v 1.201 2000/05/28 22:59:16 guy Exp $ +# $Id: Makefile.am,v 1.202 2000/05/30 03:35:50 guy Exp $ # # Ethereal - Network traffic analyzer # By Gerald Combs <gerald@zing.org> @@ -172,7 +172,6 @@ noinst_HEADERS = \ packet-clnp.h \ packet-ddtp.h \ packet-dns.h \ - packet-eigrp.h \ packet-esis.h \ packet-eth.h \ packet-fddi.h \ @@ -194,7 +193,6 @@ noinst_HEADERS = \ packet-llc.h \ packet-mount.h \ packet-nbipx.h \ - packet-ncp.h \ packet-netbios.h \ packet-nfs.h \ packet-nlm.h \ diff --git a/packet-atalk.c b/packet-atalk.c index 151285cd67..f82e58f004 100644 --- a/packet-atalk.c +++ b/packet-atalk.c @@ -1,7 +1,7 @@ /* packet-atalk.c * Routines for Appletalk packet disassembly (DDP, currently). * - * $Id: packet-atalk.c,v 1.36 2000/05/28 22:59:17 guy Exp $ + * $Id: packet-atalk.c,v 1.37 2000/05/30 03:35:51 guy Exp $ * * Simon Wilkinson <sxw@dcs.ed.ac.uk> * @@ -35,7 +35,6 @@ #include <glib.h> #include "packet.h" #include "packet-atalk.h" -#include "packet-eigrp.h" #include "etypes.h" #include "ppptypes.h" diff --git a/packet-eigrp.c b/packet-eigrp.c index 43cb2e6799..f9facfcaaa 100644 --- a/packet-eigrp.c +++ b/packet-eigrp.c @@ -1,6 +1,6 @@ /* packet-eigrp.c * - * $Id: packet-eigrp.c,v 1.2 2000/05/30 03:09:11 gram Exp $ + * $Id: packet-eigrp.c,v 1.3 2000/05/30 03:35:51 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -38,9 +38,9 @@ #include "packet.h" #include "resolv.h" -#include "packet-eigrp.h" #include "packet-atalk.h" #include "packet-ip.h" +#include "packet-ipx.h" /* EIGRP Structs and Definitions. */ @@ -85,7 +85,7 @@ static const value_string eigrp_opcode_vals[] = { { 0, NULL } }; -void +static void dissect_eigrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { e_eigrp ih; proto_tree *eigrp_tree; @@ -133,4 +133,5 @@ proto_reg_handoff_eigrp(void) { dissector_add("ip.proto", IP_PROTO_EIGRP, dissect_eigrp); dissector_add("ddp.type", DDP_EIGRP, dissect_eigrp); + dissector_add("ipx.socket", IPX_SOCKET_EIGRP, dissect_eigrp); } diff --git a/packet-eigrp.h b/packet-eigrp.h deleted file mode 100644 index 6cdd53eb38..0000000000 --- a/packet-eigrp.h +++ /dev/null @@ -1,26 +0,0 @@ -/* packet-eigrp.h - * - * $Id: packet-eigrp.h,v 1.1 2000/05/22 18:09:34 guy 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. - */ - - -void dissect_eigrp(const u_char *, int, frame_data *, proto_tree *); diff --git a/packet-ipx.c b/packet-ipx.c index 06330c3b0f..1fb9db630b 100644 --- a/packet-ipx.c +++ b/packet-ipx.c @@ -2,7 +2,7 @@ * Routines for NetWare's IPX * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-ipx.c,v 1.59 2000/05/22 18:09:36 guy Exp $ + * $Id: packet-ipx.c,v 1.60 2000/05/30 03:35:51 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -40,8 +40,6 @@ #include "packet.h" #include "packet-ipx.h" #include "packet-nbipx.h" -#include "packet-ncp.h" -#include "packet-eigrp.h" #include "resolv.h" #include "packet-snmp.h" @@ -71,6 +69,9 @@ static int hf_ipx_ssocket = -1; static gint ett_ipx = -1; +static dissector_table_t ipx_type_dissector_table; +static dissector_table_t ipx_socket_dissector_table; + static int proto_spx = -1; static int hf_spx_connection_control = -1; static int hf_spx_datastream_type = -1; @@ -112,16 +113,10 @@ dissect_ipxsap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree); static void dissect_ipxmsg(const u_char *pd, int offset, frame_data *fd, proto_tree *tree); -static void -dissect_eigrp_ipx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree); - -typedef void (dissect_func_t)(const u_char *, int, frame_data *, proto_tree *); - #define UDP_PORT_IPX 213 /* RFC 1234 */ struct port_info { guint16 port; - dissect_func_t *func; char *text; }; @@ -139,66 +134,29 @@ struct server_info { /* IPX */ /* ================================================================= */ -/* info on these sockets can be found in this listing from Novell: - - http://developer.novell.com/engsup/sample/tids/dsoc1b/dsoc1b.htm -*/ - -#define IPX_SOCKET_PING_CISCO 0x0002 /* In cisco this is set with: ipx ping-default cisco */ -#define IPX_SOCKET_NCP 0x0451 -#define IPX_SOCKET_SAP 0x0452 -#define IPX_SOCKET_IPXRIP 0x0453 -#define IPX_SOCKET_NETBIOS 0x0455 -#define IPX_SOCKET_DIAGNOSTIC 0x0456 -#define IPX_SOCKET_SERIALIZATION 0x0457 -#define IPX_SOCKET_NWLINK_SMB_NAMEQUERY 0x0551 -#define IPX_SOCKET_NWLINK_SMB_DGRAM 0x0553 -#define IPX_SOCKET_NWLINK_SMB_BROWSE 0x0555 /* ? not sure on this - but I guessed based on the content of the packet I saw */ -#define IPX_SOCKET_ATTACHMATE_GW 0x055d -#define IPX_SOCKET_IPX_MESSAGE 0x4001 -#define IPX_SOCKET_ADSM 0x8522 /* www.tivoli.com */ -#define IPX_SOCKET_EIGRP 0x85be /* cisco ipx eigrp */ -#define IPX_SOCKET_WIDE_AREA_ROUTER 0x9001 -#define IPX_SOCKET_SNMP_AGENT 0x900F /* RFC 1906 */ -#define IPX_SOCKET_SNMP_SINK 0x9010 /* RFC 1906 */ -#define IPX_SOCKET_PING_NOVELL 0x9086 /* In cisco this is set with: ipx ping-default novell */ -#define IPX_SOCKET_TCP_TUNNEL 0x9091 /* RFC 1791 */ -#define IPX_SOCKET_UDP_TUNNEL 0x9092 /* RFC 1791 */ - static struct port_info ports[] = { - - { IPX_SOCKET_PING_CISCO, NULL, "CISCO PING" }, - { IPX_SOCKET_NCP, dissect_ncp, - "NCP" }, - { IPX_SOCKET_SAP, dissect_ipxsap, - "SAP" }, - { IPX_SOCKET_IPXRIP, dissect_ipxrip, - "RIP" }, - { IPX_SOCKET_NETBIOS, NULL, - "NetBIOS" }, - { IPX_SOCKET_DIAGNOSTIC, NULL, - "Diagnostic" }, - { IPX_SOCKET_SERIALIZATION, NULL, - "Serialization" }, - { IPX_SOCKET_NWLINK_SMB_NAMEQUERY, NULL, - "NWLink SMB Name Query" }, - { IPX_SOCKET_NWLINK_SMB_DGRAM, dissect_nwlink_dg, - "NWLink SMB Datagram" }, - { IPX_SOCKET_NWLINK_SMB_BROWSE, NULL, "NWLink SMB Browse" }, - { IPX_SOCKET_ATTACHMATE_GW, NULL, "Attachmate Gateway" }, - { IPX_SOCKET_IPX_MESSAGE, dissect_ipxmsg, "IPX Message" }, - { IPX_SOCKET_SNMP_AGENT, dissect_snmp, "SNMP Agent" }, - { IPX_SOCKET_SNMP_SINK, dissect_snmp, "SNMP Sink" }, - { IPX_SOCKET_PING_NOVELL, NULL, "NOVELL PING" }, - { IPX_SOCKET_UDP_TUNNEL, NULL, "UDP Tunnel" }, - { IPX_SOCKET_TCP_TUNNEL, NULL, "TCP Tunnel" }, - { IPX_SOCKET_TCP_TUNNEL, NULL, "TCP Tunnel" }, - { IPX_SOCKET_ADSM, NULL, "ADSM" }, - { IPX_SOCKET_EIGRP, dissect_eigrp_ipx, "Cisco EIGRP for IPX" }, - { IPX_SOCKET_WIDE_AREA_ROUTER, NULL, "Wide Area Router" }, - { 0x0000, NULL, - NULL } + { IPX_SOCKET_PING_CISCO, "CISCO PING" }, + { IPX_SOCKET_NCP, "NCP" }, + { IPX_SOCKET_SAP, "SAP" }, + { IPX_SOCKET_IPXRIP, "RIP" }, + { IPX_SOCKET_NETBIOS, "NetBIOS" }, + { IPX_SOCKET_DIAGNOSTIC, "Diagnostic" }, + { IPX_SOCKET_SERIALIZATION, "Serialization" }, + { IPX_SOCKET_NWLINK_SMB_NAMEQUERY, "NWLink SMB Name Query" }, + { IPX_SOCKET_NWLINK_SMB_DGRAM, "NWLink SMB Datagram" }, + { IPX_SOCKET_NWLINK_SMB_BROWSE, "NWLink SMB Browse" }, + { IPX_SOCKET_ATTACHMATE_GW, "Attachmate Gateway" }, + { IPX_SOCKET_IPX_MESSAGE, "IPX Message" }, + { IPX_SOCKET_SNMP_AGENT, "SNMP Agent" }, + { IPX_SOCKET_SNMP_SINK, "SNMP Sink" }, + { IPX_SOCKET_PING_NOVELL, "NOVELL PING" }, + { IPX_SOCKET_UDP_TUNNEL, "UDP Tunnel" }, + { IPX_SOCKET_TCP_TUNNEL, "TCP Tunnel" }, + { IPX_SOCKET_TCP_TUNNEL, "TCP Tunnel" }, + { IPX_SOCKET_ADSM, "ADSM" }, + { IPX_SOCKET_EIGRP, "Cisco EIGRP for IPX" }, + { IPX_SOCKET_WIDE_AREA_ROUTER, "Wide Area Router" }, + { 0x0000, NULL } }; static char* @@ -214,39 +172,6 @@ port_text(guint16 port) { return "Unknown"; } -static dissect_func_t* -port_func(guint16 port) { - int i=0; - - while (ports[i].text != NULL) { - if (ports[i].port == port) { - return ports[i].func; - } - i++; - } - return NULL; -} - -/* - * From: - * - * http://alr.base2co.com:457/netguide/dipxD.ipx_packet_struct.html - * - * which is part of SCO's "Network Programmer's Guide and Reference". - * - * It calls type 20 "NetBIOS name packet". Microsoft Network Monitor - * calls it "WAN Broadcast"; it's also used for SMB browser announcements, - * i.e. NetBIOS (broadcast) datagrams. - */ -#define IPX_PACKET_TYPE_IPX 0 -#define IPX_PACKET_TYPE_RIP 1 -#define IPX_PACKET_TYPE_ECHO 2 -#define IPX_PACKET_TYPE_ERROR 3 -#define IPX_PACKET_TYPE_PEP 4 -#define IPX_PACKET_TYPE_SPX 5 -#define IPX_PACKET_TYPE_NCP 17 -#define IPX_PACKET_TYPE_WANBCAST 20 /* propagated NetBIOS packet? */ - static const value_string ipx_packet_type_vals[] = { { IPX_PACKET_TYPE_IPX, "IPX" }, { IPX_PACKET_TYPE_RIP, "RIP" }, @@ -368,7 +293,6 @@ dissect_ipx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { guint8 *ipx_snode, *ipx_dnode, *ipx_snet, *ipx_dnet; guint16 ipx_dsocket, ipx_ssocket; - dissect_func_t *dissect; guint32 ipx_dnet_val, ipx_snet_val; /* Calculate here for use in pinfo and in tree */ @@ -430,42 +354,30 @@ dissect_ipx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { } offset += 30; + if (dissector_try_port(ipx_type_dissector_table, ipx_type, pd, + offset, fd, tree)) + return; switch (ipx_type) { - case IPX_PACKET_TYPE_SPX: - dissect_spx(pd, offset, fd, tree); - break; - - case IPX_PACKET_TYPE_NCP: - dissect_ncp(pd, offset, fd, tree); - break; - case IPX_PACKET_TYPE_WANBCAST: case IPX_PACKET_TYPE_PEP: if (ipx_dsocket == IPX_SOCKET_NETBIOS) { dissect_nbipx(pd, offset, fd, tree); - break; + return; } /* else fall through */ case 0: /* IPX, fall through to default */ /* XXX - should type 0's be dissected as NBIPX if they're aimed at the NetBIOS socket? */ - default: - dissect = port_func(ipx_dsocket); - if (dissect) { - dissect(pd, offset, fd, tree); - } - else { - dissect = port_func(ipx_ssocket); - if (dissect) { - dissect(pd, offset, fd, tree); - } - else { - dissect_data(pd, offset, fd, tree); - } - } break; } + if (dissector_try_port(ipx_socket_dissector_table, ipx_dsocket, pd, + offset, fd, tree)) + return; + if (dissector_try_port(ipx_socket_dissector_table, ipx_ssocket, pd, + offset, fd, tree)) + return; + dissect_data(pd, offset, fd, tree); } @@ -825,12 +737,6 @@ dissect_ipxsap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { } } -static void -dissect_eigrp_ipx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) -{ - dissect_eigrp(pd,offset,fd,tree); -} - void proto_register_ipx(void) { @@ -975,6 +881,9 @@ proto_register_ipx(void) proto_register_field_array(proto_sap, hf_sap, array_length(hf_sap)); proto_register_subtree_array(ett, array_length(ett)); + + ipx_type_dissector_table = register_dissector_table("ipx.packet_type"); + ipx_socket_dissector_table = register_dissector_table("ipx.socket"); } void @@ -984,4 +893,8 @@ proto_reg_handoff_ipx(void) dissector_add("ethertype", ETHERTYPE_IPX, dissect_ipx); dissector_add("ppp.protocol", PPP_IPX, dissect_ipx); dissector_add("llc.dsap", SAP_NETWARE, dissect_ipx); + dissector_add("ipx.packet_type", IPX_PACKET_TYPE_SPX, dissect_spx); + dissector_add("ipx.socket", IPX_SOCKET_SAP, dissect_ipxsap); + dissector_add("ipx.socket", IPX_SOCKET_IPXRIP, dissect_ipxrip); + dissector_add("ipx.socket", IPX_SOCKET_IPX_MESSAGE, dissect_ipxmsg); } diff --git a/packet-ipx.h b/packet-ipx.h index 790843ab2f..7119146f4e 100644 --- a/packet-ipx.h +++ b/packet-ipx.h @@ -2,7 +2,7 @@ * Routines for NetWare's IPX * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-ipx.h,v 1.6 2000/02/15 21:02:25 gram Exp $ + * $Id: packet-ipx.h,v 1.7 2000/05/30 03:35:52 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -91,6 +91,53 @@ struct ipx_rip_packet #define IPX_NODE_LEN (6) #endif +/* + * From: + * + * http://alr.base2co.com:457/netguide/dipxD.ipx_packet_struct.html + * + * which is part of SCO's "Network Programmer's Guide and Reference". + * + * It calls type 20 "NetBIOS name packet". Microsoft Network Monitor + * calls it "WAN Broadcast"; it's also used for SMB browser announcements, + * i.e. NetBIOS (broadcast) datagrams. + */ +#define IPX_PACKET_TYPE_IPX 0 +#define IPX_PACKET_TYPE_RIP 1 +#define IPX_PACKET_TYPE_ECHO 2 +#define IPX_PACKET_TYPE_ERROR 3 +#define IPX_PACKET_TYPE_PEP 4 +#define IPX_PACKET_TYPE_SPX 5 +#define IPX_PACKET_TYPE_NCP 17 +#define IPX_PACKET_TYPE_WANBCAST 20 /* propagated NetBIOS packet? */ + +/* info on these sockets can be found in this listing from Novell: + + http://developer.novell.com/engsup/sample/tids/dsoc1b/dsoc1b.htm +*/ + +#define IPX_SOCKET_PING_CISCO 0x0002 /* In cisco this is set with: ipx ping-default cisco */ +#define IPX_SOCKET_NCP 0x0451 +#define IPX_SOCKET_SAP 0x0452 +#define IPX_SOCKET_IPXRIP 0x0453 +#define IPX_SOCKET_NETBIOS 0x0455 +#define IPX_SOCKET_DIAGNOSTIC 0x0456 +#define IPX_SOCKET_SERIALIZATION 0x0457 +#define IPX_SOCKET_NWLINK_SMB_NAMEQUERY 0x0551 +#define IPX_SOCKET_NWLINK_SMB_DGRAM 0x0553 +#define IPX_SOCKET_NWLINK_SMB_BROWSE 0x0555 /* ? not sure on this + but I guessed based on the content of the packet I saw */ +#define IPX_SOCKET_ATTACHMATE_GW 0x055d +#define IPX_SOCKET_IPX_MESSAGE 0x4001 +#define IPX_SOCKET_ADSM 0x8522 /* www.tivoli.com */ +#define IPX_SOCKET_EIGRP 0x85be /* cisco ipx eigrp */ +#define IPX_SOCKET_WIDE_AREA_ROUTER 0x9001 +#define IPX_SOCKET_SNMP_AGENT 0x900F /* RFC 1906 */ +#define IPX_SOCKET_SNMP_SINK 0x9010 /* RFC 1906 */ +#define IPX_SOCKET_PING_NOVELL 0x9086 /* In cisco this is set with: ipx ping-default novell */ +#define IPX_SOCKET_TCP_TUNNEL 0x9091 /* RFC 1791 */ +#define IPX_SOCKET_UDP_TUNNEL 0x9092 /* RFC 1791 */ + gchar* ipxnet_to_string(const guint8 *ad); gchar* ipxnet_to_str_punct(const guint32 ad, char punct); diff --git a/packet-nbipx.c b/packet-nbipx.c index 882ad594f1..591bbd089a 100644 --- a/packet-nbipx.c +++ b/packet-nbipx.c @@ -2,7 +2,7 @@ * Routines for NetBIOS over IPX packet disassembly * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-nbipx.c,v 1.19 2000/05/11 08:15:24 gram Exp $ + * $Id: packet-nbipx.c,v 1.20 2000/05/30 03:35:52 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -273,7 +273,7 @@ dissect_nbipx_dg(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, } } -void +static void dissect_nwlink_dg(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { int max_data = pi.captured_len - offset; @@ -439,3 +439,9 @@ proto_register_nbipx(void) /* proto_register_field_array(proto_nbipx, hf, array_length(hf));*/ proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_nbipx(void) +{ + dissector_add("ipx.socket", IPX_SOCKET_NWLINK_SMB_DGRAM, dissect_nwlink_dg); +} diff --git a/packet-nbipx.h b/packet-nbipx.h index e3ffd9370e..87147781a1 100644 --- a/packet-nbipx.h +++ b/packet-nbipx.h @@ -1,6 +1,6 @@ /* packet-nbipx.h * - * $Id: packet-nbipx.h,v 1.1 2000/02/15 21:02:36 gram Exp $ + * $Id: packet-nbipx.h,v 1.2 2000/05/30 03:35:53 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -24,4 +24,3 @@ void dissect_nbipx(const u_char *, int, frame_data *, proto_tree *); -void dissect_nwlink_dg(const u_char *, int, frame_data *, proto_tree *); diff --git a/packet-ncp.c b/packet-ncp.c index d36accadca..b8c04b521a 100644 --- a/packet-ncp.c +++ b/packet-ncp.c @@ -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.35 2000/05/11 08:15:26 gram Exp $ + * $Id: packet-ncp.c,v 1.36 2000/05/30 03:35:53 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -43,7 +43,6 @@ #include "packet.h" #include "conversation.h" #include "packet-ipx.h" -#include "packet-ncp.h" static int proto_ncp = -1; static int hf_ncp_ip_ver = -1; @@ -531,7 +530,7 @@ ncp2222_find(guint8 func, guint8 subfunc) return retval; } -void +static void dissect_ncp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { proto_tree *ncp_tree = NULL; @@ -1070,4 +1069,6 @@ proto_reg_handoff_ncp(void) { dissector_add("tcp.port", TCP_PORT_NCP, dissect_ncp); dissector_add("udp.port", UDP_PORT_NCP, dissect_ncp); + dissector_add("ipx.packet_type", IPX_PACKET_TYPE_NCP, dissect_ncp); + dissector_add("ipx.socket", IPX_SOCKET_NCP, dissect_ncp); } diff --git a/packet-ncp.h b/packet-ncp.h deleted file mode 100644 index c56f16c408..0000000000 --- a/packet-ncp.h +++ /dev/null @@ -1,27 +0,0 @@ -/* packet-ncp.h - * Routines for NetWare Core Protocol - * Gilbert Ramirez <gram@xiexie.org> - * - * $Id: packet-ncp.h,v 1.10 2000/04/20 07:23:45 guy 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. - */ - -void dissect_ncp(const u_char *, int, frame_data *, proto_tree *); diff --git a/packet-snmp.c b/packet-snmp.c index cde7205593..9d896a40db 100644 --- a/packet-snmp.c +++ b/packet-snmp.c @@ -2,7 +2,7 @@ * Routines for SNMP (simple network management protocol) * D.Jorand (c) 1998 * - * $Id: packet-snmp.c,v 1.34 2000/05/24 05:59:50 guy Exp $ + * $Id: packet-snmp.c,v 1.35 2000/05/30 03:35:54 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -51,6 +51,7 @@ #include "packet.h" #include "etypes.h" +#include "packet-ipx.h" #if defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H) /* @@ -1833,7 +1834,7 @@ dissect_smux_pdu(const u_char *pd, int offset, frame_data *fd, dissect_common_pdu(pd, offset, fd, smux_tree, asn1, pdu_type, start); } -void +static void dissect_snmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { dissect_snmp_pdu(pd, offset, fd, tree, "SNMP", proto_snmp, ett_snmp); @@ -1894,4 +1895,6 @@ proto_reg_handoff_snmp(void) dissector_add("udp.port", UDP_PORT_SNMP_TRAP, dissect_snmp); dissector_add("tcp.port", TCP_PORT_SMUX, dissect_smux); dissector_add("ethertype", ETHERTYPE_SNMP, dissect_snmp); + dissector_add("ipx.socket", IPX_SOCKET_SNMP_AGENT, dissect_snmp); + dissector_add("ipx.socket", IPX_SOCKET_SNMP_SINK, dissect_snmp); } diff --git a/packet-snmp.h b/packet-snmp.h index d01d2c2b6c..d0527fcd9e 100644 --- a/packet-snmp.h +++ b/packet-snmp.h @@ -2,7 +2,7 @@ * Exported routines for SNMP (simple network management protocol) * D.Jorand (c) 1998 * - * $Id: packet-snmp.h,v 1.3 2000/02/15 21:03:10 gram Exp $ + * $Id: packet-snmp.h,v 1.4 2000/05/30 03:35:55 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -24,8 +24,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -void dissect_snmp(const u_char *, int, frame_data *, proto_tree *); - /* * Guts of the SNMP dissector - exported for use by protocols such as * ILMI. diff --git a/packet-udp.c b/packet-udp.c index b16f5fbb97..7ebe966c2a 100644 --- a/packet-udp.c +++ b/packet-udp.c @@ -1,7 +1,7 @@ /* packet-udp.c * Routines for UDP packet disassembly * - * $Id: packet-udp.c,v 1.70 2000/05/11 08:15:54 gram Exp $ + * $Id: packet-udp.c,v 1.71 2000/05/30 03:35:55 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -48,7 +48,6 @@ #include "packet-udp.h" #include "packet-ip.h" -#include "packet-ncp.h" #include "packet-rpc.h" #include "packet-tftp.h" #include "packet-vines.h" |