ip_input.c (249318) | ip_input.c (250300) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> | 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 --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/ip_input.c 249318 2013-04-09 21:02:20Z andre $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/ip_input.c 250300 2013-05-06 16:42:18Z andre $"); |
34 35#include "opt_bootp.h" 36#include "opt_ipfw.h" 37#include "opt_ipstealth.h" 38#include "opt_ipsec.h" 39#include "opt_route.h" 40 41#include <sys/param.h> --- 38 unchanged lines hidden (view full) --- 80#include <sys/socketvar.h> 81 82#include <security/mac/mac_framework.h> 83 84#ifdef CTASSERT 85CTASSERT(sizeof(struct ip) == 20); 86#endif 87 | 34 35#include "opt_bootp.h" 36#include "opt_ipfw.h" 37#include "opt_ipstealth.h" 38#include "opt_ipsec.h" 39#include "opt_route.h" 40 41#include <sys/param.h> --- 38 unchanged lines hidden (view full) --- 80#include <sys/socketvar.h> 81 82#include <security/mac/mac_framework.h> 83 84#ifdef CTASSERT 85CTASSERT(sizeof(struct ip) == 20); 86#endif 87 |
88struct rwlock_padalign in_ifaddr_lock; | 88struct rwlock in_ifaddr_lock; |
89RW_SYSINIT(in_ifaddr_lock, &in_ifaddr_lock, "in_ifaddr_lock"); 90 91VNET_DEFINE(int, rsvp_on); 92 93VNET_DEFINE(int, ipforwarding); 94SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW, 95 &VNET_NAME(ipforwarding), 0, 96 "Enable IP forwarding between interfaces"); --- 53 unchanged lines hidden (view full) --- 150extern struct protosw inetsw[]; 151u_char ip_protox[IPPROTO_MAX]; 152VNET_DEFINE(struct in_ifaddrhead, in_ifaddrhead); /* first inet address */ 153VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ 154VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ 155 156static VNET_DEFINE(uma_zone_t, ipq_zone); 157static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); | 89RW_SYSINIT(in_ifaddr_lock, &in_ifaddr_lock, "in_ifaddr_lock"); 90 91VNET_DEFINE(int, rsvp_on); 92 93VNET_DEFINE(int, ipforwarding); 94SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW, 95 &VNET_NAME(ipforwarding), 0, 96 "Enable IP forwarding between interfaces"); --- 53 unchanged lines hidden (view full) --- 150extern struct protosw inetsw[]; 151u_char ip_protox[IPPROTO_MAX]; 152VNET_DEFINE(struct in_ifaddrhead, in_ifaddrhead); /* first inet address */ 153VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ 154VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ 155 156static VNET_DEFINE(uma_zone_t, ipq_zone); 157static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); |
158static struct mtx_padalign ipqlock; | 158static struct mtx ipqlock; |
159 160#define V_ipq_zone VNET(ipq_zone) 161#define V_ipq VNET(ipq) 162 163#define IPQ_LOCK() mtx_lock(&ipqlock) 164#define IPQ_UNLOCK() mtx_unlock(&ipqlock) 165#define IPQ_LOCK_INIT() mtx_init(&ipqlock, "ipqlock", NULL, MTX_DEF) 166#define IPQ_LOCK_ASSERT() mtx_assert(&ipqlock, MA_OWNED) --- 1653 unchanged lines hidden --- | 159 160#define V_ipq_zone VNET(ipq_zone) 161#define V_ipq VNET(ipq) 162 163#define IPQ_LOCK() mtx_lock(&ipqlock) 164#define IPQ_UNLOCK() mtx_unlock(&ipqlock) 165#define IPQ_LOCK_INIT() mtx_init(&ipqlock, "ipqlock", NULL, MTX_DEF) 166#define IPQ_LOCK_ASSERT() mtx_assert(&ipqlock, MA_OWNED) --- 1653 unchanged lines hidden --- |