Use nd_print_protocol_caps() to print the protocol name

This commit is contained in:
Francois-Xavier Le Bail 2019-06-17 14:46:22 +02:00
parent f4ebd6cda8
commit 33152db744
4 changed files with 4 additions and 4 deletions

View File

@ -352,7 +352,7 @@ ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len)
uint8_t version;
ndo->ndo_protocol = "ahcp";
ND_PRINT("AHCP");
nd_print_protocol_caps(ndo);
if (len < 2)
goto invalid;
/* Magic */

View File

@ -327,7 +327,7 @@ dccp_print(netdissect_options *ndo, const u_char *bp, const u_char *data2,
ipaddr_string(ndo, ip->ip_dst), dport);
}
ND_PRINT("DCCP");
nd_print_protocol_caps(ndo);
if (ndo->ndo_qflag) {
ND_PRINT(" %u", len - hlen);

View File

@ -66,7 +66,7 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length)
ndo->ndo_protocol = "mpls";
p = bp;
ND_PRINT("MPLS");
nd_print_protocol_caps(ndo);
do {
ND_TCHECK_LEN(p, sizeof(label_entry));
if (length < sizeof(label_entry))

View File

@ -97,7 +97,7 @@ tftp_print(netdissect_options *ndo,
ndo->ndo_protocol = "tftp";
/* Print protocol */
ND_PRINT("TFTP");
nd_print_protocol_caps(ndo);
/* Print length */
ND_PRINT(", length %u", length);