aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/tcpdump/tcpdump/print-rip.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/tcpdump/print-rip.c b/usr.sbin/tcpdump/tcpdump/print-rip.c
index d123fe9a48bb..a824ce64a93f 100644
--- a/usr.sbin/tcpdump/tcpdump/print-rip.c
+++ b/usr.sbin/tcpdump/tcpdump/print-rip.c
@@ -21,7 +21,7 @@
#ifndef lint
static char rcsid[] =
- "@(#) $Header: print-rip.c,v 1.12 91/04/19 10:46:46 mccanne Exp $ (LBL)";
+ "@(#) $Header: /a/cvs/386BSD/src/contrib/tcpdump/tcpdump/print-rip.c,v 1.1.1.1 1993/06/12 14:42:07 rgrimes Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -33,13 +33,39 @@ static char rcsid[] =
#include <netinet/ip_var.h>
#include <netinet/udp.h>
#include <netinet/udp_var.h>
-#include <protocols/routed.h>
#include <errno.h>
#include "interface.h"
#include "addrtoname.h"
+#define RIPVERSION 1
+
+struct netinfo {
+ struct osockaddr rip_dst; /* destination net/host */
+ int rip_metric; /* cost of route */
+};
+
+struct rip {
+ u_char rip_cmd; /* request/response */
+ u_char rip_vers; /* protocol version # */
+ u_char rip_res1[2]; /* pad to 32-bit boundary */
+ union {
+ struct netinfo ru_nets[1]; /* variable length... */
+ char ru_tracefile[1]; /* ditto ... */
+ } ripun;
+#define rip_nets ripun.ru_nets
+#define rip_tracefile ripun.ru_tracefile
+};
+
+/*
+ * Packet types.
+ */
+#define RIPCMD_REQUEST 1 /* want info */
+#define RIPCMD_RESPONSE 2 /* responding to request */
+#define RIPCMD_TRACEON 3 /* turn tracing on */
+#define RIPCMD_TRACEOFF 4 /* turn it off */
+
static void
rip_entry_print(ni)
register struct netinfo *ni;