mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 12:03:44 +08:00
Use nd_print_protocol_caps() to print the protocol name
This commit is contained in:
parent
f4ebd6cda8
commit
33152db744
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user