]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-mobility.c
Add CAP_FCNTL and use cap_fcntls_limit().
[tcpdump] / print-mobility.c
index 7abb9224711bb31e086f0aa597c025077b2ee8d5..83447cff15d4190f904af197f564d013168622a8 100644 (file)
 
 /* Mobility header */
 struct ip6_mobility {
-       u_int8_t ip6m_pproto;   /* following payload protocol (for PG) */
-       u_int8_t ip6m_len;      /* length in units of 8 octets */
-       u_int8_t ip6m_type;     /* message type */
-       u_int8_t reserved;      /* reserved */
-       u_int16_t ip6m_cksum;   /* sum of IPv6 pseudo-header and MH */
+       uint8_t ip6m_pproto;    /* following payload protocol (for PG) */
+       uint8_t ip6m_len;       /* length in units of 8 octets */
+       uint8_t ip6m_type;      /* message type */
+       uint8_t reserved;       /* reserved */
+       uint16_t ip6m_cksum;    /* sum of IPv6 pseudo-header and MH */
        union {
-               u_int16_t       ip6m_un_data16[1]; /* type-specific field */
-               u_int8_t        ip6m_un_data8[2];  /* type-specific fiedl */
+               uint16_t        ip6m_un_data16[1]; /* type-specific field */
+               uint8_t         ip6m_un_data8[2];  /* type-specific field */
        } ip6m_dataun;
 };
 
@@ -131,7 +131,7 @@ mobility_opt_print(netdissect_options *ndo,
                                ND_PRINT((ndo, "(altcoa: trunc)"));
                                goto trunc;
                        }
-                       ND_PRINT((ndo, "(alt-CoA: %s)", ip6addr_string(&bp[i+2])));
+                       ND_PRINT((ndo, "(alt-CoA: %s)", ip6addr_string(ndo, &bp[i+2])));
                        break;
                case IP6MOPT_NONCEID:
                        if (len - i < IP6MOPT_NONCEID_MINLEN) {
@@ -174,7 +174,7 @@ mobility_print(netdissect_options *ndo,
        const struct ip6_mobility *mh;
        const u_char *ep;
        unsigned mhlen, hlen;
-       u_int8_t type;
+       uint8_t type;
 
        mh = (struct ip6_mobility *)bp;
 
@@ -294,7 +294,7 @@ mobility_print(netdissect_options *ndo,
                /* Reserved */
                hlen = IP6M_MINLEN;
                ND_TCHECK2(*mh, hlen + 16);
-               ND_PRINT((ndo, " homeaddr %s", ip6addr_string(&bp[hlen])));
+               ND_PRINT((ndo, " homeaddr %s", ip6addr_string(ndo, &bp[hlen])));
                hlen += 16;
                break;
        default: