summaryrefslogtreecommitdiff
path: root/print-mpls.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-01-07 11:47:30 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-01-07 13:36:41 +0100
commite2982e7f6f0b624a773ec5a58885ee80fab46d34 (patch)
tree52c8e511ccaff8ef09dc3337b213273865522162 /print-mpls.c
parent8ab5c3a4e75a3ce8da691cd6ca6a9945082827af (diff)
downloadtcpdump-e2982e7f6f0b624a773ec5a58885ee80fab46d34.tar.gz
Update ND_PRINT() as a variadic macro
Diffstat (limited to 'print-mpls.c')
-rw-r--r--print-mpls.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/print-mpls.c b/print-mpls.c
index c566ea14..d744b9e3 100644
--- a/print-mpls.c
+++ b/print-mpls.c
@@ -65,25 +65,25 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length)
enum mpls_packet_type pt = PT_UNKNOWN;
p = bp;
- ND_PRINT((ndo, "MPLS"));
+ ND_PRINT("MPLS");
do {
ND_TCHECK_LEN(p, sizeof(label_entry));
if (length < sizeof(label_entry)) {
- ND_PRINT((ndo, "[|MPLS], length %u", length));
+ ND_PRINT("[|MPLS], length %u", length);
return;
}
label_entry = EXTRACT_BE_U_4(p);
- ND_PRINT((ndo, "%s(label %u",
+ ND_PRINT("%s(label %u",
(label_stack_depth && ndo->ndo_vflag) ? "\n\t" : " ",
- MPLS_LABEL(label_entry)));
+ MPLS_LABEL(label_entry));
label_stack_depth++;
if (ndo->ndo_vflag &&
MPLS_LABEL(label_entry) < sizeof(mpls_labelname) / sizeof(mpls_labelname[0]))
- ND_PRINT((ndo, " (%s)", mpls_labelname[MPLS_LABEL(label_entry)]));
- ND_PRINT((ndo, ", exp %u", MPLS_EXP(label_entry)));
+ ND_PRINT(" (%s)", mpls_labelname[MPLS_LABEL(label_entry)]);
+ ND_PRINT(", exp %u", MPLS_EXP(label_entry));
if (MPLS_STACK(label_entry))
- ND_PRINT((ndo, ", [S]"));
- ND_PRINT((ndo, ", ttl %u)", MPLS_TTL(label_entry)));
+ ND_PRINT(", [S]");
+ ND_PRINT(", ttl %u)", MPLS_TTL(label_entry));
p += sizeof(label_entry);
length -= sizeof(label_entry);
@@ -189,7 +189,7 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length)
ND_DEFAULTPRINT(p, length);
return;
}
- ND_PRINT((ndo, ndo->ndo_vflag ? "\n\t" : " "));
+ ND_PRINT(ndo->ndo_vflag ? "\n\t" : " ");
switch (pt) {
case PT_IPV4:
@@ -210,7 +210,7 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length)
return;
trunc:
- ND_PRINT((ndo, "[|MPLS]"));
+ ND_PRINT("[|MPLS]");
}