summaryrefslogtreecommitdiffstats
path: root/print-rip.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:52:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:52:31 +0000
commit31cd589d20ba8d3d6b3fc4fccacc40d38a163c5d (patch)
tree99d6c086833d530e5d1d33a8128961f8149843f0 /print-rip.c
parentAdding upstream version 4.99.4. (diff)
downloadtcpdump-31cd589d20ba8d3d6b3fc4fccacc40d38a163c5d.tar.xz
tcpdump-31cd589d20ba8d3d6b3fc4fccacc40d38a163c5d.zip
Adding upstream version 4.99.5.upstream/4.99.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'print-rip.c')
-rw-r--r--print-rip.c46
1 files changed, 20 insertions, 26 deletions
diff --git a/print-rip.c b/print-rip.c
index fca534f..aac3e45 100644
--- a/print-rip.c
+++ b/print-rip.c
@@ -23,9 +23,7 @@
/* specification: RFC 1058, RFC 2453, RFC 4822 */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
@@ -55,16 +53,25 @@ struct rip {
#define RIPCMD_RESPONSE 2 /* responding to request */
#define RIPCMD_TRACEON 3 /* turn tracing on */
#define RIPCMD_TRACEOFF 4 /* turn it off */
-#define RIPCMD_POLL 5 /* want info from everybody */
-#define RIPCMD_POLLENTRY 6 /* poll for entry */
+/* 5 is reserved */
+#define RIPCMD_TRIGREQ 6
+#define RIPCMD_TRIGRESP 7
+#define RIPCMD_TRIGACK 8
+#define RIPCMD_UPDREQ 9
+#define RIPCMD_UPDRESP 10
+#define RIPCMD_UPDACK 11
static const struct tok rip_cmd_values[] = {
{ RIPCMD_REQUEST, "Request" },
{ RIPCMD_RESPONSE, "Response" },
{ RIPCMD_TRACEON, "Trace on" },
{ RIPCMD_TRACEOFF, "Trace off" },
- { RIPCMD_POLL, "Poll" },
- { RIPCMD_POLLENTRY, "Poll Entry" },
+ { RIPCMD_TRIGREQ, "Triggered Request" },
+ { RIPCMD_TRIGRESP, "Triggered Response" },
+ { RIPCMD_TRIGACK, "Triggered Acknowledgement" },
+ { RIPCMD_UPDREQ, "Update Request" },
+ { RIPCMD_UPDRESP, "Update Response" },
+ { RIPCMD_UPDACK, "Update Acknowledge" },
{ 0, NULL}
};
@@ -317,22 +324,6 @@ rip_print(netdissect_options *ndo,
(ndo->ndo_vflag >= 1) ? "\n\t" : "",
vers);
- if (vers == 0) {
- /*
- * RFC 1058.
- *
- * XXX - RFC 1058 says
- *
- * 0 Datagrams whose version number is zero are to be ignored.
- * These are from a previous version of the protocol, whose
- * packet format was machine-specific.
- *
- * so perhaps we should just dump the packet, in hex.
- */
- print_unknown_data(ndo, (const uint8_t *)&rp->rip_cmd, "\n\t", length);
- return;
- }
-
/* dump version and lets see if we know the commands name*/
cmd = GET_U_1(rp->rip_cmd);
ND_PRINT(", %s, length: %u",
@@ -398,13 +389,16 @@ rip_print(netdissect_options *ndo,
}
break;
+ case RIPCMD_TRACEON:
case RIPCMD_TRACEOFF:
- case RIPCMD_POLL:
- case RIPCMD_POLLENTRY:
+ case RIPCMD_TRIGREQ:
+ case RIPCMD_TRIGRESP:
+ case RIPCMD_TRIGACK:
+ case RIPCMD_UPDREQ:
+ case RIPCMD_UPDRESP:
+ case RIPCMD_UPDACK:
break;
- case RIPCMD_TRACEON:
- /* fall through */
default:
if (ndo->ndo_vflag <= 1) {
if (!print_unknown_data(ndo, (const uint8_t *)rp, "\n\t", length))