aboutsummaryrefslogtreecommitdiff
path: root/print-udld.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-udld.c
parent8ab5c3a4e75a3ce8da691cd6ca6a9945082827af (diff)
downloadtcpdump-e2982e7f6f0b624a773ec5a58885ee80fab46d34.tar.gz
Update ND_PRINT() as a variadic macro
Diffstat (limited to 'print-udld.c')
-rw-r--r--print-udld.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/print-udld.c b/print-udld.c
index 0bc71ea8..e4c7bdca 100644
--- a/print-udld.c
+++ b/print-udld.c
@@ -108,13 +108,13 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
code = UDLD_EXTRACT_OPCODE(EXTRACT_U_1(tptr));
- ND_PRINT((ndo, "UDLDv%u, Code %s (%x), Flags [%s] (0x%02x), length %u",
+ ND_PRINT("UDLDv%u, Code %s (%x), Flags [%s] (0x%02x), length %u",
UDLD_EXTRACT_VERSION(EXTRACT_U_1(tptr)),
tok2str(udld_code_values, "Reserved", code),
code,
bittok2str(udld_flags_values, "none", EXTRACT_U_1((tptr + 1))),
EXTRACT_U_1((tptr + 1)),
- length));
+ length);
/*
* In non-verbose mode, just print version and opcode type
@@ -123,7 +123,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
return;
}
- ND_PRINT((ndo, "\n\tChecksum 0x%04x (unverified)", EXTRACT_BE_U_2(tptr + 2)));
+ ND_PRINT("\n\tChecksum 0x%04x (unverified)", EXTRACT_BE_U_2(tptr + 2));
tptr += UDLD_HEADER_LEN;
@@ -133,9 +133,9 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
type = EXTRACT_BE_U_2(tptr);
len = EXTRACT_BE_U_2(tptr + 2);
- ND_PRINT((ndo, "\n\t%s (0x%04x) TLV, length %u",
+ ND_PRINT("\n\t%s (0x%04x) TLV, length %u",
tok2str(udld_tlv_values, "Unknown", type),
- type, len));
+ type, len);
if (type == 0)
goto invalid;
@@ -153,12 +153,12 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
case UDLD_DEVICE_ID_TLV:
case UDLD_PORT_ID_TLV:
case UDLD_DEVICE_NAME_TLV:
- ND_PRINT((ndo, ", "));
+ ND_PRINT(", ");
fn_printzp(ndo, tptr, len, NULL);
break;
case UDLD_ECHO_TLV:
- ND_PRINT((ndo, ", "));
+ ND_PRINT(", ");
(void)fn_printn(ndo, tptr, len, NULL);
break;
@@ -166,13 +166,13 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
case UDLD_TIMEOUT_INTERVAL_TLV:
if (len != 1)
goto invalid;
- ND_PRINT((ndo, ", %us", (EXTRACT_U_1(tptr))));
+ ND_PRINT(", %us", (EXTRACT_U_1(tptr)));
break;
case UDLD_SEQ_NUMBER_TLV:
if (len != 4)
goto invalid;
- ND_PRINT((ndo, ", %u", EXTRACT_BE_U_4(tptr)));
+ ND_PRINT(", %u", EXTRACT_BE_U_4(tptr));
break;
default:
@@ -184,10 +184,10 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
return;
invalid:
- ND_PRINT((ndo, "%s", istr));
+ ND_PRINT("%s", istr);
return;
trunc:
- ND_PRINT((ndo, "%s", tstr));
+ ND_PRINT("%s", tstr);
}
/*