aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am31
-rw-r--r--packet-auto_rp.c13
-rw-r--r--packet-auto_rp.h26
-rw-r--r--packet-bgp.c12
-rw-r--r--packet-bgp.h4
-rw-r--r--packet-bootp.c12
-rw-r--r--packet-bootp.h26
-rw-r--r--packet-dhis.c14
-rw-r--r--packet-dhis.h4
-rw-r--r--packet-ftp.c17
-rw-r--r--packet-ftp.h27
-rw-r--r--packet-hsrp.c13
-rw-r--r--packet-hsrp.h26
-rw-r--r--packet-http.c16
-rw-r--r--packet-icp.c16
-rw-r--r--packet-icp.h26
-rw-r--r--packet-icq.c28
-rw-r--r--packet-icq.h26
-rw-r--r--packet-imap.c12
-rw-r--r--packet-imap.h26
-rw-r--r--packet-ipp.c18
-rw-r--r--packet-ipx.c10
-rw-r--r--packet-irc.c20
-rw-r--r--packet-irc.h26
-rw-r--r--packet-isakmp.c13
-rw-r--r--packet-isakmp.h26
-rw-r--r--packet-l2tp.c14
-rw-r--r--packet-l2tp.h26
-rw-r--r--packet-ldap.c13
-rw-r--r--packet-ldap.h4
-rw-r--r--packet-lpd.c11
-rw-r--r--packet-lpd.h26
-rw-r--r--packet-mapi.c14
-rw-r--r--packet-mapi.h26
-rw-r--r--packet-nbns.c20
-rw-r--r--packet-nbns.h28
-rw-r--r--packet-ncp.c10
-rw-r--r--packet-nntp.c12
-rw-r--r--packet-nntp.h26
-rw-r--r--packet-ntp.c16
-rw-r--r--packet-ntp.h4
-rw-r--r--packet-pop.c28
-rw-r--r--packet-pop.h26
-rw-r--r--packet-pptp.c12
-rw-r--r--packet-pptp.h26
-rw-r--r--packet-radius.c18
-rw-r--r--packet-radius.h26
-rw-r--r--packet-ripng.c12
-rw-r--r--packet-ripng.h4
-rw-r--r--packet-rtsp.c12
-rw-r--r--packet-rtsp.h26
-rw-r--r--packet-sap.c13
-rw-r--r--packet-sap.h26
-rw-r--r--packet-snmp.c12
-rw-r--r--packet-srvloc.c27
-rw-r--r--packet-srvloc.h26
-rw-r--r--packet-tacacs.c18
-rw-r--r--packet-tacacs.h27
-rw-r--r--packet-tcp.c71
-rw-r--r--packet-telnet.c12
-rw-r--r--packet-telnet.h26
-rw-r--r--packet-time.c14
-rw-r--r--packet-time.h26
-rw-r--r--packet-tns.c24
-rw-r--r--packet-tns.h4
-rw-r--r--packet-udp.c80
-rw-r--r--packet-wccp.c13
-rw-r--r--packet-wccp.h26
-rw-r--r--packet-who.c10
-rw-r--r--packet-who.h26
70 files changed, 452 insertions, 957 deletions
diff --git a/Makefile.am b/Makefile.am
index 062e4c9d88..63e01f476c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
# Makefile.am
# Automake file for Ethereal
#
-# $Id: Makefile.am,v 1.179 2000/04/08 03:32:09 guy Exp $
+# $Id: Makefile.am,v 1.180 2000/04/08 07:07:06 guy Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@zing.org>
@@ -46,11 +46,9 @@ DISSECTOR_SOURCES = \
packet-atm.c \
packet-atm.h \
packet-auto_rp.c \
- packet-auto_rp.h \
packet-bgp.c \
packet-bgp.h \
packet-bootp.c \
- packet-bootp.h \
packet-bootparams.c \
packet-bootparams.h \
packet-bpdu.c \
@@ -71,7 +69,6 @@ DISSECTOR_SOURCES = \
packet-fddi.c \
packet-fddi.h \
packet-ftp.c \
- packet-ftp.h \
packet-giop.c \
packet-giop.h \
packet-gre.c \
@@ -79,17 +76,13 @@ DISSECTOR_SOURCES = \
packet-h1.c \
packet-h1.h \
packet-hsrp.c \
- packet-hsrp.h \
packet-http.c \
packet-http.h \
packet-icmpv6.c\
packet-icmpv6.h\
packet-icp.c \
- packet-icp.h \
packet-icq.c \
- packet-icq.h \
packet-imap.c \
- packet-imap.h \
packet-ip.c \
packet-ip.h \
packet-ipp.c \
@@ -101,9 +94,7 @@ DISSECTOR_SOURCES = \
packet-ipx.c \
packet-ipx.h \
packet-irc.c \
- packet-irc.h \
packet-isakmp.c\
- packet-isakmp.h\
packet-isis.h \
packet-isis.c \
packet-isis-clv.h \
@@ -117,7 +108,6 @@ DISSECTOR_SOURCES = \
packet-isl.c \
packet-isl.h \
packet-l2tp.c \
- packet-l2tp.h \
packet-lapb.c \
packet-lapb.h \
packet-lapd.c \
@@ -127,9 +117,7 @@ DISSECTOR_SOURCES = \
packet-llc.c \
packet-llc.h \
packet-lpd.c \
- packet-lpd.h \
packet-mapi.c \
- packet-mapi.h \
packet-mount.c \
packet-mount.h \
packet-mpls.c \
@@ -137,7 +125,6 @@ DISSECTOR_SOURCES = \
packet-nbipx.c \
packet-nbipx.h \
packet-nbns.c \
- packet-nbns.h \
packet-ncp.c \
packet-ncp.h \
packet-netbios.c \
@@ -147,7 +134,6 @@ DISSECTOR_SOURCES = \
packet-nlm.c \
packet-nlm.h \
packet-nntp.c \
- packet-nntp.h \
packet-ntp.c \
packet-ntp.h \
packet-null.c \
@@ -159,7 +145,6 @@ DISSECTOR_SOURCES = \
packet-pim.c \
packet-pim.h \
packet-pop.c \
- packet-pop.h \
packet-portmap.c \
packet-portmap.h \
packet-ppp.c \
@@ -167,13 +152,11 @@ DISSECTOR_SOURCES = \
packet-pppoe.c \
packet-pppoe.h \
packet-pptp.c \
- packet-pptp.h \
packet-q2931.c \
packet-q2931.h \
packet-q931.c \
packet-q931.h \
packet-radius.c\
- packet-radius.h\
packet-raw.c \
packet-raw.h \
packet-rip.c \
@@ -186,11 +169,9 @@ DISSECTOR_SOURCES = \
packet-rsvp.c \
packet-rsvp.h \
packet-rtsp.c \
- packet-rtsp.h \
packet-rx.c \
packet-rx.h \
packet-sap.c \
- packet-sap.h \
packet-sdp.c \
packet-sdp.h \
packet-smb.c \
@@ -206,21 +187,17 @@ DISSECTOR_SOURCES = \
packet-snmp.c \
packet-snmp.h \
packet-srvloc.c \
- packet-srvloc.h \
packet-sscop.c \
packet-sscop.h \
packet-stat.c \
packet-stat.h \
packet-tacacs.c \
- packet-tacacs.h \
packet-tcp.c \
packet-tcp.h \
packet-telnet.c\
- packet-telnet.h\
packet-tftp.c \
packet-tftp.h \
packet-time.c \
- packet-time.h \
packet-tns.c \
packet-tns.h \
packet-tr.c \
@@ -239,10 +216,8 @@ DISSECTOR_SOURCES = \
packet-vrrp.h \
packet-vtp.c \
packet-vtp.h \
- packet-wccp.c\
- packet-wccp.h\
- packet-who.c\
- packet-who.h\
+ packet-wccp.c \
+ packet-who.c \
packet-x25.c \
packet-x25.h \
packet-yhoo.c \
diff --git a/packet-auto_rp.c b/packet-auto_rp.c
index 4436bbef0c..4f76cc8931 100644
--- a/packet-auto_rp.c
+++ b/packet-auto_rp.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-auto_rp.c,v 1.3 2000/03/12 04:47:35 gram Exp $
+ * $Id: packet-auto_rp.c,v 1.4 2000/04/08 07:07:08 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -57,6 +57,8 @@ static gint hf_auto_rp_pim_ver = -1;
static gint hf_auto_rp_group = -1;
static gint hf_auto_rp_mask_sgn = -1;
+#define UDP_PORT_PIM_RP_DISC 496
+
struct auto_rp_fixed_hdr {
#define AUTO_RP_VERSION_MASK 0xf0
#define AUTO_RP_TYPE_MASK 0x0f
@@ -116,7 +118,7 @@ static const value_string auto_rp_mask_sign_vals[] = {
static int do_auto_rp_map(const u_char *pd, int offset, frame_data *fd, proto_tree *auto_rp_tree);
-void dissect_auto_rp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
+static void dissect_auto_rp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
struct auto_rp_fixed_hdr arh;
gboolean short_hdr = FALSE;
@@ -239,6 +241,12 @@ void proto_register_auto_rp(void)
return;
}
+void
+proto_reg_handoff_auto_rp(void)
+{
+ dissector_add("udp.port", UDP_PORT_PIM_RP_DISC, dissect_auto_rp);
+}
+
/*
* Handles one Auto-RP map entry. Returns the number of bytes in the map entry or < 0 for error.
*/
@@ -290,4 +298,3 @@ static int do_auto_rp_map(const u_char *pd, int offset, frame_data *fd, proto_tr
return offset;
}
-
diff --git a/packet-auto_rp.h b/packet-auto_rp.h
deleted file mode 100644
index d380eeaaaf..0000000000
--- a/packet-auto_rp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-auto_rp.h
- *
- * $Id: packet-auto_rp.h,v 1.1 2000/02/15 21:02:02 gram 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_auto_rp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-bgp.c b/packet-bgp.c
index f394ca81ec..d99c32589d 100644
--- a/packet-bgp.c
+++ b/packet-bgp.c
@@ -2,7 +2,7 @@
* Routines for BGP packet dissection.
* Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id
+ * $Id: packet-bgp.c,v 1.21 2000/04/08 07:07:08 guy Exp $
*
* Supports:
* RFC1771 A Border Gateway Protocol 4 (BGP-4)
@@ -68,6 +68,8 @@
#include <arpa/inet.h>
#endif
+#define TCP_PORT_BGP 179
+
static const value_string bgptypevals[] = {
{ BGP_OPEN, "OPEN Message" },
{ BGP_UPDATE, "UPDATE Message" },
@@ -1091,7 +1093,7 @@ dissect_bgp_notification(const u_char *pd, int offset, frame_data *fd,
/*
* Dissect a BGP packet.
*/
-void
+static void
dissect_bgp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_item *ti; /* tree item */
@@ -1266,3 +1268,9 @@ proto_register_bgp(void)
proto_bgp = proto_register_protocol("Border Gateway Protocol", "bgp");
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_bgp(void)
+{
+ dissector_add("tcp.port", TCP_PORT_BGP, dissect_bgp);
+}
diff --git a/packet-bgp.h b/packet-bgp.h
index 27b80eae39..6bb337bdf9 100644
--- a/packet-bgp.h
+++ b/packet-bgp.h
@@ -1,7 +1,7 @@
/* packet-bgp.c
* Definitions for BGP packet disassembly structures and routine
*
- * $Id: packet-bgp.h,v 1.7 2000/02/15 21:02:02 gram Exp $
+ * $Id: packet-bgp.h,v 1.8 2000/04/08 07:07:09 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -25,8 +25,6 @@
#ifndef __PACKET_BGP_H__
#define __PACKET_BGP_H__
-void dissect_bgp(const u_char *, int, frame_data *, proto_tree *);
-
/* some handy things to know */
#define BGP_MAX_PACKET_SIZE 4096
#define BGP_MARKER_SIZE 16
diff --git a/packet-bootp.c b/packet-bootp.c
index 819a117e0b..502944291a 100644
--- a/packet-bootp.c
+++ b/packet-bootp.c
@@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
- * $Id: packet-bootp.c,v 1.29 2000/03/29 09:29:16 guy Exp $
+ * $Id: packet-bootp.c,v 1.30 2000/04/08 07:07:10 guy Exp $
*
* The information used comes from:
* RFC 2132: DHCP Options and BOOTP Vendor Extensions
@@ -61,6 +61,8 @@ static int hf_bootp_cookie = -1;
static guint ett_bootp = -1;
static guint ett_bootp_option = -1;
+#define UDP_PORT_BOOTPS 67
+
enum field_type { none, ipv4, string, toggle, yes_no, special, opaque,
time_in_secs,
val_u_byte, val_u_short, val_u_long,
@@ -552,7 +554,7 @@ bootp_option(const u_char *pd, proto_tree *bp_tree, int voff, int eoff)
return consumed;
}
-void
+static void
dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *bp_tree;
@@ -744,3 +746,9 @@ proto_register_bootp(void)
proto_register_field_array(proto_bootp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_bootp(void)
+{
+ dissector_add("udp.port", UDP_PORT_BOOTPS, dissect_bootp);
+}
diff --git a/packet-bootp.h b/packet-bootp.h
deleted file mode 100644
index ed2bc27328..0000000000
--- a/packet-bootp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-bootp.h
- *
- * $Id: packet-bootp.h,v 1.1 2000/02/15 21:02:03 gram 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_bootp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-dhis.c b/packet-dhis.c
index f746bbeae7..c703144e21 100644
--- a/packet-dhis.c
+++ b/packet-dhis.c
@@ -3,7 +3,7 @@
* see http://dhis.sourceforge.net/
* Olivier Abad <abad@daba.dhis.net>
*
- * $Id: packet-dhis.c,v 1.2 2000/02/23 22:41:15 oabad Exp $
+ * $Id: packet-dhis.c,v 1.3 2000/04/08 07:07:12 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -57,6 +57,9 @@ static int hf_dhis_status = -1;
static int ett_dhis = -1;
+#define UDP_PORT_DHIS1 58800
+#define UDP_PORT_DHIS2 58801
+
static const value_string vals_dhis_version[] = {
{ DHIS_VERSION_ERROR, "Protocol Error" },
{ DHIS_VERSION_4, "4" },
@@ -95,7 +98,7 @@ static const value_string vals_dhis_status[] = {
{ 0, NULL}
};
-void
+static void
dissect_dhis(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
@@ -228,3 +231,10 @@ proto_register_dhis(void)
proto_register_field_array(proto_dhis, hf_dhis, array_length(hf_dhis));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_dhis(void)
+{
+ dissector_add("udp.port", UDP_PORT_DHIS1, dissect_dhis);
+ dissector_add("udp.port", UDP_PORT_DHIS2, dissect_dhis);
+}
diff --git a/packet-dhis.h b/packet-dhis.h
index f96f7af84d..1b6e9d5e8c 100644
--- a/packet-dhis.h
+++ b/packet-dhis.h
@@ -3,7 +3,7 @@
* see http://dhis.sourceforge.net/
* Olivier Abad <abad@daba.dhis.net>
*
- * $Id: packet-dhis.h,v 1.2 2000/02/23 22:41:15 oabad Exp $
+ * $Id: packet-dhis.h,v 1.3 2000/04/08 07:07:13 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -49,5 +49,3 @@
#define DHIS_INVALID_PASSWORD 2
#define DHIS_INVALID_ACCOUNT 3
#define DHIS_INVALID_OPCODE 4
-
-void dissect_dhis(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-ftp.c b/packet-ftp.c
index 62a97d50d4..9e8497c62d 100644
--- a/packet-ftp.c
+++ b/packet-ftp.c
@@ -2,7 +2,7 @@
* Routines for ftp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-ftp.c,v 1.12 2000/03/12 04:47:37 gram Exp $
+ * $Id: packet-ftp.c,v 1.13 2000/04/08 07:07:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -54,7 +54,10 @@ static int hf_ftp_response_data = -1;
static gint ett_ftp = -1;
-void
+#define TCP_PORT_FTPDATA 20
+#define TCP_PORT_FTP 21
+
+static void
dissect_ftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *ftp_tree, *ti;
@@ -137,7 +140,7 @@ dissect_ftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
}
-void
+static void
dissect_ftpdata(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *ti;
@@ -195,3 +198,11 @@ proto_register_ftp(void)
proto_register_field_array(proto_ftp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_ftp(void)
+{
+ dissector_add("tcp.port", TCP_PORT_FTPDATA, &dissect_ftpdata);
+ dissector_add("tcp.port", TCP_PORT_FTP, &dissect_ftp);
+}
+
diff --git a/packet-ftp.h b/packet-ftp.h
deleted file mode 100644
index 98fce50a2a..0000000000
--- a/packet-ftp.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* packet-ftp.h
- *
- * $Id: packet-ftp.h,v 1.1 2000/02/15 21:02:10 gram 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_ftp(const u_char *, int, frame_data *, proto_tree *);
-void dissect_ftpdata(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-hsrp.c b/packet-hsrp.c
index f46069810d..3babf80907 100644
--- a/packet-hsrp.c
+++ b/packet-hsrp.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-hsrp.c,v 1.2 2000/01/07 22:05:31 guy Exp $
+ * $Id: packet-hsrp.c,v 1.3 2000/04/08 07:07:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -45,6 +45,8 @@
static gint proto_hsrp = -1;
static gint ett_hsrp = -1;
+#define UDP_PORT_HSRP 1985
+
struct hsrp_packet { /* Multicast to 224.0.0.2, TTL 1, UDP, port 1985 */
guint8 version; /* RFC2281 describes version 0 */
guint8 opcode;
@@ -85,7 +87,8 @@ static const value_string hsrp_state_vals[] = {
{HSRP_STATE_ACTIVE, "Active"}
};
-void dissect_hsrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
+static void
+dissect_hsrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
struct hsrp_packet hsrp;
gboolean short_packet = FALSE;
@@ -160,3 +163,9 @@ void proto_register_hsrp(void)
return;
}
+
+void
+proto_reg_handoff_hsrp(void)
+{
+ dissector_add("udp.port", UDP_PORT_HSRP, dissect_hsrp);
+}
diff --git a/packet-hsrp.h b/packet-hsrp.h
deleted file mode 100644
index 80367c6b89..0000000000
--- a/packet-hsrp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-hsrp.h
- *
- * $Id: packet-hsrp.h,v 1.1 2000/02/15 21:02:12 gram 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_hsrp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-http.c b/packet-http.c
index 0369af143b..085e6bb8b1 100644
--- a/packet-http.c
+++ b/packet-http.c
@@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-http.c,v 1.16 2000/02/23 20:55:33 guy Exp $
+ * $Id: packet-http.c,v 1.17 2000/04/08 07:07:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -54,6 +54,11 @@ static int hf_http_request = -1;
static gint ett_http = -1;
+#define TCP_PORT_HTTP 80
+#define TCP_PORT_PROXY_HTTP 3128
+#define TCP_PORT_PROXY_ADMIN_HTTP 3132
+#define TCP_ALT_PORT_HTTP 8080
+
static int is_http_request_or_reply(const u_char *data, int linelen, http_type_t *type);
void dissect_http(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
@@ -285,3 +290,12 @@ proto_register_http(void)
proto_register_field_array(proto_http, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_http(void)
+{
+ dissector_add("tcp.port", TCP_PORT_HTTP, dissect_http);
+ dissector_add("tcp.port", TCP_ALT_PORT_HTTP, dissect_http);
+ dissector_add("tcp.port", TCP_PORT_PROXY_HTTP, dissect_http);
+ dissector_add("tcp.port", TCP_PORT_PROXY_ADMIN_HTTP, dissect_http);
+}
diff --git a/packet-icp.c b/packet-icp.c
index c283bb7cd5..2562f502d5 100644
--- a/packet-icp.c
+++ b/packet-icp.c
@@ -2,7 +2,7 @@
* Routines for ICP (internet cache protocol) packet disassembly
* RFC 2186 && RFC 2187
*
- * $Id: packet-icp.c,v 1.5 2000/03/12 04:47:38 gram Exp $
+ * $Id: packet-icp.c,v 1.6 2000/04/08 07:07:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Peter Torvals
@@ -51,6 +51,8 @@ static int hf_icp_request_nr=-1;
static gint ett_icp = -1;
static gint ett_icp_payload = -1;
+#define UDP_PORT_ICP 3130
+
#define CODE_ICP_OP_QUERY 1
#define CODE_ICP_OP_INVALID 0
#define CODE_ICP_OP_HIT 2
@@ -100,7 +102,8 @@ typedef struct _e_icphdr
} e_icphdr;
static gchar textbuf[MAX_TEXTBUF_LENGTH];
-void dissect_icp_payload( const u_char *pd, int offset,
+
+static void dissect_icp_payload( const u_char *pd, int offset,
frame_data *fd,proto_tree *pload_tree, e_icphdr *icph)
{
/* To Be Done take care of fragmentation*/
@@ -169,7 +172,8 @@ guint16 objectlength;
}
}
-void dissect_icp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
+static void dissect_icp(const u_char *pd, int offset, frame_data *fd,
+ proto_tree *tree)
{
proto_tree *icp_tree , *payload_tree;
proto_item *ti , *payloadtf;
@@ -286,3 +290,9 @@ proto_register_icp(void)
proto_register_field_array(proto_icp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_icp(void)
+{
+ dissector_add("udp.port", UDP_PORT_ICP, dissect_icp);
+}
diff --git a/packet-icp.h b/packet-icp.h
deleted file mode 100644
index 8981506dbc..0000000000
--- a/packet-icp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-icp.h
- *
- * $Id: packet-icp.h,v 1.1 2000/02/15 21:02:14 gram 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_icp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-icq.c b/packet-icq.c
index ba18d302ce..f3ee9cea3d 100644
--- a/packet-icq.c
+++ b/packet-icq.c
@@ -1,7 +1,7 @@
/* packet-icq.c
* Routines for ICQ packet disassembly
*
- * $Id: packet-icq.c,v 1.13 2000/03/14 07:12:23 gram Exp $
+ * $Id: packet-icq.c,v 1.14 2000/04/08 07:07:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Johan Feyaerts
@@ -82,9 +82,11 @@ static gint ett_icq_decode = -1;
static gint ett_icq_body = -1;
static gint ett_icq_body_parts = -1;
+#define UDP_PORT_ICQ 4000
+
enum { ICQ5_client, ICQ5_server};
-void dissect_icqv5(const u_char *pd,
+static void dissect_icqv5(const u_char *pd,
int offset,
frame_data *fd,
proto_tree *tree);
@@ -2330,10 +2332,10 @@ dissect_icqv5Server(const u_char *pd,
}
}
-void dissect_icqv5(const u_char *pd,
- int offset,
- frame_data *fd,
- proto_tree *tree)
+static void dissect_icqv5(const u_char *pd,
+ int offset,
+ frame_data *fd,
+ proto_tree *tree)
{
guint32 unknown = pletohl(&pd[offset + ICQ5_UNKNOWN]);
@@ -2348,10 +2350,10 @@ void dissect_icqv5(const u_char *pd,
}
}
-void dissect_icq(const u_char *pd,
- int offset,
- frame_data *fd,
- proto_tree *tree)
+static void dissect_icq(const u_char *pd,
+ int offset,
+ frame_data *fd,
+ proto_tree *tree)
{
int version = 0;
@@ -2401,3 +2403,9 @@ proto_register_icq(void)
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_icq(void)
+{
+ dissector_add("udp.port", UDP_PORT_ICQ, dissect_icq);
+}
diff --git a/packet-icq.h b/packet-icq.h
deleted file mode 100644
index 9384689b16..0000000000
--- a/packet-icq.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-icq.h
- *
- * $Id: packet-icq.h,v 1.1 2000/02/15 21:02:14 gram 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_icq(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-imap.c b/packet-imap.c
index edc90ffab2..d7f1155f1b 100644
--- a/packet-imap.c
+++ b/packet-imap.c
@@ -2,7 +2,7 @@
* Routines for imap packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-imap.c,v 1.4 2000/01/07 22:05:31 guy Exp $
+ * $Id: packet-imap.c,v 1.5 2000/04/08 07:07:19 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -49,7 +49,9 @@ static int hf_imap_request = -1;
static gint ett_imap = -1;
-void
+#define TCP_PORT_IMAP 143
+
+static void
dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *imap_tree, *ti;
@@ -134,3 +136,9 @@ proto_register_imap(void)
proto_register_field_array(proto_imap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_imap(void)
+{
+ dissector_add("tcp.port", TCP_PORT_IMAP, dissect_imap);
+}
diff --git a/packet-imap.h b/packet-imap.h
deleted file mode 100644
index 6d9399369a..0000000000
--- a/packet-imap.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-imap.h
- *
- * $Id: packet-imap.h,v 1.1 2000/02/15 21:02:15 gram 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_imap(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-ipp.c b/packet-ipp.c
index 51e4eafcae..f59c7f3860 100644
--- a/packet-ipp.c
+++ b/packet-ipp.c
@@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-ipp.c,v 1.7 2000/03/07 06:28:47 guy Exp $
+ * $Id: packet-ipp.c,v 1.8 2000/04/08 07:07:20 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -40,6 +40,7 @@
#include <glib.h>
#include "packet.h"
+#include "packet-http.h"
static int proto_ipp = -1;
@@ -571,3 +572,18 @@ proto_register_ipp(void)
/* proto_register_field_array(proto_ipp, hf, array_length(hf));*/
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_ipp(void)
+{
+ /* XXX - should we just register ourselves as a dissector,
+ and call the HTTP dissector?
+
+ Should we pass to it a pointer to our dissector, so that
+ it knows to call us?
+
+ Or should the HTTP dissector decide that the payload is
+ IPP based on the MIME headers? */
+ dissector_add("tcp.port", 631, dissect_http);
+}
+
diff --git a/packet-ipx.c b/packet-ipx.c
index 3aea369975..0e6df2638a 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.51 2000/03/20 22:52:41 gram Exp $
+ * $Id: packet-ipx.c,v 1.52 2000/04/08 07:07:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -110,6 +110,8 @@ dissect_ipxmsg(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;
@@ -966,3 +968,9 @@ proto_register_ipx(void)
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_ipx(void)
+{
+ dissector_add("udp.port", UDP_PORT_IPX, dissect_ipx);
+}
diff --git a/packet-irc.c b/packet-irc.c
index 7b6a85406c..e0c0bc9b13 100644
--- a/packet-irc.c
+++ b/packet-irc.c
@@ -1,7 +1,7 @@
/* packet-irc.c
* Routines for MSX irc packet dissection
*
- * $Id: packet-irc.c,v 1.3 2000/01/07 22:05:31 guy Exp $
+ * $Id: packet-irc.c,v 1.4 2000/04/08 07:07:22 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -49,7 +49,11 @@ static int hf_irc_command = -1;
static gint ett_irc = -1;
-void dissect_irc_request(proto_tree *tree, char *line, int offset, int len)
+#define TCP_PORT_IRC 6667
+ /* good candidate for dynamic port specification */
+
+static void
+dissect_irc_request(proto_tree *tree, char *line, int offset, int len)
{
proto_tree_add_item_hidden(tree, hf_irc_request,
offset, len, TRUE);
@@ -57,7 +61,8 @@ void dissect_irc_request(proto_tree *tree, char *line, int offset, int len)
len, "Request Line: %s", line);
}
-void dissect_irc_response(proto_tree *tree, char *line, int offset, int len)
+static void
+dissect_irc_response(proto_tree *tree, char *line, int offset, int len)
{
proto_tree_add_item_hidden(tree, hf_irc_response,
offset, len, TRUE);
@@ -65,7 +70,7 @@ void dissect_irc_response(proto_tree *tree, char *line, int offset, int len)
len, "Response Line: %s", line);
}
-void
+static void
dissect_irc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *irc_tree, *ti;
@@ -156,3 +161,10 @@ proto_register_irc(void)
proto_register_field_array(proto_irc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_irc(void)
+{
+ dissector_add("tcp.port", TCP_PORT_IRC, dissect_irc);
+}
+
diff --git a/packet-irc.h b/packet-irc.h
deleted file mode 100644
index 1b1dd89aa7..0000000000
--- a/packet-irc.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-irc.h
- *
- * $Id: packet-irc.h,v 1.1 2000/02/15 21:02:26 gram 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_irc(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-isakmp.c b/packet-isakmp.c
index 52b46d6da3..177d558200 100644
--- a/packet-isakmp.c
+++ b/packet-isakmp.c
@@ -2,7 +2,7 @@
* Routines for the Internet Security Association and Key Management Protocol (ISAKMP)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-isakmp.c,v 1.12 2000/01/07 22:05:31 guy Exp $
+ * $Id: packet-isakmp.c,v 1.13 2000/04/08 07:07:22 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -56,6 +56,8 @@ static gint ett_isakmp = -1;
static gint ett_isakmp_flags = -1;
static gint ett_isakmp_payload = -1;
+#define UDP_PORT_ISAKMP 500
+
#define NUM_PROTO_TYPES 5
#define proto2str(t) \
((t < NUM_PROTO_TYPES) ? prototypestr[t] : "UNKNOWN-PROTO-TYPE")
@@ -333,7 +335,8 @@ static struct strfunc {
{"Vendor ID", dissect_vid }
};
-void dissect_isakmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
+static void
+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;
@@ -1279,3 +1282,9 @@ proto_register_isakmp(void)
/* proto_register_field_array(proto_isakmp, hf, array_length(hf));*/
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_isakmp(void)
+{
+ dissector_add("udp.port", UDP_PORT_ISAKMP, dissect_isakmp);
+}
diff --git a/packet-isakmp.h b/packet-isakmp.h
deleted file mode 100644
index f03b8ad7fc..0000000000
--- a/packet-isakmp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-isakmp.h
- *
- * $Id: packet-isakmp.h,v 1.1 2000/02/15 21:02:27 gram 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_isakmp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-l2tp.c b/packet-l2tp.c
index 0969ec003c..2bf2f5636a 100644
--- a/packet-l2tp.c
+++ b/packet-l2tp.c
@@ -7,7 +7,7 @@
* Laurent Cazalet <laurent.cazalet@mailclub.net>
* Thomas Parvais <thomas.parvais@advalvas.be>
*
- * $Id: packet-l2tp.c,v 1.7 2000/04/05 15:57:04 gram Exp $
+ * $Id: packet-l2tp.c,v 1.8 2000/04/08 07:07:24 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -55,7 +55,7 @@ static int hf_l2tp_id =-1;
#include "packet.h"
#include "resolv.h"
-
+#define UDP_PORT_L2TP 1701
#define CONTROL_BIT(msg_info) (msg_info & 0x8000) /* Type bit control = 1 data = 0 */
#define LENGTH_BIT(msg_info) (msg_info & 0x4000) /* Length bit = 1 */
@@ -234,7 +234,9 @@ static const char *avptypestr[NUM_AVP_TYPES] = {
static gchar textbuffer[200];
-void dissect_l2tp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
+
+static void
+dissect_l2tp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *l2tp_tree, *l2tp_avp_tree;
proto_item *ti, *tf;
@@ -695,3 +697,9 @@ proto_register_l2tp(void)
proto_register_field_array(proto_l2tp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_l2tp(void)
+{
+ dissector_add("udp.port", UDP_PORT_L2TP, dissect_l2tp);
+}
diff --git a/packet-l2tp.h b/packet-l2tp.h
deleted file mode 100644
index 86997fded4..0000000000
--- a/packet-l2tp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-l2tp.h
- *
- * $Id: packet-l2tp.h,v 1.1 2000/02/15 21:02:29 gram 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_l2tp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-ldap.c b/packet-ldap.c
index 46037e7717..b00a373ba1 100644
--- a/packet-ldap.c
+++ b/packet-ldap.c
@@ -1,7 +1,7 @@
/* packet-ldap.c
* Routines for ldap packet dissection
*
- * $Id: packet-ldap.c,v 1.8 2000/04/06 03:59:28 guy Exp $
+ * $Id: packet-ldap.c,v 1.9 2000/04/08 07:07:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -114,6 +114,8 @@ static gint ett_ldap_message = -1;
static gint ett_ldap_referrals = -1;
static gint ett_ldap_attribute = -1;
+#define TCP_PORT_LDAP 389
+
static value_string msgTypes [] = {
{LDAP_REQ_BIND, "Bind Request"},
{LDAP_REQ_UNBIND, "Unbind Request"},
@@ -703,7 +705,7 @@ static int dissect_ldap_request_abandon(ASN1_SCK *a, proto_tree *tree,
return 0;
}
-void
+static void
dissect_ldap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *ldap_tree = 0, *ti, *msg_tree;
@@ -1036,3 +1038,10 @@ proto_register_ldap(void)
proto_register_field_array(proto_ldap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_ldap(void)
+{
+ dissector_add("tcp.port", TCP_PORT_LDAP, dissect_ldap);
+}
+
diff --git a/packet-ldap.h b/packet-ldap.h
index a7a9ce8cad..b389b32ca4 100644
--- a/packet-ldap.h
+++ b/packet-ldap.h
@@ -1,6 +1,6 @@
/* packet-ldap.h
*
- * $Id: packet-ldap.h,v 1.3 2000/03/29 09:25:21 guy Exp $
+ * $Id: packet-ldap.h,v 1.4 2000/04/08 07:07:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -72,5 +72,3 @@
#define LDAP_MOD_ADD 0
#define LDAP_MOD_DELETE 1
#define LDAP_MOD_REPLACE 2
-
-void dissect_ldap(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-lpd.c b/packet-lpd.c
index 945ed3583f..c52ba11509 100644
--- a/packet-lpd.c
+++ b/packet-lpd.c
@@ -2,7 +2,7 @@
* Routines for LPR and LPRng packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
- * $Id: packet-lpd.c,v 1.16 2000/01/22 06:22:14 guy Exp $
+ * $Id: packet-lpd.c,v 1.17 2000/04/08 07:07:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -37,6 +37,8 @@
#include <glib.h>
#include "packet.h"
+#define TCP_PORT_PRINTER 515
+
static int proto_lpd = -1;
static int hf_lpd_response = -1;
static int hf_lpd_request = -1;
@@ -47,7 +49,7 @@ enum lpr_type { request, response, unknown };
static char* find_printer_string(const u_char *pd, int offset, int frame_length);
-void
+static void
dissect_lpd(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *lpd_tree;
@@ -195,3 +197,8 @@ proto_register_lpd(void)
proto_register_subtree_array(ett, array_length(ett));
}
+void
+proto_reg_handoff_lpd(void)
+{
+ dissector_add("tcp.port", TCP_PORT_PRINTER, &dissect_lpd);
+}
diff --git a/packet-lpd.h b/packet-lpd.h
deleted file mode 100644
index 57a4fd58ba..0000000000
--- a/packet-lpd.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-lpd.h
- *
- * $Id: packet-lpd.h,v 1.1 2000/02/15 21:02:34 gram 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_lpd(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-mapi.c b/packet-mapi.c
index 6912c20f75..bde5bb8dcc 100644
--- a/packet-mapi.c
+++ b/packet-mapi.c
@@ -1,7 +1,7 @@
/* packet-mapi.c
* Routines for MSX mapi packet dissection
*
- * $Id: packet-mapi.c,v 1.4 2000/01/07 22:05:32 guy Exp $
+ * $Id: packet-mapi.c,v 1.5 2000/04/08 07:07:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -48,13 +48,15 @@ static int hf_mapi_response = -1;
static gint ett_mapi = -1;
-void
+#define TCP_PORT_MAPI 1065
+
+static void
dissect_mapi(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *mapi_tree, *ti;
if (check_col(fd, COL_PROTOCOL))
- col_add_str(fd, COL_PROTOCOL, "MAPI");
+ col_add_str(fd, COL_PROTOCOL, "MAPI");
if (check_col(fd, COL_INFO))
{
@@ -106,3 +108,9 @@ proto_register_mapi(void)
proto_register_field_array(proto_mapi, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_mapi(void)
+{
+ dissector_add("tcp.port", TCP_PORT_MAPI, dissect_mapi);
+}
diff --git a/packet-mapi.h b/packet-mapi.h
deleted file mode 100644
index 935a7e60f2..0000000000
--- a/packet-mapi.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-mapi.h
- *
- * $Id: packet-mapi.h,v 1.1 2000/02/15 21:02:34 gram 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_mapi(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-nbns.c b/packet-nbns.c
index c9ad53dc5f..d1afb8ab5e 100644
--- a/packet-nbns.c
+++ b/packet-nbns.c
@@ -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.38 2000/03/12 04:47:42 gram Exp $
+ * $Id: packet-nbns.c,v 1.39 2000/04/08 07:07:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -79,6 +79,10 @@ static int hf_nbss_flags = -1;
static gint ett_nbss = -1;
static gint ett_nbss_flags = -1;
+#define UDP_PORT_NBNS 137
+#define UDP_PORT_NBDGM 138
+#define TCP_PORT_NBSS 139
+
/* Packet structure taken from RFC 1002. See also RFC 1001.
* Opcode, flags, and rcode treated as "flags", similarly to DNS,
* to make it easier to lift the dissection code from "packet-dns.c". */
@@ -1110,7 +1114,7 @@ dissect_answer_records(const u_char *pd, int cur_off, int nbns_data_offset,
return cur_off - start_off;
}
-void
+static void
dissect_nbns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
int nbns_data_offset;
@@ -1238,7 +1242,7 @@ struct nbdgm_header {
guint8 error_code;
};
-void
+static void
dissect_nbdgm(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *nbdgm_tree = NULL;
@@ -1543,7 +1547,7 @@ dissect_nbss_packet(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
return length + 4;
}
-void
+static void
dissect_nbss(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
guint8 msg_type;
@@ -1705,3 +1709,11 @@ proto_register_nbt(void)
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_nbt(void)
+{
+ dissector_add("udp.port", UDP_PORT_NBNS, dissect_nbns);
+ dissector_add("udp.port", UDP_PORT_NBDGM, dissect_nbdgm);
+ dissector_add("tcp.port", TCP_PORT_NBSS, dissect_nbss);
+}
diff --git a/packet-nbns.h b/packet-nbns.h
deleted file mode 100644
index 4cd78f575f..0000000000
--- a/packet-nbns.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* packet-nbns.h
- *
- * $Id: packet-nbns.h,v 1.1 2000/02/15 21:02:39 gram 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_nbdgm(const u_char *, int, frame_data *, proto_tree *);
-void dissect_nbns(const u_char *, int, frame_data *, proto_tree *);
-void dissect_nbss(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-ncp.c b/packet-ncp.c
index b26d0aff45..907e7854e7 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.31 2000/03/12 04:47:43 gram Exp $
+ * $Id: packet-ncp.c,v 1.32 2000/04/08 07:07:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -56,6 +56,8 @@ static gint ett_ncp = -1;
static gint ett_ncp_request_fields = -1;
static gint ett_ncp_reply_fields = -1;
+#define TCP_PORT_NCP 524
+
struct svc_record;
static void
@@ -1034,3 +1036,9 @@ proto_register_ncp(void)
proto_register_subtree_array(ett, array_length(ett));
register_init_routine(&ncp_init_protocol);
}
+
+void
+proto_reg_handoff_ncp(void)
+{
+ dissector_add("tcp.port", TCP_PORT_NCP, dissect_ncp);
+}
diff --git a/packet-nntp.c b/packet-nntp.c
index 9a1ae87906..12db6e789a 100644
--- a/packet-nntp.c
+++ b/packet-nntp.c
@@ -2,7 +2,7 @@
* Routines for nntp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-nntp.c,v 1.7 2000/01/07 22:05:34 guy Exp $
+ * $Id: packet-nntp.c,v 1.8 2000/04/08 07:07:31 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -47,7 +47,9 @@ static int hf_nntp_request = -1;
static gint ett_nntp = -1;
-void
+#define TCP_PORT_NNTP 119
+
+static void
dissect_nntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
gchar *type;
@@ -141,3 +143,9 @@ proto_register_nntp(void)
proto_register_field_array(proto_nntp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_nntp(void)
+{
+ dissector_add("tcp.port", TCP_PORT_NNTP, dissect_nntp);
+}
diff --git a/packet-nntp.h b/packet-nntp.h
deleted file mode 100644
index 4326e5f931..0000000000
--- a/packet-nntp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-nntp.h
- *
- * $Id: packet-nntp.h,v 1.1 2000/02/15 21:02:43 gram 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_nntp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-ntp.c b/packet-ntp.c
index 9865987449..463d2a6a9c 100644
--- a/packet-ntp.c
+++ b/packet-ntp.c
@@ -2,7 +2,7 @@
* Routines for NTP packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
- * $Id: packet-ntp.c,v 1.10 2000/03/12 04:47:44 gram Exp $
+ * $Id: packet-ntp.c,v 1.11 2000/04/08 07:07:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -97,6 +97,9 @@
* first 32 bits and the fraction part in the last 32 bits.
*/
+#define UDP_PORT_NTP 123
+#define TCP_PORT_NTP 123
+
/* Leap indicator, 2bit field is used to warn of a inserted/deleted
* second, or to alarm loosed synchronization.
*/
@@ -199,7 +202,7 @@ static gint ett_ntp_flags = -1;
* buff - string buffer for result (OUT)
* returns pointer to filled buffer.
*/
-char *
+static char *
ntp_fmt_ts(unsigned char * reftime, char* buff)
{
guint32 tempstmp, tempfrac;
@@ -229,7 +232,7 @@ ntp_fmt_ts(unsigned char * reftime, char* buff)
* fd - frame data
* proto_tree - resolved protocol tree
*/
-void
+static void
dissect_ntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *ntp_tree, *flags_tree;
@@ -434,3 +437,10 @@ proto_register_ntp(void)
proto_register_field_array(proto_ntp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_ntp(void)
+{
+ dissector_add("udp.port", UDP_PORT_NTP, dissect_ntp);
+ dissector_add("tcp.port", TCP_PORT_NTP, dissect_ntp);
+}
diff --git a/packet-ntp.h b/packet-ntp.h
index 7dedb55e7f..0e96969d24 100644
--- a/packet-ntp.h
+++ b/packet-ntp.h
@@ -1,7 +1,7 @@
/* packet-ntp.h
* Definitions for packet disassembly structures and routines
*
- * $Id: packet-ntp.h,v 1.3 2000/02/15 21:02:43 gram Exp $
+ * $Id: packet-ntp.h,v 1.4 2000/04/08 07:07:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -29,8 +29,6 @@
#ifndef PACKET_NTP_H
#define PACKET_NTP_H
-void dissect_ntp(const u_char *, int, frame_data *, proto_tree *);
-
#define NTP_LI_MASK 192
#define NTP_LI_NONE 0
#define NTP_LI_61 64
diff --git a/packet-pop.c b/packet-pop.c
index dcfce121eb..909085bc23 100644
--- a/packet-pop.c
+++ b/packet-pop.c
@@ -2,7 +2,7 @@
* Routines for pop packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-pop.c,v 1.12 2000/01/07 22:05:35 guy Exp $
+ * $Id: packet-pop.c,v 1.13 2000/04/08 07:07:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -49,9 +49,11 @@ static int hf_pop_request = -1;
static gint ett_pop = -1;
+#define TCP_PORT_POP 110
+
static gboolean is_continuation(const u_char *data);
-void
+static void
dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *pop_tree, *ti;
@@ -126,6 +128,17 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
}
+static gboolean is_continuation(const u_char *data)
+{
+ if (strncmp(data, "+OK", strlen("+OK")) == 0)
+ return FALSE;
+
+ if (strncmp(data, "-ERR", strlen("-ERR")) == 0)
+ return FALSE;
+
+ return TRUE;
+}
+
void
proto_register_pop(void)
{
@@ -150,13 +163,8 @@ proto_register_pop(void)
proto_register_subtree_array(ett, array_length(ett));
}
-static gboolean is_continuation(const u_char *data)
+void
+proto_reg_handoff_pop(void)
{
- if (strncmp(data, "+OK", strlen("+OK")) == 0)
- return FALSE;
-
- if (strncmp(data, "-ERR", strlen("-ERR")) == 0)
- return FALSE;
-
- return TRUE;
+ dissector_add("tcp.port", TCP_PORT_POP, dissect_pop);
}
diff --git a/packet-pop.h b/packet-pop.h
deleted file mode 100644
index e3a391b227..0000000000
--- a/packet-pop.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-pop.h
- *
- * $Id: packet-pop.h,v 1.1 2000/02/15 21:02:51 gram 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_pop(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-pptp.c b/packet-pptp.c
index 068e731686..b6b9319b2d 100644
--- a/packet-pptp.c
+++ b/packet-pptp.c
@@ -2,7 +2,7 @@
* Routines for the Point-to-Point Tunnelling Protocol (PPTP) (RFC 2637)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
- * $Id: packet-pptp.c,v 1.8 2000/01/20 07:31:29 guy Exp $
+ * $Id: packet-pptp.c,v 1.9 2000/04/08 07:07:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -43,6 +43,8 @@
static gint ett_pptp = -1;
+#define TCP_PORT_PPTP 1723
+
#define NUM_MSG_TYPES 3
#define msgtype2str(t) \
((t < NUM_MSG_TYPES) ? msgtypestr[t] : "UNKNOWN-MESSAGES-TYPE")
@@ -376,7 +378,7 @@ struct set_link
guint32 recv_acm;
};
-void
+static void
dissect_pptp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
struct pptp_hdr * hdr = (struct pptp_hdr *)(pd + offset);
@@ -897,3 +899,9 @@ proto_register_pptp(void)
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_pptp(void)
+{
+ dissector_add("tcp.port", TCP_PORT_PPTP, dissect_pptp);
+}
diff --git a/packet-pptp.h b/packet-pptp.h
deleted file mode 100644
index e29e4bc519..0000000000
--- a/packet-pptp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-pptp.h
- *
- * $Id: packet-pptp.h,v 1.1 2000/02/15 21:02:55 gram 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_pptp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-radius.c b/packet-radius.c
index 485cc3a9f5..ef5b0a7bea 100644
--- a/packet-radius.c
+++ b/packet-radius.c
@@ -1,7 +1,7 @@
/* packet-radius.c
* Routines for RADIUS packet disassembly
*
- * $Id: packet-radius.c,v 1.10 2000/04/05 16:01:39 gram Exp $
+ * $Id: packet-radius.c,v 1.11 2000/04/08 07:07:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Johan Feyaerts
@@ -48,6 +48,11 @@ static int hf_radius_id =-1;
static gint ett_radius = -1;
static gint ett_radius_avp = -1;
+#define UDP_PORT_RADIUS 1645
+#define UDP_PORT_RADIUS_NEW 1812
+#define UDP_PORT_RADACCT 1646
+#define UDP_PORT_RADACCT_NEW 1813
+
typedef struct _e_radiushdr {
guint8 rh_code;
guint8 rh_ident;
@@ -661,7 +666,7 @@ void dissect_attribute_value_pairs(const u_char *pd, int offset, frame_data
}
}
-void dissect_radius(const u_char *pd, int offset, frame_data *fd,
+static void dissect_radius(const u_char *pd, int offset, frame_data *fd,
proto_tree
*tree)
{
@@ -763,3 +768,12 @@ proto_register_radius(void)
proto_register_field_array(proto_radius, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_radius(void)
+{
+ dissector_add("udp.port", UDP_PORT_RADIUS, dissect_radius);
+ dissector_add("udp.port", UDP_PORT_RADIUS_NEW, dissect_radius);
+ dissector_add("udp.port", UDP_PORT_RADACCT, dissect_radius);
+ dissector_add("udp.port", UDP_PORT_RADACCT_NEW, dissect_radius);
+}
diff --git a/packet-radius.h b/packet-radius.h
deleted file mode 100644
index 5eebb6466c..0000000000
--- a/packet-radius.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-radius.h
- *
- * $Id: packet-radius.h,v 1.1 2000/02/15 21:02:57 gram 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_radius(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-ripng.c b/packet-ripng.c
index e6243c81ba..8ea96c4c14 100644
--- a/packet-ripng.c
+++ b/packet-ripng.c
@@ -3,7 +3,7 @@
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
* derived from packet-rip.c
*
- * $Id: packet-ripng.c,v 1.8 2000/03/12 04:47:48 gram Exp $
+ * $Id: packet-ripng.c,v 1.9 2000/04/08 07:07:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -51,7 +51,9 @@ static int hf_ripng_version = -1;
static gint ett_ripng = -1;
static gint ett_ripng_addr = -1;
-void
+#define UDP_PORT_RIPNG 521
+
+static void
dissect_ripng(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
struct rip6 rip6;
struct netinfo6 ni6;
@@ -145,3 +147,9 @@ proto_register_ripng(void)
proto_register_field_array(proto_ripng, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_ripng(void)
+{
+ dissector_add("udp.port", UDP_PORT_RIPNG, dissect_ripng);
+}
diff --git a/packet-ripng.h b/packet-ripng.h
index 9c2ce4144e..642016ad2c 100644
--- a/packet-ripng.h
+++ b/packet-ripng.h
@@ -2,7 +2,7 @@
* RIPng definition
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id: packet-ripng.h,v 1.2 2000/02/15 21:02:59 gram Exp $
+ * $Id: packet-ripng.h,v 1.3 2000/04/08 07:07:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -35,8 +35,6 @@
#include "packet-ipv6.h"
#endif
-void dissect_ripng(const u_char *, int, frame_data *, proto_tree *);
-
/*
* KAME Header: /cvsroot/kame/kame/kame/kame/route6d/route6d.h,v 1.1.1.1 1999/08/08 23:31:35 itojun Exp
*/
diff --git a/packet-rtsp.c b/packet-rtsp.c
index 912910b15a..fdbb079d9f 100644
--- a/packet-rtsp.c
+++ b/packet-rtsp.c
@@ -4,7 +4,7 @@
* Jason Lango <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-rtsp.c,v 1.8 2000/02/15 21:03:04 gram Exp $
+ * $Id: packet-rtsp.c,v 1.9 2000/04/08 07:07:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -48,6 +48,8 @@ static int hf_rtsp_method = -1;
static int hf_rtsp_url = -1;
static int hf_rtsp_status = -1;
+#define TCP_PORT_RTSP 554
+
static int process_rtsp_request_or_reply(const u_char *data, int offset,
int linelen, proto_tree *tree);
@@ -80,7 +82,7 @@ is_content_sdp(const u_char *line, int linelen)
return 1;
}
-void dissect_rtsp(const u_char *pd, int offset, frame_data *fd,
+static void dissect_rtsp(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
proto_tree *rtsp_tree;
@@ -324,3 +326,9 @@ proto_register_rtsp(void)
proto_register_field_array(proto_rtsp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_rtsp(void)
+{
+ dissector_add("tcp.port", TCP_PORT_RTSP, dissect_rtsp);
+}
diff --git a/packet-rtsp.h b/packet-rtsp.h
deleted file mode 100644
index 100603c3dc..0000000000
--- a/packet-rtsp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-rtsp.h
- *
- * $Id: packet-rtsp.h,v 1.1 2000/02/15 21:03:05 gram 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_rtsp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-sap.c b/packet-sap.c
index 76788a3952..adfd4c163f 100644
--- a/packet-sap.c
+++ b/packet-sap.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-sap.c,v 1.5 2000/02/15 21:03:07 gram Exp $
+ * $Id: packet-sap.c,v 1.6 2000/04/08 07:07:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -45,6 +45,8 @@
#include "packet-ipv6.h"
#include "packet-sdp.h"
+#define UDP_PORT_SAP 9875
+
#define MCAST_SAP_VERSION_MASK 0xE0 /* 3 bits for SAP version*/
#define MCAST_SAP_VERSION_SHIFT 5 /* Right shift 5 bits to get the version */
#define MCAST_SAP_VER0 0 /* Version 0 */
@@ -124,7 +126,8 @@ static gint ett_sap_flags = -1;
static gint ett_sap_auth = -1;
static gint ett_sap_authf = -1;
-void dissect_sap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
+static void
+dissect_sap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
int sap_version, is_ipv6, is_del, is_enc, is_comp, addr_len;
guint8 auth_len;
@@ -316,3 +319,9 @@ void proto_register_sap(void)
proto_register_field_array(proto_sap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_sap(void)
+{
+ dissector_add("udp.port", UDP_PORT_SAP, dissect_sap);
+}
diff --git a/packet-sap.h b/packet-sap.h
deleted file mode 100644
index b47846de7d..0000000000
--- a/packet-sap.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-sap.h
- *
- * $Id: packet-sap.h,v 1.1 2000/02/15 21:03:08 gram 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_sap(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-snmp.c b/packet-snmp.c
index dd51b9b0c2..c816e3426b 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.26 2000/03/15 07:12:55 guy Exp $
+ * $Id: packet-snmp.c,v 1.27 2000/04/08 07:07:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -190,6 +190,9 @@ static int proto_snmp = -1;
static gint ett_snmp = -1;
+#define UDP_PORT_SNMP 161
+#define UDP_PORT_SNMP_TRAP 162
+
/* Protocol version numbers */
#define SNMP_VERSION_1 0
#define SNMP_VERSION_2c 1
@@ -1176,3 +1179,10 @@ proto_register_snmp(void)
/* proto_register_field_array(proto_snmp, hf, array_length(hf));*/
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_snmp(void)
+{
+ dissector_add("udp.port", UDP_PORT_SNMP, dissect_snmp);
+ dissector_add("udp.port", UDP_PORT_SNMP_TRAP, dissect_snmp);
+}
diff --git a/packet-srvloc.c b/packet-srvloc.c
index a88bdb3a18..dea077c72e 100644
--- a/packet-srvloc.c
+++ b/packet-srvloc.c
@@ -6,7 +6,7 @@
* In particular I have not had an opportunity to see how it
* responds to SRVLOC over TCP.
*
- * $Id: packet-srvloc.c,v 1.6 2000/01/22 02:00:24 guy Exp $
+ * $Id: packet-srvloc.c,v 1.7 2000/04/08 07:07:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -59,14 +59,17 @@
#include "packet.h"
#include "packet-ipv6.h"
-int proto_srvloc = -1;
-int hf_srvloc_version = -1;
-int hf_srvloc_function = -1;
-int hf_srvloc_flags = -1;
-int hf_srvloc_error = -1;
+static int proto_srvloc = -1;
+static int hf_srvloc_version = -1;
+static int hf_srvloc_function = -1;
+static int hf_srvloc_flags = -1;
+static int hf_srvloc_error = -1;
static gint ett_srvloc = -1;
-gint ett_srvloc_flags = -1;
+static gint ett_srvloc_flags = -1;
+
+#define TCP_PORT_SRVLOC 427
+#define UDP_PORT_SRVLOC 427
/* Define function types */
@@ -173,7 +176,7 @@ dissect_authblk(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
/* Packet dissection routine called by tcp & udp when port 427 detected */
-void
+static void
dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_item *ti, *tf;
@@ -430,3 +433,11 @@ proto_register_srvloc(void)
proto_register_field_array(proto_srvloc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
};
+
+void
+proto_reg_handoff_srvloc(void)
+{
+ dissector_add("tcp.port", TCP_PORT_SRVLOC, dissect_srvloc);
+ dissector_add("udp.port", UDP_PORT_SRVLOC, dissect_srvloc);
+}
+
diff --git a/packet-srvloc.h b/packet-srvloc.h
deleted file mode 100644
index 86ab043284..0000000000
--- a/packet-srvloc.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-srvloc.h
- *
- * $Id: packet-srvloc.h,v 1.1 2000/02/15 21:03:11 gram 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_srvloc(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-tacacs.c b/packet-tacacs.c
index 74ce291fdd..ec5dad5527 100644
--- a/packet-tacacs.c
+++ b/packet-tacacs.c
@@ -1,7 +1,7 @@
/* packet-tacacs.c
* Routines for cisco tacacs/tacplus/AAA packet dissection
*
- * $Id: packet-tacacs.c,v 1.2 2000/01/07 22:05:41 guy Exp $
+ * $Id: packet-tacacs.c,v 1.3 2000/04/08 07:07:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -49,13 +49,16 @@ static int hf_tacacs_version = -1;
static gint ett_tacacs = -1;
-void
+#define UDP_PORT_TACACS 49
+#define TCP_PORT_TACACS 49
+
+static void
dissect_tacacs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *tacacs_tree, *ti;
if (check_col(fd, COL_PROTOCOL))
- col_add_str(fd, COL_PROTOCOL, "TACACS");
+ col_add_str(fd, COL_PROTOCOL, "TACACS");
if (check_col(fd, COL_INFO))
{
@@ -87,7 +90,7 @@ dissect_tacacs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
}
-void
+static void
dissect_tacplus(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *tacacs_tree, *ti;
@@ -150,3 +153,10 @@ proto_register_tacacs(void)
proto_register_field_array(proto_tacacs, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_tacacs(void)
+{
+ dissector_add("udp.port", UDP_PORT_TACACS, dissect_tacacs);
+ dissector_add("tcp.port", TCP_PORT_TACACS, dissect_tacplus);
+}
diff --git a/packet-tacacs.h b/packet-tacacs.h
deleted file mode 100644
index be017a07f9..0000000000
--- a/packet-tacacs.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* packet-tacacs.h
- *
- * $Id: packet-tacacs.h,v 1.1 2000/02/15 21:03:14 gram 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_tacacs(const u_char *, int, frame_data *, proto_tree *);
-void dissect_tacplus(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-tcp.c b/packet-tcp.c
index 03b9f3f049..b144c3575a 100644
--- a/packet-tcp.c
+++ b/packet-tcp.c
@@ -1,7 +1,7 @@
/* packet-tcp.c
* Routines for TCP packet disassembly
*
- * $Id: packet-tcp.c,v 1.65 2000/04/08 03:32:10 guy Exp $
+ * $Id: packet-tcp.c,v 1.66 2000/04/08 07:07:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -52,28 +52,9 @@
#include "plugins.h"
-#include "packet-bgp.h"
#include "packet-ip.h"
-#include "packet-ftp.h"
#include "packet-giop.h"
-#include "packet-http.h"
-#include "packet-imap.h"
-#include "packet-irc.h"
-#include "packet-ldap.h"
-#include "packet-lpd.h"
-#include "packet-mapi.h"
-#include "packet-nbns.h"
-#include "packet-ncp.h"
-#include "packet-nntp.h"
-#include "packet-ntp.h"
-#include "packet-pop.h"
-#include "packet-pptp.h"
#include "packet-rpc.h"
-#include "packet-rtsp.h"
-#include "packet-srvloc.h"
-#include "packet-tacacs.h"
-#include "packet-telnet.h"
-#include "packet-tns.h"
#include "packet-yhoo.h"
extern FILE* data_out_file;
@@ -110,32 +91,8 @@ static dissector_table_t subdissector_table;
/* TCP Ports */
-#define TCP_PORT_FTPDATA 20
-#define TCP_PORT_FTP 21
-#define TCP_PORT_TELNET 23
#define TCP_PORT_SMTP 25
-#define TCP_PORT_HTTP 80
-#define TCP_PORT_TACACS 49
-#define TCP_PORT_POP 110
-#define TCP_PORT_NNTP 119
-#define TCP_PORT_NTP 123
-#define TCP_PORT_NBSS 139
-#define TCP_PORT_IMAP 143
-#define TCP_PORT_BGP 179
-#define TCP_PORT_LDAP 389
-#define TCP_PORT_SRVLOC 427
-#define TCP_PORT_PRINTER 515
-#define TCP_PORT_NCP 524
-#define TCP_PORT_RTSP 554
-#define TCP_PORT_MAPI 1065
-#define TCP_PORT_TNS 1521
-#define TCP_PORT_PPTP 1723
-#define TCP_PORT_PROXY_HTTP 3128
-#define TCP_PORT_PROXY_ADMIN_HTTP 3132
#define TCP_PORT_YHOO 5050
-#define TCP_ALT_PORT_HTTP 8080
-#define TCP_PORT_IRC 6667
- /* good candidate for dynamic port specification */
/* TCP structs and definitions */
@@ -661,30 +618,4 @@ proto_register_tcp(void)
/* subdissector code */
subdissector_table = register_dissector_table(hf_tcp_port);
-
- dissector_add( "tcp.port", TCP_PORT_PRINTER, &dissect_lpd);
- dissector_add( "tcp.port", TCP_PORT_TELNET, &dissect_telnet);
- dissector_add( "tcp.port", TCP_PORT_FTPDATA, &dissect_ftpdata);
- dissector_add( "tcp.port", TCP_PORT_FTP, &dissect_ftp);
- dissector_add( "tcp.port", TCP_PORT_POP, &dissect_pop);
- dissector_add( "tcp.port", TCP_PORT_IMAP, &dissect_imap);
- dissector_add( "tcp.port", TCP_PORT_NNTP, &dissect_nntp);
- dissector_add( "tcp.port", TCP_PORT_NTP, &dissect_ntp);
- dissector_add( "tcp.port", TCP_PORT_PPTP, &dissect_pptp);
- dissector_add( "tcp.port", TCP_PORT_PPTP, &dissect_pptp);
- dissector_add( "tcp.port", TCP_PORT_HTTP, &dissect_http);
- dissector_add( "tcp.port", TCP_ALT_PORT_HTTP, &dissect_http);
- dissector_add( "tcp.port", 631, &dissect_http); /* IPP */
- dissector_add( "tcp.port", TCP_PORT_PROXY_HTTP, &dissect_http);
- dissector_add( "tcp.port", TCP_PORT_PROXY_ADMIN_HTTP, &dissect_http);
- dissector_add( "tcp.port", TCP_PORT_NBSS, &dissect_nbss);
- dissector_add( "tcp.port", TCP_PORT_RTSP, &dissect_rtsp);
- dissector_add( "tcp.port", TCP_PORT_BGP, &dissect_bgp);
- dissector_add( "tcp.port", TCP_PORT_TACACS, &dissect_tacplus);
- dissector_add( "tcp.port", TCP_PORT_MAPI, &dissect_mapi);
- dissector_add( "tcp.port", TCP_PORT_TNS, &dissect_tns);
- dissector_add( "tcp.port", TCP_PORT_IRC, &dissect_irc);
- dissector_add( "tcp.port", TCP_PORT_LDAP, &dissect_ldap);
- dissector_add( "tcp.port", TCP_PORT_SRVLOC, &dissect_srvloc);
- dissector_add( "tcp.port", TCP_PORT_NCP, &dissect_ncp);
}
diff --git a/packet-telnet.c b/packet-telnet.c
index 06b9ce6984..078c5565ac 100644
--- a/packet-telnet.c
+++ b/packet-telnet.c
@@ -2,7 +2,7 @@
* Routines for telnet packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-telnet.c,v 1.10 2000/03/23 10:49:33 guy Exp $
+ * $Id: packet-telnet.c,v 1.11 2000/04/08 07:07:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -50,6 +50,8 @@ static gint ett_telnet_subopt = -1;
/* Some defines for Telnet */
+#define TCP_PORT_TELNET 23
+
#define TN_IAC 255
#define TN_DONT 254
#define TN_DO 253
@@ -290,7 +292,7 @@ telnet_command(proto_tree *telnet_tree, const u_char *pd, int start_offset)
return offset;
}
-void
+static void
dissect_telnet(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *telnet_tree, *ti;
@@ -367,3 +369,9 @@ proto_register_telnet(void)
/* proto_register_field_array(proto_telnet, hf, array_length(hf));*/
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_telnet(void)
+{
+ dissector_add("tcp.port", TCP_PORT_TELNET, dissect_telnet);
+}
diff --git a/packet-telnet.h b/packet-telnet.h
deleted file mode 100644
index ad8065b49f..0000000000
--- a/packet-telnet.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-telnet.h
- *
- * $Id: packet-telnet.h,v 1.1 2000/02/15 21:03:17 gram 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_telnet(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-time.c b/packet-time.c
index 1c6791c327..5a564112af 100644
--- a/packet-time.c
+++ b/packet-time.c
@@ -5,7 +5,7 @@
* Craig Newell <CraigN@cheque.uq.edu.au>
* RFC2347 TIME Option Extension
*
- * $Id: packet-time.c,v 1.3 2000/03/20 22:52:48 gram Exp $
+ * $Id: packet-time.c,v 1.4 2000/04/08 07:07:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -39,7 +39,9 @@ static int hf_time_time = -1;
static gint ett_time = -1;
-void
+#define UDP_PORT_TIME 37
+
+static void
dissect_time(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *time_tree;
@@ -49,7 +51,7 @@ dissect_time(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
col_add_str(fd, COL_PROTOCOL, "TIME");
if (check_col(fd, COL_INFO)) {
- col_add_fstr(fd, COL_INFO, "TIME %s", pi.srcport == 37? "Response":"Request");
+ col_add_fstr(fd, COL_INFO, "TIME %s", pi.srcport == UDP_PORT_TIME? "Response":"Request");
}
if (tree) {
@@ -86,3 +88,9 @@ proto_register_time(void)
proto_register_field_array(proto_time, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_time(void)
+{
+ dissector_add("udp.port", UDP_PORT_TIME, dissect_time);
+}
diff --git a/packet-time.h b/packet-time.h
deleted file mode 100644
index f79504f34e..0000000000
--- a/packet-time.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-time.h
- *
- * $Id: packet-time.h,v 1.1 2000/02/15 21:03:18 gram 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_time(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-tns.c b/packet-tns.c
index 2b537c1e20..f03deb4b6b 100644
--- a/packet-tns.c
+++ b/packet-tns.c
@@ -1,7 +1,7 @@
/* packet-tns.c
* Routines for MSX tns packet dissection
*
- * $Id: packet-tns.c,v 1.4 2000/01/07 22:05:41 guy Exp $
+ * $Id: packet-tns.c,v 1.5 2000/04/08 07:07:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -63,12 +63,14 @@ static gint ett_tns_sns = -1;
static gint ett_tns_connect = -1;
static gint ett_sql = -1;
+#define TCP_PORT_TNS 1521
+
static const value_string tns_type_vals[] = {
{TNS_TYPE_CONNECT, "Connect" },
{TNS_TYPE_ACCEPT, "Accept" },
{TNS_TYPE_DATA, "Data" },
{TNS_TYPE_RESEND, "Resend"},
- {0, NULL}
+ {0, NULL}
};
@@ -76,7 +78,7 @@ static const value_string tns_type_vals[] = {
#define TRUNC(length) if ( ! BYTES_ARE_IN_FRAME(offset, length)) { \
dissect_data(pd,offset,fd,tree); return; }
-void dissect_tns_sns(const u_char *pd, int offset, frame_data *fd,
+static void dissect_tns_sns(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree, proto_tree *tns_tree)
{
proto_tree *sns_tree = NULL, *ti;
@@ -100,7 +102,7 @@ void dissect_tns_sns(const u_char *pd, int offset, frame_data *fd,
}
}
-void dissect_tns_data(const u_char *pd, int offset, frame_data *fd,
+static void dissect_tns_data(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree, proto_tree *tns_tree)
{
@@ -126,7 +128,7 @@ void dissect_tns_data(const u_char *pd, int offset, frame_data *fd,
return;
}
-void dissect_tns_connect(const u_char *pd, int offset, frame_data *fd,
+static void dissect_tns_connect(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree, proto_tree *tns_tree)
{
proto_tree *connect_tree = NULL, *ti;
@@ -176,7 +178,7 @@ void dissect_tns_connect(const u_char *pd, int offset, frame_data *fd,
return;
}
-void dissect_tns_accept(const u_char *pd, int offset, frame_data *fd,
+static void dissect_tns_accept(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree, proto_tree *tns_tree)
{
dissect_data(pd,offset,fd,tns_tree);
@@ -184,7 +186,7 @@ void dissect_tns_accept(const u_char *pd, int offset, frame_data *fd,
}
-void
+static void
dissect_tns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *tns_tree = NULL, *ti;
@@ -192,7 +194,7 @@ dissect_tns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
guint16 type;
if (check_col(fd, COL_PROTOCOL))
- col_add_str(fd, COL_PROTOCOL, "TNS");
+ col_add_str(fd, COL_PROTOCOL, "TNS");
if (check_col(fd, COL_INFO))
{
@@ -343,3 +345,9 @@ void proto_register_tns(void)
proto_register_field_array(proto_tns, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_tns(void)
+{
+ dissector_add("tcp.port", TCP_PORT_TNS, dissect_tns);
+}
diff --git a/packet-tns.h b/packet-tns.h
index 6d29f0c90c..c4d9b186b6 100644
--- a/packet-tns.h
+++ b/packet-tns.h
@@ -1,6 +1,6 @@
/* packet-tns.h
*
- * $Id: packet-tns.h,v 1.2 2000/02/15 21:03:19 gram Exp $
+ * $Id: packet-tns.h,v 1.3 2000/04/08 07:07:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -22,8 +22,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-void dissect_tns(const u_char *, int, frame_data *, proto_tree *);
-
#ifndef PACKET_TNS_H
#define PACKET_TNS_H
diff --git a/packet-udp.c b/packet-udp.c
index 209ca17675..c805250c84 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.58 2000/04/04 22:26:36 oabad Exp $
+ * $Id: packet-udp.c,v 1.59 2000/04/08 07:07:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -46,32 +46,12 @@
#include "plugins.h"
-#include "packet-auto_rp.h"
-#include "packet-bootp.h"
-#include "packet-dhis.h"
-#include "packet-hsrp.h"
-#include "packet-icp.h"
-#include "packet-icq.h"
-#include "packet-ipx.h"
-#include "packet-isakmp.h"
-#include "packet-l2tp.h"
-#include "packet-nbns.h"
#include "packet-ncp.h"
-#include "packet-ntp.h"
-#include "packet-radius.h"
#include "packet-rip.h"
-#include "packet-ripng.h"
#include "packet-rpc.h"
#include "packet-rx.h"
-#include "packet-sap.h"
-#include "packet-snmp.h"
-#include "packet-srvloc.h"
-#include "packet-tacacs.h"
#include "packet-tftp.h"
-#include "packet-time.h"
#include "packet-vines.h"
-#include "packet-wccp.h"
-#include "packet-who.h"
static int proto_udp = -1;
static int hf_udp_srcport = -1;
@@ -93,39 +73,13 @@ typedef struct _e_udphdr {
/* UDP Ports -> should go in packet-udp.h */
-#define UDP_PORT_TIME 37
-#define UDP_PORT_TACACS 49
-#define UDP_PORT_BOOTPS 67
#define UDP_PORT_TFTP 69
-#define UDP_PORT_NTP 123
-#define UDP_PORT_NBNS 137
-#define UDP_PORT_NBDGM 138
-#define UDP_PORT_SNMP 161
-#define UDP_PORT_SNMP_TRAP 162
-#define UDP_PORT_IPX 213 /* RFC 1234 */
-#define UDP_PORT_SRVLOC 427
-#define UDP_PORT_PIM_RP_DISC 496
-#define UDP_PORT_ISAKMP 500
-#define UDP_PORT_WHO 513
#define UDP_PORT_RIP 520
-#define UDP_PORT_RIPNG 521
#define UDP_PORT_NCP 524
#define UDP_PORT_VINES 573
-#define UDP_PORT_RADIUS 1645
-#define UDP_PORT_L2TP 1701
-#define UDP_PORT_RADIUS_NEW 1812
-#define UDP_PORT_RADACCT 1646
-#define UDP_PORT_RADACCT_NEW 1813
-#define UDP_PORT_HSRP 1985
-#define UDP_PORT_ICP 3130
-#define UDP_PORT_ICQ 4000
-#define UDP_PORT_SAP 9875
#define UDP_PORT_RX_LOW 7000
#define UDP_PORT_RX_HIGH 7009
#define UDP_PORT_RX_AFS_BACKUPS 7021
-#define UDP_PORT_WCCP 2048
-#define UDP_PORT_DHIS1 58800
-#define UDP_PORT_DHIS2 58801
static dissector_table_t udp_dissector_table;
@@ -265,36 +219,4 @@ proto_register_udp(void)
/* subdissector code */
udp_dissector_table = register_dissector_table(hf_udp_port);
-
- /* Now add the protocols we know about.
- XXX - we should add all the UDP ports this way, rather
- than having the giant "if", just as is now done in
- "packet-tcp.c". */
-
- dissector_add("udp.port", UDP_PORT_TIME, dissect_time);
- dissector_add("udp.port", UDP_PORT_TACACS, dissect_tacacs);
- dissector_add("udp.port", UDP_PORT_BOOTPS, dissect_bootp);
- dissector_add("udp.port", UDP_PORT_NTP, dissect_ntp);
- dissector_add("udp.port", UDP_PORT_NBNS, dissect_nbns);
- dissector_add("udp.port", UDP_PORT_NBDGM, dissect_nbdgm);
- dissector_add("udp.port", UDP_PORT_SNMP, dissect_snmp);
- dissector_add("udp.port", UDP_PORT_SNMP_TRAP, dissect_snmp);
- dissector_add("udp.port", UDP_PORT_IPX, dissect_ipx);
- dissector_add("udp.port", UDP_PORT_SRVLOC, dissect_srvloc);
- dissector_add("udp.port", UDP_PORT_PIM_RP_DISC, dissect_auto_rp);
- dissector_add("udp.port", UDP_PORT_ISAKMP, dissect_isakmp);
- dissector_add("udp.port", UDP_PORT_WHO, dissect_who);
- dissector_add("udp.port", UDP_PORT_RIPNG, dissect_ripng);
- dissector_add("udp.port", UDP_PORT_RADIUS, dissect_radius);
- dissector_add("udp.port", UDP_PORT_L2TP, dissect_l2tp);
- dissector_add("udp.port", UDP_PORT_RADIUS_NEW, dissect_radius);
- dissector_add("udp.port", UDP_PORT_RADACCT, dissect_radius);
- dissector_add("udp.port", UDP_PORT_RADACCT_NEW, dissect_radius);
- dissector_add("udp.port", UDP_PORT_HSRP, dissect_hsrp);
- dissector_add("udp.port", UDP_PORT_ICP, dissect_icp);
- dissector_add("udp.port", UDP_PORT_ICQ, dissect_icq);
- dissector_add("udp.port", UDP_PORT_SAP, dissect_sap);
- dissector_add("udp.port", UDP_PORT_WCCP, dissect_wccp);
- dissector_add("udp.port", UDP_PORT_DHIS1, dissect_dhis);
- dissector_add("udp.port", UDP_PORT_DHIS2, dissect_dhis);
}
diff --git a/packet-wccp.c b/packet-wccp.c
index 88c208be9c..ca4a99e573 100644
--- a/packet-wccp.c
+++ b/packet-wccp.c
@@ -2,7 +2,7 @@
* Routines for Web Cache Coordination Protocol dissection
* Jerry Talkington <jerryt@netapp.com>
*
- * $Id: packet-wccp.c,v 1.5 2000/03/12 04:47:51 gram Exp $
+ * $Id: packet-wccp.c,v 1.6 2000/04/08 07:07:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -60,6 +60,9 @@ static gint ett_cache_info = -1;
*
* if it hasn't expired yet.
*/
+
+#define UDP_PORT_WCCP 2048
+
#define WCCPv1 0x0004
#define WCCP_HERE_I_AM 7
#define WCCP_I_SEE_YOU 8
@@ -89,7 +92,7 @@ static int wccp_bucket_info(guint8 bucket_info, proto_tree *bucket_tree,
guint32 start, int offset);
static gchar *bucket_name(guint8 bucket);
-void
+static void
dissect_wccp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *wccp_tree = NULL;
@@ -334,3 +337,9 @@ proto_register_wccp(void)
proto_register_field_array(proto_wccp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_wccp(void)
+{
+ dissector_add("udp.port", UDP_PORT_WCCP, dissect_wccp);
+}
diff --git a/packet-wccp.h b/packet-wccp.h
deleted file mode 100644
index 7163be494c..0000000000
--- a/packet-wccp.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-wccp.h
- *
- * $Id: packet-wccp.h,v 1.1 2000/02/15 21:03:27 gram 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_wccp(const u_char *, int, frame_data *, proto_tree *);
diff --git a/packet-who.c b/packet-who.c
index 1c67041b67..c5f78046f1 100644
--- a/packet-who.c
+++ b/packet-who.c
@@ -2,7 +2,7 @@
* Routines for who protocol (see man rwhod)
* Gilbert Ramirez <gram@xiexie.org>
*
- * $Id: packet-who.c,v 1.4 2000/03/12 04:47:51 gram Exp $
+ * $Id: packet-who.c,v 1.5 2000/04/08 07:07:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -89,10 +89,11 @@ static int hf_who_idle = -1;
static gint ett_who = -1;
static gint ett_whoent = -1;
+#define UDP_PORT_WHO 513
static void dissect_whoent(const u_char *pd, int offset, frame_data *fd, proto_tree *tree);
-void
+static void
dissect_who(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
@@ -295,3 +296,8 @@ proto_register_who(void)
proto_register_subtree_array(ett, array_length(ett));
}
+void
+proto_reg_handoff_who(void)
+{
+ dissector_add("udp.port", UDP_PORT_WHO, dissect_who);
+}
diff --git a/packet-who.h b/packet-who.h
deleted file mode 100644
index cb1bdd4b08..0000000000
--- a/packet-who.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* packet-who.h
- *
- * $Id: packet-who.h,v 1.1 2000/02/15 21:03:28 gram 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_who(const u_char *, int, frame_data *, proto_tree *);