mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 10:06:07 +08:00
Update to FreeBSD head 2017-12-01
Git mirror commit e724f51f811a4b2bd29447f8b85ab5c2f9b88266. Update #3472.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
*
|
||||
* Copyright (c) 2005 Christian S.J. Peron
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 2013 Gleb Smirnoff <glebius@FreeBSD.org>
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/domain.h>
|
||||
#include <sys/protosw.h>
|
||||
#include <sys/socket.h>
|
||||
#define _WANT_SOCKET
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@@ -184,7 +185,7 @@ sotoxsocket(struct socket *so, struct xsocket *xso)
|
||||
xso->xso_family = domain.dom_family;
|
||||
xso->so_timeo = so->so_timeo;
|
||||
xso->so_error = so->so_error;
|
||||
if (SOLISTENING(so)) {
|
||||
if ((so->so_options & SO_ACCEPTCONN) != 0) {
|
||||
xso->so_qlen = so->sol_qlen;
|
||||
xso->so_incqlen = so->sol_incqlen;
|
||||
xso->so_qlimit = so->sol_qlimit;
|
||||
|
@@ -6,6 +6,8 @@
|
||||
|
||||
/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@@ -7,6 +7,8 @@
|
||||
/* $KAME: ipsec.c,v 1.33 2003/07/25 09:54:32 itojun Exp $ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 2005 NTT Multimedia Communications Laboratories, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
* Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-4-Clause
|
||||
*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
* The Regents of the University of California.
|
||||
* Copyright (c) 2005 Robert N. M. Watson
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-4-Clause
|
||||
*
|
||||
* Copyright (c) 1989 Stephen Deering
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-4-Clause AND BSD-3-Clause
|
||||
*
|
||||
* Copyright (C) 1998 WIDE Project.
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@@ -1,4 +1,6 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 1992, 1993
|
||||
* Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@@ -7,6 +7,8 @@
|
||||
/* $NetBSD: inet.c,v 1.35.2.1 1999/04/29 14:57:08 perry Exp $ */
|
||||
/* $KAME: ipsec.c,v 1.25 2001/03/12 09:04:39 itojun Exp $ */
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 2001-2007, by Weongyo Jeong. All rights reserved.
|
||||
* Copyright (c) 2011, by Michael Tuexen. All rights reserved.
|
||||
*
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Copyright (c) 1983, 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
@@ -52,10 +54,12 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/queue.h>
|
||||
#include <sys/protosw.h>
|
||||
#include <sys/socket.h>
|
||||
#define _WANT_SOCKET
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/un.h>
|
||||
#define _WANT_UNPCB
|
||||
#include <sys/unpcb.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
@@ -113,7 +117,7 @@ static int
|
||||
pcblist_kvm(u_long count_off, u_long gencnt_off, u_long head_off, char **bufp)
|
||||
{
|
||||
struct unp_head head;
|
||||
struct unpcb *unp, unp_conn;
|
||||
struct unpcb *unp, unp0, unp_conn;
|
||||
u_char sun_len;
|
||||
struct socket so;
|
||||
struct xunpgen xug;
|
||||
@@ -163,8 +167,8 @@ pcblist_kvm(u_long count_off, u_long gencnt_off, u_long head_off, char **bufp)
|
||||
KREAD(head_off, &head, sizeof(head));
|
||||
LIST_FOREACH(unp, &head, unp_link) {
|
||||
xu.xu_unpp = unp;
|
||||
KREAD(unp, &xu.xu_unp, sizeof (*unp));
|
||||
unp = &xu.xu_unp;
|
||||
KREAD(unp, &unp0, sizeof (*unp));
|
||||
unp = &unp0;
|
||||
|
||||
if (unp->unp_gencnt > unp_gencnt)
|
||||
continue;
|
||||
@@ -251,7 +255,7 @@ unixpr(u_long count_off, u_long gencnt_off, u_long dhead_off, u_long shead_off,
|
||||
so = &xunp->xu_socket;
|
||||
|
||||
/* Ignore PCBs which were freed during copyout. */
|
||||
if (xunp->xu_unp.unp_gencnt > oxug->xug_gen)
|
||||
if (xunp->unp_gencnt > oxug->xug_gen)
|
||||
continue;
|
||||
if (*first) {
|
||||
xo_open_list("socket");
|
||||
@@ -285,7 +289,6 @@ unixpr(u_long count_off, u_long gencnt_off, u_long dhead_off, u_long shead_off,
|
||||
static void
|
||||
unixdomainpr(struct xunpcb *xunp, struct xsocket *so)
|
||||
{
|
||||
struct unpcb *unp;
|
||||
struct sockaddr_un *sa;
|
||||
static int first = 1;
|
||||
char buf1[33];
|
||||
@@ -309,11 +312,7 @@ unixdomainpr(struct xunpcb *xunp, struct xsocket *so)
|
||||
};
|
||||
int fmt = (sizeof(void *) == 8) ? 1 : 0;
|
||||
|
||||
unp = &xunp->xu_unp;
|
||||
if (unp->unp_addr)
|
||||
sa = &xunp->xu_addr;
|
||||
else
|
||||
sa = (struct sockaddr_un *)0;
|
||||
sa = (xunp->xu_addr.sun_family == AF_UNIX) ? &xunp->xu_addr : NULL;
|
||||
|
||||
if (first && !Lflag) {
|
||||
xo_emit("{T:Active UNIX domain sockets}\n");
|
||||
@@ -335,10 +334,9 @@ unixdomainpr(struct xunpcb *xunp, struct xsocket *so)
|
||||
} else {
|
||||
xo_emit(format[fmt],
|
||||
(long)so->so_pcb, socktype[so->so_type], so->so_rcv.sb_cc,
|
||||
so->so_snd.sb_cc, (long)unp->unp_vnode,
|
||||
(long)unp->unp_conn,
|
||||
(long)LIST_FIRST(&unp->unp_refs),
|
||||
(long)LIST_NEXT(unp, unp_reflink));
|
||||
so->so_snd.sb_cc, (long)xunp->unp_vnode,
|
||||
(long)xunp->unp_conn, (long)xunp->xu_firstref,
|
||||
(long)xunp->xu_nextref);
|
||||
}
|
||||
if (sa)
|
||||
xo_emit(" {:path/%.*s}",
|
||||
|
Reference in New Issue
Block a user