aboutsummaryrefslogtreecommitdiffstats
path: root/packet-rip.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-04-14 06:17:23 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-04-14 06:17:23 +0000
commit292177be39fd61cbb1b2e8827f055c129b17374f (patch)
tree2d6eddc27269201f13319831dac5d8967be15780 /packet-rip.c
parent725a21f8d857921c3175bacc0038d209dc6049ce (diff)
RFC 1058, on RIP V1, says:
Specific queries and debugging requests may be sent from ports other than 520, but they are directed to port 520 on the target machine. and RFC 2453, on RIP V2, says: Specific queries may be sent from ports other than the RIP port, but they must be directed to the RIP port on the target machine. so there is no requirement that RIP packets have 520 as both source and destination port numbers. It's therefore OK to register it as the dissector for UDP port 520 - no need to handle it specially in the UDP dissector as a reminder to make it check both source and destination ports - so we do so. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1855 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-rip.c')
-rw-r--r--packet-rip.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/packet-rip.c b/packet-rip.c
index d1309610e8..e03546c1ff 100644
--- a/packet-rip.c
+++ b/packet-rip.c
@@ -2,7 +2,7 @@
* Routines for RIPv1 and RIPv2 packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-rip.c,v 1.13 1999/11/16 11:42:50 guy Exp $
+ * $Id: packet-rip.c,v 1.14 2000/04/14 06:17:23 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -38,6 +38,8 @@
#include "packet.h"
#include "packet-rip.h"
+#define UDP_PORT_RIP 520
+
static int proto_rip = -1;
static gint ett_rip = -1;
@@ -48,7 +50,7 @@ static void dissect_ip_rip_vektor(guint8 version,
static void dissect_rip_authentication(const e_rip_authentication *rip_authentication,
int offset, proto_tree *tree);
-void
+static void
dissect_rip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
e_riphdr rip_header;
e_rip_entry rip_entry;
@@ -196,3 +198,9 @@ proto_register_rip(void)
/* proto_register_field_array(proto_rip, hf, array_length(hf));*/
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_rip(void)
+{
+ dissector_add("udp.port", UDP_PORT_RIP, dissect_rip);
+}