X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/1cde6435df23876fb88998e38739def0dc7dca47..refs/pull/440/head:/print-ahcp.c diff --git a/print-ahcp.c b/print-ahcp.c index 280372da..a9ae38a9 100644 --- a/print-ahcp.c +++ b/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)); } -