]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ospf.c
NTP: Use nd_XXXXX integer types in the structures.
[tcpdump] / print-ospf.c
index 0e84e584dee7eca56201d9c9e8bb5b9e55a2e4d0..8dad2eaa4b1fb1053855776b99e688aa36d56356 100644 (file)
@@ -21,6 +21,8 @@
  * OSPF support contributed by Jeffrey Honig ([email protected])
  */
 
+/* \summary: Open Shortest Path First (OSPF) printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -64,7 +66,6 @@ static const struct tok ospf_rla_flag_values[] = {
 };
 
 static const struct tok type2str[] = {
-       { OSPF_TYPE_UMD,        "UMD" },
        { OSPF_TYPE_HELLO,      "Hello" },
        { OSPF_TYPE_DD,         "Database Description" },
        { OSPF_TYPE_LS_REQ,     "LS-Request" },
@@ -986,14 +987,8 @@ ospf_decode_v2(netdissect_options *ndo,
 
        switch (op->ospf_type) {
 
-       case OSPF_TYPE_UMD:
-               /*
-                * Rob Coltun's special monitoring packets;
-                * do nothing
-                */
-               break;
-
        case OSPF_TYPE_HELLO:
+               ND_TCHECK(op->ospf_hello.hello_options);
                ND_PRINT((ndo, "\n\tOptions [%s]",
                          bittok2str(ospf_option_values,"none",op->ospf_hello.hello_options)));
 
@@ -1124,7 +1119,7 @@ ospf_print(netdissect_options *ndo,
        /* If the type is valid translate it, or just print the type */
        /* value.  If it's not valid, say so and return */
        ND_TCHECK(op->ospf_type);
-       cp = tok2str(type2str, "unknown LS-type", op->ospf_type);
+       cp = tok2str(type2str, "unknown LS-type %u", op->ospf_type);
        ND_PRINT((ndo, "OSPFv%u, %s, length %u", op->ospf_version, cp, length));
        if (*cp == 'u')
                return;