summaryrefslogtreecommitdiff
path: root/print-msdp.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-msdp.c
parent8ab5c3a4e75a3ce8da691cd6ca6a9945082827af (diff)
downloadtcpdump-e2982e7f6f0b624a773ec5a58885ee80fab46d34.tar.gz
Update ND_PRINT() as a variadic macro
Diffstat (limited to 'print-msdp.c')
-rw-r--r--print-msdp.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/print-msdp.c b/print-msdp.c
index f1769de0..68bb3159 100644
--- a/print-msdp.c
+++ b/print-msdp.c
@@ -41,13 +41,13 @@ msdp_print(netdissect_options *ndo, const u_char *sp, u_int length)
len = EXTRACT_BE_U_2(sp + 1);
if (len > 1500 || len < 3 || type == 0 || type > MSDP_TYPE_MAX)
goto trunc; /* not really truncated, but still not decodable */
- ND_PRINT((ndo, " msdp:"));
+ ND_PRINT(" msdp:");
while (length > 0) {
ND_TCHECK_3(sp);
type = EXTRACT_U_1(sp);
len = EXTRACT_BE_U_2(sp + 1);
if (len > 1400 || ndo->ndo_vflag)
- ND_PRINT((ndo, " [len %u]", len));
+ ND_PRINT(" [len %u]", len);
if (len < 3)
goto trunc;
sp += 3;
@@ -56,15 +56,15 @@ msdp_print(netdissect_options *ndo, const u_char *sp, u_int length)
case 1: /* IPv4 Source-Active */
case 3: /* IPv4 Source-Active Response */
if (type == 1)
- ND_PRINT((ndo, " SA"));
+ ND_PRINT(" SA");
else
- ND_PRINT((ndo, " SA-Response"));
+ ND_PRINT(" SA-Response");
ND_TCHECK_1(sp);
- ND_PRINT((ndo, " %u entries", EXTRACT_U_1(sp)));
+ ND_PRINT(" %u entries", EXTRACT_U_1(sp));
if ((u_int)((EXTRACT_U_1(sp) * 12) + 8) < len) {
- ND_PRINT((ndo, " [w/data]"));
+ ND_PRINT(" [w/data]");
if (ndo->ndo_vflag > 1) {
- ND_PRINT((ndo, " "));
+ ND_PRINT(" ");
ip_print(ndo, sp +
EXTRACT_U_1(sp) * 12 + 8 - 3,
len - (EXTRACT_U_1(sp) * 12 + 8));
@@ -72,20 +72,20 @@ msdp_print(netdissect_options *ndo, const u_char *sp, u_int length)
}
break;
case 2:
- ND_PRINT((ndo, " SA-Request"));
+ ND_PRINT(" SA-Request");
ND_TCHECK_5(sp);
- ND_PRINT((ndo, " for %s", ipaddr_string(ndo, sp + 1)));
+ ND_PRINT(" for %s", ipaddr_string(ndo, sp + 1));
break;
case 4:
- ND_PRINT((ndo, " Keepalive"));
+ ND_PRINT(" Keepalive");
if (len != 3)
- ND_PRINT((ndo, "[len=%d] ", len));
+ ND_PRINT("[len=%d] ", len);
break;
case 5:
- ND_PRINT((ndo, " Notification"));
+ ND_PRINT(" Notification");
break;
default:
- ND_PRINT((ndo, " [type=%d len=%d]", type, len));
+ ND_PRINT(" [type=%d len=%d]", type, len);
break;
}
sp += (len - 3);
@@ -93,7 +93,7 @@ msdp_print(netdissect_options *ndo, const u_char *sp, u_int length)
}
return;
trunc:
- ND_PRINT((ndo, " [|msdp]"));
+ ND_PRINT(" [|msdp]");
}
/*