]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-atalk.c
Add CAP_FCNTL and use cap_fcntls_limit().
[tcpdump] / print-atalk.c
index 00f9dac4a7c55e4c01ee3cea499de0075aa71c25..61405493d0ea3685ab2ecf4afa3b85fb3a80aa97 100644 (file)
@@ -50,13 +50,13 @@ static const struct tok type2str[] = {
 };
 
 struct aarp {
-       u_int16_t       htype, ptype;
-       u_int8_t        halen, palen;
-       u_int16_t       op;
-       u_int8_t        hsaddr[6];
-       u_int8_t        psaddr[4];
-       u_int8_t        hdaddr[6];
-       u_int8_t        pdaddr[4];
+       uint16_t        htype, ptype;
+       uint8_t         halen, palen;
+       uint16_t        op;
+       uint8_t         hsaddr[6];
+       uint8_t         psaddr[4];
+       uint8_t         hdaddr[6];
+       uint8_t         pdaddr[4];
 };
 
 static void atp_print(netdissect_options *, const struct atATP *, u_int);
@@ -204,7 +204,7 @@ aarp_print(netdissect_options *ndo,
                        return;
 
                case 2:                         /* response */
-                       ND_PRINT((ndo, "reply %s is-at %s", AT(psaddr), etheraddr_string(ap->hsaddr)));
+                       ND_PRINT((ndo, "reply %s is-at %s", AT(psaddr), etheraddr_string(ndo, ap->hsaddr)));
                        return;
 
                case 3:                         /* probe (oy!) */
@@ -250,11 +250,11 @@ atp_print(netdissect_options *ndo,
           register const struct atATP *ap, u_int length)
 {
        char c;
-       u_int32_t data;
+       uint32_t data;
 
        if ((const u_char *)(ap + 1) > ndo->ndo_snapend) {
                /* Just bail if we don't have the whole chunk. */
-               ND_PRINT((ndo, tstr));
+               ND_PRINT((ndo, "%s", tstr));
                return;
        }
        if (length < sizeof(*ap)) {
@@ -398,7 +398,7 @@ nbp_print(netdissect_options *ndo,
        /* ep points to end of available data */
        ep = ndo->ndo_snapend;
        if ((const u_char *)tp > ep) {
-               ND_PRINT((ndo, tstr));
+               ND_PRINT((ndo, "%s", tstr));
                return;
        }
        switch (i = np->control & 0xf0) {
@@ -407,7 +407,7 @@ nbp_print(netdissect_options *ndo,
        case nbpLkUp:
                ND_PRINT((ndo, i == nbpLkUp? " nbp-lkup %d:":" nbp-brRq %d:", np->id));
                if ((const u_char *)(tp + 1) > ep) {
-                       ND_PRINT((ndo, tstr));
+                       ND_PRINT((ndo, "%s", tstr));
                        return;
                }
                (void)nbp_name_print(ndo, tp, ep);
@@ -449,7 +449,7 @@ print_cstring(netdissect_options *ndo,
        register u_int length;
 
        if (cp >= (const char *)ep) {
-               ND_PRINT((ndo, tstr));
+               ND_PRINT((ndo, "%s", tstr));
                return (0);
        }
        length = *cp++;
@@ -461,7 +461,7 @@ print_cstring(netdissect_options *ndo,
        }
        while ((int)--length >= 0) {
                if (cp >= (const char *)ep) {
-                       ND_PRINT((ndo, tstr));
+                       ND_PRINT((ndo, "%s", tstr));
                        return (0);
                }
                ND_PRINT((ndo, "%c", *cp++));
@@ -477,7 +477,7 @@ nbp_tuple_print(netdissect_options *ndo,
        register const struct atNBPtuple *tpn;
 
        if ((const u_char *)(tp + 1) > ep) {
-               ND_PRINT((ndo, tstr));
+               ND_PRINT((ndo, "%s", tstr));
                return 0;
        }
        tpn = nbp_name_print(ndo, tp, ep);