Deleted Added
full compact
raw_cb.c (180391) raw_cb.c (181803)
1/*-
2 * Copyright (c) 1980, 1986, 1993
3 * The Regents of the University of California.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * @(#)raw_cb.c 8.1 (Berkeley) 6/10/93
1/*-
2 * Copyright (c) 1980, 1986, 1993
3 * The Regents of the University of California.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 14 unchanged lines hidden (view full) ---

23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * @(#)raw_cb.c 8.1 (Berkeley) 6/10/93
31 * $FreeBSD: head/sys/net/raw_cb.c 180391 2008-07-09 18:41:31Z rwatson $
31 * $FreeBSD: head/sys/net/raw_cb.c 181803 2008-08-17 23:27:27Z bz $
32 */
33
34#include <sys/param.h>
35#include <sys/domain.h>
36#include <sys/lock.h>
37#include <sys/kernel.h>
38#include <sys/malloc.h>
39#include <sys/mutex.h>
40#include <sys/protosw.h>
41#include <sys/socket.h>
42#include <sys/socketvar.h>
43#include <sys/sysctl.h>
44#include <sys/systm.h>
32 */
33
34#include <sys/param.h>
35#include <sys/domain.h>
36#include <sys/lock.h>
37#include <sys/kernel.h>
38#include <sys/malloc.h>
39#include <sys/mutex.h>
40#include <sys/protosw.h>
41#include <sys/socket.h>
42#include <sys/socketvar.h>
43#include <sys/sysctl.h>
44#include <sys/systm.h>
45#include <sys/vimage.h>
45
46#include <net/raw_cb.h>
47
48/*
49 * Routines to manage the raw protocol control blocks.
50 *
51 * TODO:
52 * hash lookups by protocol family/protocol + address family

--- 34 unchanged lines hidden (view full) ---

87
88 error = soreserve(so, raw_sendspace, raw_recvspace);
89 if (error)
90 return (error);
91 rp->rcb_socket = so;
92 rp->rcb_proto.sp_family = so->so_proto->pr_domain->dom_family;
93 rp->rcb_proto.sp_protocol = proto;
94 mtx_lock(&rawcb_mtx);
46
47#include <net/raw_cb.h>
48
49/*
50 * Routines to manage the raw protocol control blocks.
51 *
52 * TODO:
53 * hash lookups by protocol family/protocol + address family

--- 34 unchanged lines hidden (view full) ---

88
89 error = soreserve(so, raw_sendspace, raw_recvspace);
90 if (error)
91 return (error);
92 rp->rcb_socket = so;
93 rp->rcb_proto.sp_family = so->so_proto->pr_domain->dom_family;
94 rp->rcb_proto.sp_protocol = proto;
95 mtx_lock(&rawcb_mtx);
95 LIST_INSERT_HEAD(&rawcb_list, rp, list);
96 LIST_INSERT_HEAD(&V_rawcb_list, rp, list);
96 mtx_unlock(&rawcb_mtx);
97 return (0);
98}
99
100/*
101 * Detach the raw connection block and discard socket resources.
102 */
103void

--- 12 unchanged lines hidden ---
97 mtx_unlock(&rawcb_mtx);
98 return (0);
99}
100
101/*
102 * Detach the raw connection block and discard socket resources.
103 */
104void

--- 12 unchanged lines hidden ---