Update to FreeBSD head 2019-09-24

Git mirror commit 6b0307a0a5184339393f555d5d424190d8a8277a.
This commit is contained in:
Sebastian Huber
2019-09-24 11:05:03 +02:00
parent 83afe13399
commit a5ddb0ea69
903 changed files with 39332 additions and 17958 deletions

View File

@@ -97,8 +97,10 @@ __FBSDID("$FreeBSD$");
#include "rtems-bsd-netstat-inet-data.h"
#endif /* __rtems__ */
void inetprint(const char *, struct in_addr *, int, const char *, int,
#ifdef INET
static void inetprint(const char *, struct in_addr *, int, const char *, int,
const int);
#endif
#ifdef INET6
static int udp_done, tcp_done, sdp_done;
#endif /* INET6 */
@@ -412,6 +414,7 @@ protopr(u_long off, const char *name, int af1, int proto)
so->so_rcv.sb_cc, so->so_snd.sb_cc);
}
if (numeric_port) {
#ifdef INET
if (inp->inp_vflag & INP_IPV4) {
inetprint("local", &inp->inp_laddr,
(int)inp->inp_lport, name, 1, af1);
@@ -419,8 +422,12 @@ protopr(u_long off, const char *name, int af1, int proto)
inetprint("remote", &inp->inp_faddr,
(int)inp->inp_fport, name, 1, af1);
}
#endif
#if defined(INET) && defined(INET6)
else
#endif
#ifdef INET6
else if (inp->inp_vflag & INP_IPV6) {
if (inp->inp_vflag & INP_IPV6) {
inet6print("local", &inp->in6p_laddr,
(int)inp->inp_lport, name, 1);
if (!Lflag)
@@ -429,6 +436,7 @@ protopr(u_long off, const char *name, int af1, int proto)
} /* else nothing printed now */
#endif /* INET6 */
} else if (inp->inp_flags & INP_ANONPORT) {
#ifdef INET
if (inp->inp_vflag & INP_IPV4) {
inetprint("local", &inp->inp_laddr,
(int)inp->inp_lport, name, 1, af1);
@@ -436,8 +444,12 @@ protopr(u_long off, const char *name, int af1, int proto)
inetprint("remote", &inp->inp_faddr,
(int)inp->inp_fport, name, 0, af1);
}
#endif
#if defined(INET) && defined(INET6)
else
#endif
#ifdef INET6
else if (inp->inp_vflag & INP_IPV6) {
if (inp->inp_vflag & INP_IPV6) {
inet6print("local", &inp->in6p_laddr,
(int)inp->inp_lport, name, 1);
if (!Lflag)
@@ -446,6 +458,7 @@ protopr(u_long off, const char *name, int af1, int proto)
} /* else nothing printed now */
#endif /* INET6 */
} else {
#ifdef INET
if (inp->inp_vflag & INP_IPV4) {
inetprint("local", &inp->inp_laddr,
(int)inp->inp_lport, name, 0, af1);
@@ -455,8 +468,12 @@ protopr(u_long off, const char *name, int af1, int proto)
inp->inp_lport != inp->inp_fport,
af1);
}
#endif
#if defined(INET) && defined(INET6)
else
#endif
#ifdef INET6
else if (inp->inp_vflag & INP_IPV6) {
if (inp->inp_vflag & INP_IPV6) {
inet6print("local", &inp->in6p_laddr,
(int)inp->inp_lport, name, 0);
if (!Lflag)
@@ -1049,6 +1066,7 @@ arp_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
xo_emit("\t" m, (uintmax_t)arpstat.f, pluralies(arpstat.f))
p(txrequests, "{:sent-requests/%ju} {N:/ARP request%s sent}\n");
p(txerrors, "{:sent-failures/%ju} {N:/ARP request%s failed to sent}\n");
p2(txreplies, "{:sent-replies/%ju} {N:/ARP repl%s sent}\n");
p(rxrequests, "{:received-requests/%ju} "
"{N:/ARP request%s received}\n");
@@ -1340,10 +1358,11 @@ pim_stats(u_long off __unused, const char *name, int af1 __unused,
xo_close_container(name);
}
#ifdef INET
/*
* Pretty print an Internet address (net address + port).
*/
void
static void
inetprint(const char *container, struct in_addr *in, int port,
const char *proto, int num_port, const int af1)
{
@@ -1430,3 +1449,4 @@ inetname(struct in_addr *inp)
}
return (line);
}
#endif

View File

@@ -403,6 +403,8 @@ ip6_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
"{N:/fragment%s dropped after timeout}\n");
p(ip6s_fragoverflow, "\t{:dropped-fragments-overflow/%ju} "
"{N:/fragment%s that exceeded limit}\n");
p(ip6s_atomicfrags, "\t{:atomic-fragments/%ju} "
"{N:/atomic fragment%s}\n");
p(ip6s_reassembled, "\t{:reassembled-packets/%ju} "
"{N:/packet%s reassembled ok}\n");
p(ip6s_delivered, "\t{:received-local-packets/%ju} "
@@ -1320,7 +1322,7 @@ inet6print(const char *container, struct in6_addr *in6, int port,
*/
char *
inet6name(struct in6_addr *in6p)
inet6name(struct in6_addr *ia6)
{
struct sockaddr_in6 sin6;
char hbuf[NI_MAXHOST], *cp;
@@ -1329,7 +1331,7 @@ inet6name(struct in6_addr *in6p)
static int first = 1;
int flags, error;
if (IN6_IS_ADDR_UNSPECIFIED(in6p)) {
if (IN6_IS_ADDR_UNSPECIFIED(ia6)) {
strcpy(line, "*");
return (line);
}
@@ -1342,9 +1344,9 @@ inet6name(struct in6_addr *in6p)
domain[0] = 0;
}
memset(&sin6, 0, sizeof(sin6));
memcpy(&sin6.sin6_addr, in6p, sizeof(*in6p));
memcpy(&sin6.sin6_addr, ia6, sizeof(*ia6));
sin6.sin6_family = AF_INET6;
/* XXX: in6p.s6_addr[2] can contain scopeid. */
/* XXX: ia6.s6_addr[2] can contain scopeid. */
in6_fillscopeid(&sin6);
flags = (numeric_addr) ? NI_NUMERICHOST : 0;
error = getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), hbuf,

View File

@@ -137,33 +137,18 @@ static struct val2str ipsec_ahnames[] = {
{ SADB_AALG_NONE, "none", },
{ SADB_AALG_MD5HMAC, "hmac-md5", },
{ SADB_AALG_SHA1HMAC, "hmac-sha1", },
{ SADB_X_AALG_MD5, "md5", },
{ SADB_X_AALG_SHA, "sha", },
{ SADB_X_AALG_MD5, "keyed-md5", },
{ SADB_X_AALG_SHA, "keyed-sha1", },
{ SADB_X_AALG_NULL, "null", },
#ifdef SADB_X_AALG_SHA2_256
{ SADB_X_AALG_SHA2_256, "hmac-sha2-256", },
#endif
#ifdef SADB_X_AALG_SHA2_384
{ SADB_X_AALG_SHA2_384, "hmac-sha2-384", },
#endif
#ifdef SADB_X_AALG_SHA2_512
{ SADB_X_AALG_SHA2_512, "hmac-sha2-512", },
#endif
#ifdef SADB_X_AALG_RIPEMD160HMAC
{ SADB_X_AALG_RIPEMD160HMAC, "hmac-ripemd160", },
#endif
#ifdef SADB_X_AALG_AES_XCBC_MAC
{ SADB_X_AALG_AES_XCBC_MAC, "aes-xcbc-mac", },
#endif
#ifdef SADB_X_AALG_AES128GMAC
{ SADB_X_AALG_TCP_MD5, "tcp-md5", },
{ SADB_X_AALG_AES128GMAC, "aes-gmac-128", },
#endif
#ifdef SADB_X_AALG_AES192GMAC
{ SADB_X_AALG_AES192GMAC, "aes-gmac-192", },
#endif
#ifdef SADB_X_AALG_AES256GMAC
{ SADB_X_AALG_AES256GMAC, "aes-gmac-256", },
#endif
{ -1, NULL },
};
@@ -174,15 +159,11 @@ static struct val2str ipsec_espnames[] = {
{ SADB_EALG_NULL, "null", },
{ SADB_X_EALG_CAST128CBC, "cast128-cbc", },
{ SADB_X_EALG_BLOWFISHCBC, "blowfish-cbc", },
#ifdef SADB_X_EALG_RIJNDAELCBC
{ SADB_X_EALG_RIJNDAELCBC, "rijndael-cbc", },
#endif
#ifdef SADB_X_EALG_AESCTR
{ SADB_X_EALG_CAMELLIACBC, "camellia-cbc", },
{ SADB_X_EALG_AESCTR, "aes-ctr", },
#endif
#ifdef SADB_X_EALG_AESGCM16
{ SADB_X_EALG_AESGCM16, "aes-gcm-16", },
#endif
{ SADB_X_EALG_AESGMAC, "aes-gmac", },
{ -1, NULL },
};

View File

@@ -165,6 +165,7 @@ static struct __vmmeter {
u_int v_free_min;
u_int v_free_count;
u_int v_wire_count;
u_long v_user_wire_count;
u_int v_active_count;
u_int v_inactive_target;
u_int v_inactive_count;
@@ -628,6 +629,7 @@ fill_vmmeter(struct __vmmeter *vmmp)
GET_VM_STATS(vm, v_free_min);
GET_VM_STATS(vm, v_free_count);
GET_VM_STATS(vm, v_wire_count);
GET_VM_STATS(vm, v_user_wire_count);
GET_VM_STATS(vm, v_active_count);
GET_VM_STATS(vm, v_inactive_target);
GET_VM_STATS(vm, v_inactive_count);
@@ -1119,6 +1121,8 @@ dosum(void)
sum.v_laundry_count);
xo_emit("{:wired-pages/%9u} {N:pages wired down}\n",
sum.v_wire_count);
xo_emit("{:virtual-user-wired-pages/%9lu} {N:virtual user pages wired "
"down}\n", sum.v_user_wire_count);
xo_emit("{:free-pages/%9u} {N:pages free}\n",
sum.v_free_count);
xo_emit("{:bytes-per-page/%9u} {N:bytes per page}\n", sum.v_page_size);
@@ -1549,9 +1553,9 @@ domemstat_zone(void)
#endif /* __rtems__ */
}
xo_open_container("memory-zone-statistics");
xo_emit("{T:/%-20s} {T:/%6s} {T:/%6s} {T:/%8s} {T:/%8s} {T:/%8s} "
xo_emit("{T:/%-20s} {T:/%6s} {T:/%6s} {T:/%8s} {T:/%8s} {T:/%8s} {T:/%8s}"
"{T:/%4s} {T:/%4s}\n\n", "ITEM", "SIZE",
"LIMIT", "USED", "FREE", "REQ", "FAIL", "SLEEP");
"LIMIT", "USED", "FREE", "REQ", "FAIL", "SLEEP", "XDOMAIN");
xo_open_list("zone");
for (mtp = memstat_mtl_first(mtlp); mtp != NULL;
mtp = memstat_mtl_next(mtp)) {
@@ -1561,7 +1565,7 @@ domemstat_zone(void)
xo_emit("{d:name/%-20s}{ke:name/%s} {:size/%6ju}, "
"{:limit/%6ju},{:used/%8ju},"
"{:free/%8ju},{:requests/%8ju},"
"{:fail/%4ju},{:sleep/%4ju}\n", name,
"{:fail/%4ju},{:sleep/%4ju},{:xdomain/%4ju}\n", name,
memstat_get_name(mtp),
(uintmax_t)memstat_get_size(mtp),
(uintmax_t)memstat_get_countlimit(mtp),
@@ -1569,7 +1573,8 @@ domemstat_zone(void)
(uintmax_t)memstat_get_free(mtp),
(uintmax_t)memstat_get_numallocs(mtp),
(uintmax_t)memstat_get_failures(mtp),
(uintmax_t)memstat_get_sleeps(mtp));
(uintmax_t)memstat_get_sleeps(mtp),
(uintmax_t)memstat_get_xdomain(mtp));
xo_close_instance("zone");
}
memstat_mtl_free(mtlp);