/* \summary: Multi-Protocol Label Switching (MPLS) printer */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
#include "netdissect.h"
#include "extract.h"
uint16_t label_stack_depth = 0;
enum mpls_packet_type pt = PT_UNKNOWN;
+ ndo->ndo_protocol = "mpls";
p = bp;
ND_PRINT("MPLS");
do {
ND_TCHECK_LEN(p, sizeof(label_entry));
- if (length < sizeof(label_entry)) {
- ND_PRINT("[|MPLS], length %u", length);
- return;
- }
+ if (length < sizeof(label_entry))
+ goto trunc;
label_entry = EXTRACT_BE_U_4(p);
ND_PRINT("%s(label %u",
(label_stack_depth && ndo->ndo_vflag) ? "\n\t" : " ",
return;
trunc:
- ND_PRINT("[|MPLS]");
+ nd_print_trunc(ndo);
}
-
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 8
- * End:
- */