]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-radius.c
Don't print timestamps to a buffer and then print the buffer.
[tcpdump] / print-radius.c
index 0b0c28439efb61c7e1513e146258d52bc641cffa..7f9ea5f2d99711a35f61c9e19e18897797d4d19b 100644 (file)
  */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
 
 #include <string.h>
 
@@ -89,7 +89,6 @@
 #include "extract.h"
 #include "oui.h"
 
-static const char tstr[] = " [|radius]";
 
 #define TAM_SIZE(x) (sizeof(x)/sizeof(x[0]) )
 
@@ -638,7 +637,7 @@ print_attr_string(netdissect_options *ndo,
    return;
 
    trunc:
-      ND_PRINT("%s", tstr);
+      nd_print_trunc(ndo);
 }
 
 /*
@@ -699,7 +698,7 @@ print_vendor_attr(netdissect_options *ndo,
     return;
 
    trunc:
-     ND_PRINT("%s", tstr);
+     nd_print_trunc(ndo);
 }
 
 /******************************/
@@ -822,7 +821,7 @@ print_attr_num(netdissect_options *ndo,
    return;
 
    trunc:
-     ND_PRINT("%s", tstr);
+     nd_print_trunc(ndo);
 }
 
 /*****************************/
@@ -865,7 +864,7 @@ print_attr_address(netdissect_options *ndo,
    return;
 
    trunc:
-     ND_PRINT("%s", tstr);
+     nd_print_trunc(ndo);
 }
 
 /*****************************/
@@ -892,7 +891,7 @@ print_attr_address6(netdissect_options *ndo,
    return;
 
    trunc:
-     ND_PRINT("%s", tstr);
+     nd_print_trunc(ndo);
 }
 
 static void
@@ -925,7 +924,7 @@ print_attr_netmask6(netdissect_options *ndo,
    return;
 
    trunc:
-     ND_PRINT("%s", tstr);
+     nd_print_trunc(ndo);
 }
 
 /*************************************/
@@ -959,7 +958,7 @@ print_attr_time(netdissect_options *ndo,
    return;
 
    trunc:
-     ND_PRINT("%s", tstr);
+     nd_print_trunc(ndo);
 }
 
 /***********************************/
@@ -1050,7 +1049,7 @@ print_attr_strange(netdissect_options *ndo,
    return;
 
    trunc:
-     ND_PRINT("%s", tstr);
+     nd_print_trunc(ndo);
 }
 
 static void
@@ -1114,7 +1113,7 @@ radius_attrs_print(netdissect_options *ndo,
    return;
 
 trunc:
-   ND_PRINT("%s", tstr);
+   nd_print_trunc(ndo);
 }
 
 void
@@ -1124,13 +1123,14 @@ radius_print(netdissect_options *ndo,
    const struct radius_hdr *rad;
    u_int len, auth_idx;
 
+   ndo->ndo_protocol = "radius";
    ND_TCHECK_LEN(dat, MIN_RADIUS_LEN);
    rad = (const struct radius_hdr *)dat;
    len = EXTRACT_BE_U_2(rad->len);
 
    if (len < MIN_RADIUS_LEN)
    {
-         ND_PRINT("%s", tstr);
+         nd_print_trunc(ndo);
          return;
    }
 
@@ -1161,5 +1161,5 @@ radius_print(netdissect_options *ndo,
    return;
 
 trunc:
-   ND_PRINT("%s", tstr);
+   nd_print_trunc(ndo);
 }