diff options
author | Patrick Kelsey <pkelsey@FreeBSD.org> | 2015-07-06 02:16:08 +0000 |
---|---|---|
committer | Patrick Kelsey <pkelsey@FreeBSD.org> | 2015-07-06 02:16:08 +0000 |
commit | 7041091186ddb72670e3e2d8254859ed31d3f2e6 (patch) | |
tree | a4829ce6205db3fdb0e6cebd0d396f5c4094bb3b /print-ahcp.c | |
parent | d3b6650ba68c44e3a488aac17bbe56d0cd0e870d (diff) |
Diffstat (limited to 'print-ahcp.c')
-rw-r--r-- | print-ahcp.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/print-ahcp.c b/print-ahcp.c index 280372dadbfb1..a9ae38a972334 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)); } - |