diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-04-14 06:17:23 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-04-14 06:17:23 +0000 |
commit | d419701eeac64d5e4b5db89ac89c28afa2f72425 (patch) | |
tree | 2d6eddc27269201f13319831dac5d8967be15780 /packet-rip.c | |
parent | 61167a3c28f1413cfe0f3a3fb0f9454815a02b16 (diff) | |
download | wireshark-d419701eeac64d5e4b5db89ac89c28afa2f72425.tar.gz wireshark-d419701eeac64d5e4b5db89ac89c28afa2f72425.tar.bz2 wireshark-d419701eeac64d5e4b5db89ac89c28afa2f72425.zip |
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.
svn path=/trunk/; revision=1855
Diffstat (limited to 'packet-rip.c')
-rw-r--r-- | packet-rip.c | 12 |
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); +} |