raw_ip.c (c3229e05a368643ab2e7e7c210b40586d041ba04) raw_ip.c (3d4d47f39858441d8b8625898e74563f7b60e2b5)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95
34 * $Id: raw_ip.c,v 1.50 1997/12/18 09:13:39 davidg Exp $
34 * $Id: raw_ip.c,v 1.51 1998/01/27 09:15:07 davidg Exp $
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/malloc.h>
41#include <sys/mbuf.h>
42#include <sys/proc.h>
43#include <sys/protosw.h>
44#include <sys/socket.h>
45#include <sys/socketvar.h>
46#include <sys/sysctl.h>
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/malloc.h>
41#include <sys/mbuf.h>
42#include <sys/proc.h>
43#include <sys/protosw.h>
44#include <sys/socket.h>
45#include <sys/socketvar.h>
46#include <sys/sysctl.h>
47#include <vm/vm_zone.h>
47
48#include <net/if.h>
49#include <net/route.h>
50
51#define _IP_VHL
52#include <netinet/in.h>
53#include <netinet/in_systm.h>
54#include <netinet/ip.h>

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

89 ripcbinfo.listhead = &ripcb;
90 /*
91 * XXX We don't use the hash list for raw IP, but it's easier
92 * to allocate a one entry hash list than it is to check all
93 * over the place for hashbase == NULL.
94 */
95 ripcbinfo.hashbase = hashinit(1, M_PCB, &ripcbinfo.hashmask);
96 ripcbinfo.porthashbase = hashinit(1, M_PCB, &ripcbinfo.porthashmask);
48
49#include <net/if.h>
50#include <net/route.h>
51
52#define _IP_VHL
53#include <netinet/in.h>
54#include <netinet/in_systm.h>
55#include <netinet/ip.h>

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

90 ripcbinfo.listhead = &ripcb;
91 /*
92 * XXX We don't use the hash list for raw IP, but it's easier
93 * to allocate a one entry hash list than it is to check all
94 * over the place for hashbase == NULL.
95 */
96 ripcbinfo.hashbase = hashinit(1, M_PCB, &ripcbinfo.hashmask);
97 ripcbinfo.porthashbase = hashinit(1, M_PCB, &ripcbinfo.porthashmask);
98 ripcbinfo.ipi_zone = zinit("ripcb", sizeof(struct inpcb),
99 nmbclusters/4, ZONE_INTERRUPT, 0);
97}
98
99static struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };
100/*
101 * Setup generic address and protocol structures
102 * for raw_input routine, then pass them along with
103 * mbuf chain.
104 */

--- 416 unchanged lines hidden ---
100}
101
102static struct sockaddr_in ripsrc = { sizeof(ripsrc), AF_INET };
103/*
104 * Setup generic address and protocol structures
105 * for raw_input routine, then pass them along with
106 * mbuf chain.
107 */

--- 416 unchanged lines hidden ---