summaryrefslogtreecommitdiff
path: root/print-mobile.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-mobile.c
parent8ab5c3a4e75a3ce8da691cd6ca6a9945082827af (diff)
downloadtcpdump-e2982e7f6f0b624a773ec5a58885ee80fab46d34.tar.gz
Update ND_PRINT() as a variadic macro
Diffstat (limited to 'print-mobile.c')
-rw-r--r--print-mobile.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/print-mobile.c b/print-mobile.c
index f34c10d9..de4d68cf 100644
--- a/print-mobile.c
+++ b/print-mobile.c
@@ -73,10 +73,10 @@ mobile_print(netdissect_options *ndo, const u_char *bp, u_int length)
mob = (const struct mobile_ip *)bp;
if (length < MOBILE_SIZE || !ND_TTEST_SIZE(mob)) {
- ND_PRINT((ndo, "[|mobile]"));
+ ND_PRINT("[|mobile]");
return;
}
- ND_PRINT((ndo, "mobile: "));
+ ND_PRINT("mobile: ");
proto = EXTRACT_BE_U_2(mob->proto);
crc = EXTRACT_BE_U_2(mob->hcheck);
@@ -85,19 +85,19 @@ mobile_print(netdissect_options *ndo, const u_char *bp, u_int length)
}
if (osp) {
- ND_PRINT((ndo, "[S] "));
+ ND_PRINT("[S] ");
if (ndo->ndo_vflag)
- ND_PRINT((ndo, "%s ", ipaddr_string(ndo, &mob->osrc)));
+ ND_PRINT("%s ", ipaddr_string(ndo, &mob->osrc));
} else {
- ND_PRINT((ndo, "[] "));
+ ND_PRINT("[] ");
}
if (ndo->ndo_vflag) {
- ND_PRINT((ndo, "> %s ", ipaddr_string(ndo, &mob->odst)));
- ND_PRINT((ndo, "(oproto=%u)", proto>>8));
+ ND_PRINT("> %s ", ipaddr_string(ndo, &mob->odst));
+ ND_PRINT("(oproto=%u)", proto>>8);
}
vec[0].ptr = (const uint8_t *)(const void *)mob;
vec[0].len = osp ? 12 : 8;
if (in_cksum(vec, 1)!=0) {
- ND_PRINT((ndo, " (bad checksum %u)", crc));
+ ND_PRINT(" (bad checksum %u)", crc);
}
}