]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ahcp.c
Do the dump file Capsicum stuff in a common routine.
[tcpdump] / print-ahcp.c
index 280372dadbfb1eb49911da4100d12191e1ce57aa..a9ae38a972334cfafd0302a46cbb67a047d8fb9a 100644 (file)
@@ -100,7 +100,8 @@ static const struct tok ahcp1_opt_str[] = {
 };
 
 static int
 };
 
 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];
        time_t t;
        struct tm *tm;
        char buf[BUFSIZE];
@@ -127,7 +128,8 @@ trunc:
 }
 
 static int
 }
 
 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);
        if (cp + 4 != ep)
                goto corrupt;
        ND_TCHECK2(*cp, 4);
@@ -144,7 +146,8 @@ trunc:
 }
 
 static int
 }
 
 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) {
        const char *sep = ": ";
 
        while (cp < ep) {
@@ -171,7 +174,8 @@ trunc:
 }
 
 static int
 }
 
 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) {
        const char *sep = ": ";
 
        while (cp < ep) {
@@ -194,7 +198,8 @@ trunc:
 }
 
 static int
 }
 
 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) {
        const char *sep = ": ";
 
        while (cp < ep) {
@@ -221,7 +226,8 @@ trunc:
 }
 
 static int
 }
 
 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) {
        const char *sep = ": ";
 
        while (cp < ep) {
@@ -263,7 +269,8 @@ static int
 };
 
 static void
 };
 
 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) {
        uint8_t option_no, option_len;
 
        while (cp < ep) {
@@ -303,7 +310,8 @@ trunc:
 }
 
 static void
 }
 
 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;
 
        uint8_t type, mbz;
        uint16_t body_len;
 
@@ -347,7 +355,8 @@ trunc:
 }
 
 void
 }
 
 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;
 
        const u_char *ep = cp + len;
        uint8_t version;
 
@@ -410,4 +419,3 @@ corrupt:
 trunc:
        ND_PRINT((ndo, "%s", tstr));
 }
 trunc:
        ND_PRINT((ndo, "%s", tstr));
 }
-