Deleted Added
full compact
92c92
< __FBSDID("$FreeBSD: head/usr.bin/netstat/ipsec.c 216370 2010-12-11 08:32:16Z joel $");
---
> __FBSDID("$FreeBSD: head/usr.bin/netstat/ipsec.c 253081 2013-07-09 09:32:06Z ae $");
277c277
< static void ipsec_hist_new(const u_int32_t *hist, size_t histmax,
---
> static void ipsec_hist_new(const uint64_t *hist, size_t histmax,
287c287
< ipsec_hist_new(const u_int32_t *hist, size_t histmax,
---
> ipsec_hist_new(const uint64_t *hist, size_t histmax,
307c307,308
< printf("\t\t%s: %u\n", p->str, hist[proto]);
---
> printf("\t\t%s: %ju\n", p->str,
> (uintmax_t)hist[proto]);
309,310c310,311
< printf("\t\t#%lu: %u\n", (unsigned long)proto,
< hist[proto]);
---
> printf("\t\t#%lu: %ju\n", (unsigned long)proto,
> (uintmax_t)hist[proto]);
318,320c319
< #define p32(f, m) if (ahstat->f || sflag <= 1) \
< printf("\t%u" m, (unsigned int)ahstat->f, plural(ahstat->f))
< #define p64(f, m) if (ahstat->f || sflag <= 1) \
---
> #define p(f, m) if (ahstat->f || sflag <= 1) \
325,343c324,342
< p32(ahs_hdrops, " packet%s shorter than header shows\n");
< p32(ahs_nopf, " packet%s dropped; protocol family not supported\n");
< p32(ahs_notdb, " packet%s dropped; no TDB\n");
< p32(ahs_badkcr, " packet%s dropped; bad KCR\n");
< p32(ahs_qfull, " packet%s dropped; queue full\n");
< p32(ahs_noxform, " packet%s dropped; no transform\n");
< p32(ahs_wrap, " replay counter wrap%s\n");
< p32(ahs_badauth, " packet%s dropped; bad authentication detected\n");
< p32(ahs_badauthl, " packet%s dropped; bad authentication length\n");
< p32(ahs_replay, " possible replay packet%s detected\n");
< p32(ahs_input, " packet%s in\n");
< p32(ahs_output, " packet%s out\n");
< p32(ahs_invalid, " packet%s dropped; invalid TDB\n");
< p64(ahs_ibytes, " byte%s in\n");
< p64(ahs_obytes, " byte%s out\n");
< p32(ahs_toobig, " packet%s dropped; larger than IP_MAXPACKET\n");
< p32(ahs_pdrops, " packet%s blocked due to policy\n");
< p32(ahs_crypto, " crypto processing failure%s\n");
< p32(ahs_tunnel, " tunnel sanity check failure%s\n");
---
> p(ahs_hdrops, " packet%s shorter than header shows\n");
> p(ahs_nopf, " packet%s dropped; protocol family not supported\n");
> p(ahs_notdb, " packet%s dropped; no TDB\n");
> p(ahs_badkcr, " packet%s dropped; bad KCR\n");
> p(ahs_qfull, " packet%s dropped; queue full\n");
> p(ahs_noxform, " packet%s dropped; no transform\n");
> p(ahs_wrap, " replay counter wrap%s\n");
> p(ahs_badauth, " packet%s dropped; bad authentication detected\n");
> p(ahs_badauthl, " packet%s dropped; bad authentication length\n");
> p(ahs_replay, " possible replay packet%s detected\n");
> p(ahs_input, " packet%s in\n");
> p(ahs_output, " packet%s out\n");
> p(ahs_invalid, " packet%s dropped; invalid TDB\n");
> p(ahs_ibytes, " byte%s in\n");
> p(ahs_obytes, " byte%s out\n");
> p(ahs_toobig, " packet%s dropped; larger than IP_MAXPACKET\n");
> p(ahs_pdrops, " packet%s blocked due to policy\n");
> p(ahs_crypto, " crypto processing failure%s\n");
> p(ahs_tunnel, " tunnel sanity check failure%s\n");
346,347c345
< #undef p32
< #undef p64
---
> #undef p
367,369c365
< #define p32(f, m) if (espstat->f || sflag <= 1) \
< printf("\t%u" m, (unsigned int)espstat->f, plural(espstat->f))
< #define p64(f, m) if (espstat->f || sflag <= 1) \
---
> #define p(f, m) if (espstat->f || sflag <= 1) \
374,393c370,389
< p32(esps_hdrops, " packet%s shorter than header shows\n");
< p32(esps_nopf, " packet%s dropped; protocol family not supported\n");
< p32(esps_notdb, " packet%s dropped; no TDB\n");
< p32(esps_badkcr, " packet%s dropped; bad KCR\n");
< p32(esps_qfull, " packet%s dropped; queue full\n");
< p32(esps_noxform, " packet%s dropped; no transform\n");
< p32(esps_badilen, " packet%s dropped; bad ilen\n");
< p32(esps_wrap, " replay counter wrap%s\n");
< p32(esps_badenc, " packet%s dropped; bad encryption detected\n");
< p32(esps_badauth, " packet%s dropped; bad authentication detected\n");
< p32(esps_replay, " possible replay packet%s detected\n");
< p32(esps_input, " packet%s in\n");
< p32(esps_output, " packet%s out\n");
< p32(esps_invalid, " packet%s dropped; invalid TDB\n");
< p64(esps_ibytes, " byte%s in\n");
< p64(esps_obytes, " byte%s out\n");
< p32(esps_toobig, " packet%s dropped; larger than IP_MAXPACKET\n");
< p32(esps_pdrops, " packet%s blocked due to policy\n");
< p32(esps_crypto, " crypto processing failure%s\n");
< p32(esps_tunnel, " tunnel sanity check failure%s\n");
---
> p(esps_hdrops, " packet%s shorter than header shows\n");
> p(esps_nopf, " packet%s dropped; protocol family not supported\n");
> p(esps_notdb, " packet%s dropped; no TDB\n");
> p(esps_badkcr, " packet%s dropped; bad KCR\n");
> p(esps_qfull, " packet%s dropped; queue full\n");
> p(esps_noxform, " packet%s dropped; no transform\n");
> p(esps_badilen, " packet%s dropped; bad ilen\n");
> p(esps_wrap, " replay counter wrap%s\n");
> p(esps_badenc, " packet%s dropped; bad encryption detected\n");
> p(esps_badauth, " packet%s dropped; bad authentication detected\n");
> p(esps_replay, " possible replay packet%s detected\n");
> p(esps_input, " packet%s in\n");
> p(esps_output, " packet%s out\n");
> p(esps_invalid, " packet%s dropped; invalid TDB\n");
> p(esps_ibytes, " byte%s in\n");
> p(esps_obytes, " byte%s out\n");
> p(esps_toobig, " packet%s dropped; larger than IP_MAXPACKET\n");
> p(esps_pdrops, " packet%s blocked due to policy\n");
> p(esps_crypto, " crypto processing failure%s\n");
> p(esps_tunnel, " tunnel sanity check failure%s\n");
396,397c392
< #undef p32
< #undef p64
---
> #undef p
417,420c412
< uint32_t version;
< #define p32(f, m) if (ipcompstat->f || sflag <= 1) \
< printf("\t%u" m, (unsigned int)ipcompstat->f, plural(ipcompstat->f))
< #define p64(f, m) if (ipcompstat->f || sflag <= 1) \
---
> #define p(f, m) if (ipcompstat->f || sflag <= 1) \
425,444c417,431
< #ifndef IPCOMPSTAT_VERSION
< version = 0;
< #else
< version = ipcompstat->version;
< #endif
< p32(ipcomps_hdrops, " packet%s shorter than header shows\n");
< p32(ipcomps_nopf, " packet%s dropped; protocol family not supported\n");
< p32(ipcomps_notdb, " packet%s dropped; no TDB\n");
< p32(ipcomps_badkcr, " packet%s dropped; bad KCR\n");
< p32(ipcomps_qfull, " packet%s dropped; queue full\n");
< p32(ipcomps_noxform, " packet%s dropped; no transform\n");
< p32(ipcomps_wrap, " replay counter wrap%s\n");
< p32(ipcomps_input, " packet%s in\n");
< p32(ipcomps_output, " packet%s out\n");
< p32(ipcomps_invalid, " packet%s dropped; invalid TDB\n");
< p64(ipcomps_ibytes, " byte%s in\n");
< p64(ipcomps_obytes, " byte%s out\n");
< p32(ipcomps_toobig, " packet%s dropped; larger than IP_MAXPACKET\n");
< p32(ipcomps_pdrops, " packet%s blocked due to policy\n");
< p32(ipcomps_crypto, " crypto processing failure%s\n");
---
> p(ipcomps_hdrops, " packet%s shorter than header shows\n");
> p(ipcomps_nopf, " packet%s dropped; protocol family not supported\n");
> p(ipcomps_notdb, " packet%s dropped; no TDB\n");
> p(ipcomps_badkcr, " packet%s dropped; bad KCR\n");
> p(ipcomps_qfull, " packet%s dropped; queue full\n");
> p(ipcomps_noxform, " packet%s dropped; no transform\n");
> p(ipcomps_wrap, " replay counter wrap%s\n");
> p(ipcomps_input, " packet%s in\n");
> p(ipcomps_output, " packet%s out\n");
> p(ipcomps_invalid, " packet%s dropped; invalid TDB\n");
> p(ipcomps_ibytes, " byte%s in\n");
> p(ipcomps_obytes, " byte%s out\n");
> p(ipcomps_toobig, " packet%s dropped; larger than IP_MAXPACKET\n");
> p(ipcomps_pdrops, " packet%s blocked due to policy\n");
> p(ipcomps_crypto, " crypto processing failure%s\n");
446,449c433,434
< if (version >= 1) {
< p32(ipcomps_threshold, " packet%s sent uncompressed; size < compr. algo. threshold\n");
< p32(ipcomps_uncompr, " packet%s sent uncompressed; compression was useless\n");
< }
---
> p(ipcomps_threshold, " packet%s sent uncompressed; size < compr. algo. threshold\n");
> p(ipcomps_uncompr, " packet%s sent uncompressed; compression was useless\n");
451,452c436
< #undef p32
< #undef p64
---
> #undef p