diff options
author | pkelsey <pkelsey@FreeBSD.org> | 2015-07-08 16:19:32 +0000 |
---|---|---|
committer | pkelsey <pkelsey@FreeBSD.org> | 2015-07-08 16:19:32 +0000 |
commit | 7e965066ede451d7a551dd68d6c59acf32e4846e (patch) | |
tree | f0c2243cc0a2a59f3eb1354ba3987d4cbcb788bc /contrib/tcpdump/print-ahcp.c | |
parent | 732211dc794db586649eabfc1d517b8a477440f5 (diff) | |
parent | c2704d8ede887d9fe69a9a11fe0755b09ec6895d (diff) | |
download | FreeBSD-src-7e965066ede451d7a551dd68d6c59acf32e4846e.zip FreeBSD-src-7e965066ede451d7a551dd68d6c59acf32e4846e.tar.gz |
MFV r285191: tcpdump 4.7.4.
Also, the changes made in r272451 and r272653 that were lost in the
merge of 4.6.2 (r276788) have been restored.
PR: 199568
Differential Revision: https://reviews.freebsd.org/D3007
Reviewed by: brooks, hiren
Approved by: jmallett (mentor)
MFC after: 1 month
Diffstat (limited to 'contrib/tcpdump/print-ahcp.c')
-rw-r--r-- | contrib/tcpdump/print-ahcp.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/contrib/tcpdump/print-ahcp.c b/contrib/tcpdump/print-ahcp.c index 280372d..a9ae38a 100644 --- a/contrib/tcpdump/print-ahcp.c +++ b/contrib/tcpdump/print-ahcp.c @@ -100,7 +100,8 @@ static const struct tok ahcp1_opt_str[] = { }; static int -ahcp_time_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) { +ahcp_time_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) +{ time_t t; struct tm *tm; char buf[BUFSIZE]; @@ -127,7 +128,8 @@ trunc: } static int -ahcp_seconds_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) { +ahcp_seconds_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) +{ if (cp + 4 != ep) goto corrupt; ND_TCHECK2(*cp, 4); @@ -144,7 +146,8 @@ trunc: } static int -ahcp_ipv6_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) { +ahcp_ipv6_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) +{ const char *sep = ": "; while (cp < ep) { @@ -171,7 +174,8 @@ trunc: } static int -ahcp_ipv4_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) { +ahcp_ipv4_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) +{ const char *sep = ": "; while (cp < ep) { @@ -194,7 +198,8 @@ trunc: } static int -ahcp_ipv6_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) { +ahcp_ipv6_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) +{ const char *sep = ": "; while (cp < ep) { @@ -221,7 +226,8 @@ trunc: } static int -ahcp_ipv4_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) { +ahcp_ipv4_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) +{ const char *sep = ": "; while (cp < ep) { @@ -263,7 +269,8 @@ static int }; static void -ahcp1_options_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) { +ahcp1_options_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) +{ uint8_t option_no, option_len; while (cp < ep) { @@ -303,7 +310,8 @@ trunc: } static void -ahcp1_body_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) { +ahcp1_body_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) +{ uint8_t type, mbz; uint16_t body_len; @@ -347,7 +355,8 @@ trunc: } void -ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len) { +ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len) +{ const u_char *ep = cp + len; uint8_t version; @@ -410,4 +419,3 @@ corrupt: trunc: ND_PRINT((ndo, "%s", tstr)); } - |