]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-m3ua.c
Translate UDP/1700 as RADIUS
[tcpdump] / print-m3ua.c
index b217e8ff6d95cee926b55a3adcc310841a9f278a..40e5238952843c2aebbc93e22d026d58a3fae91f 100644 (file)
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
 #include "netdissect.h"
 #include "extract.h"
 
 static const char tstr[] = " [|m3ua]";
-static const char cstr[] = " (corrupt)";
+static const char istr[] = " (invalid)";
 
 /* RFC 4666 */
 
@@ -217,7 +217,7 @@ tag_value_print(netdissect_options *ndo,
   case M3UA_PARAM_CORR_ID:
     /* buf and size don't include the header */
     if (size < 4)
-      goto corrupt;
+      goto invalid;
     ND_TCHECK2(*buf, size);
     ND_PRINT((ndo, "0x%08x", EXTRACT_32BITS(buf)));
     break;
@@ -228,8 +228,8 @@ tag_value_print(netdissect_options *ndo,
   }
   return;
 
-corrupt:
-  ND_PRINT((ndo, "%s", cstr));
+invalid:
+  ND_PRINT((ndo, "%s", istr));
   ND_TCHECK2(*buf, size);
   return;
 trunc:
@@ -258,7 +258,7 @@ m3ua_tags_print(netdissect_options *ndo,
 
   while (p < buf + size) {
     if (p + sizeof(struct m3ua_param_header) > buf + size)
-      goto corrupt;
+      goto invalid;
     ND_TCHECK2(*p, sizeof(struct m3ua_param_header));
     /* Parameter Tag */
     hdr_tag = EXTRACT_16BITS(p);
@@ -266,7 +266,7 @@ m3ua_tags_print(netdissect_options *ndo,
     /* Parameter Length */
     hdr_len = EXTRACT_16BITS(p + 2);
     if (hdr_len < sizeof(struct m3ua_param_header))
-      goto corrupt;
+      goto invalid;
     /* Parameter Value */
     align = (p + hdr_len - buf) % 4;
     align = align ? 4 - align : 0;
@@ -276,8 +276,8 @@ m3ua_tags_print(netdissect_options *ndo,
   }
   return;
 
-corrupt:
-  ND_PRINT((ndo, "%s", cstr));
+invalid:
+  ND_PRINT((ndo, "%s", istr));
   ND_TCHECK2(*buf, size);
   return;
 trunc:
@@ -304,7 +304,7 @@ m3ua_print(netdissect_options *ndo,
 
   /* size includes the header */
   if (size < sizeof(struct m3ua_common_header))
-    goto corrupt;
+    goto invalid;
   ND_TCHECK(*hdr);
   if (hdr->v != M3UA_REL_1_0)
     return;
@@ -328,8 +328,8 @@ m3ua_print(netdissect_options *ndo,
     m3ua_tags_print(ndo, buf + sizeof(struct m3ua_common_header), EXTRACT_32BITS(&hdr->len) - sizeof(struct m3ua_common_header));
   return;
 
-corrupt:
-  ND_PRINT((ndo, "%s", cstr));
+invalid:
+  ND_PRINT((ndo, "%s", istr));
   ND_TCHECK2(*buf, size);
   return;
 trunc: