]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udld.c
document SIGUSR1 in manual page
[tcpdump] / print-udld.c
index 7bc8acece1f3ea5897778d4f684355e22659da89..15e2bf6fae492f864fae592fe021f2e8a4c6001e 100644 (file)
  * Original code by Carles Kishimoto <[email protected]>
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include <tcpdump-stdinc.h>
 
-#include "netdissect.h"
+#include "interface.h"
 #include "extract.h"
 
 #define UDLD_HEADER_LEN                        4
@@ -88,8 +89,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
 
     tptr = pptr;
 
-    if (!ND_TTEST2(*tptr, UDLD_HEADER_LEN))
-       goto trunc;
+    ND_TCHECK2(*tptr, UDLD_HEADER_LEN);
 
     code = UDLD_EXTRACT_OPCODE(*tptr);
 
@@ -114,8 +114,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
 
     while (tptr < (pptr+length)) {
 
-        if (!ND_TTEST2(*tptr, 4))
-            goto trunc;
+        ND_TCHECK2(*tptr, 4);
 
        type = EXTRACT_16BITS(tptr);
         len  = EXTRACT_16BITS(tptr+2);