1
2/*
3 * ng_ksocket.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and
--- 22 unchanged lines hidden (view full) ---
31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * Author: Archie Cobbs <archie@freebsd.org>
38 *
39 * $FreeBSD: head/sys/netgraph/ng_ksocket.c 88739 2001-12-31 17:45:16Z rwatson $
40 * $Whistle: ng_ksocket.c,v 1.1 1999/11/16 20:04:40 archie Exp $
41 */
42
43/*
44 * Kernel socket node type. This node type is basically a kernel-mode
45 * version of a socket... kindof like the reverse of the socket node type.
46 */
47
--- 533 unchanged lines hidden (view full) ---
581 if (type == -1)
582 return (EINVAL);
583 s1 = s2;
584 protocol = ng_ksocket_parse(ng_ksocket_protos, s1, family);
585 if (protocol == -1)
586 return (EINVAL);
587
588 /* Create the socket */
589 error = socreate(family, &priv->so, type, protocol,
590 td->td_proc->p_ucred, td);
591 if (error != 0)
592 return (error);
593
594 /* XXX call soreserve() ? */
595
596 }
597
598 /* OK */
--- 686 unchanged lines hidden ---
2/*
3 * ng_ksocket.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and
--- 22 unchanged lines hidden (view full) ---
31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * Author: Archie Cobbs <archie@freebsd.org>
38 *
39 * $FreeBSD: head/sys/netgraph/ng_ksocket.c 88739 2001-12-31 17:45:16Z rwatson $
40 * $Whistle: ng_ksocket.c,v 1.1 1999/11/16 20:04:40 archie Exp $
41 */
42
43/*
44 * Kernel socket node type. This node type is basically a kernel-mode
45 * version of a socket... kindof like the reverse of the socket node type.
46 */
47
--- 533 unchanged lines hidden (view full) ---
581 if (type == -1)
582 return (EINVAL);
583 s1 = s2;
584 protocol = ng_ksocket_parse(ng_ksocket_protos, s1, family);
585 if (protocol == -1)
586 return (EINVAL);
587
588 /* Create the socket */
589 error = socreate(family, &priv->so, type, protocol,
590 td->td_proc->p_ucred, td);
591 if (error != 0)
592 return (error);
593
594 /* XXX call soreserve() ? */
595
596 }
597
598 /* OK */
--- 686 unchanged lines hidden ---