Deleted Added
sdiff udiff text old ( 252026 ) new ( 253084 )
full compact
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
3 * The Regents of the University of California.
4 * Copyright (c) 2008 Robert N. M. Watson
5 * Copyright (c) 2010-2011 Juniper Networks, Inc.
6 * All rights reserved.
7 *
8 * Portions of this software were developed by Robert N. M. Watson under

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

31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/netinet/udp_usrreq.c 252026 2013-06-20 09:55:53Z ae $");
40
41#include "opt_ipfw.h"
42#include "opt_inet.h"
43#include "opt_inet6.h"
44#include "opt_ipsec.h"
45
46#include <sys/param.h>
47#include <sys/domain.h>

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

138VNET_DEFINE(struct inpcbinfo, udbinfo);
139static VNET_DEFINE(uma_zone_t, udpcb_zone);
140#define V_udpcb_zone VNET(udpcb_zone)
141
142#ifndef UDBHASHSIZE
143#define UDBHASHSIZE 128
144#endif
145
146VNET_DEFINE(struct udpstat, udpstat); /* from udp_var.h */
147SYSCTL_VNET_STRUCT(_net_inet_udp, UDPCTL_STATS, stats, CTLFLAG_RW,
148 &VNET_NAME(udpstat), udpstat,
149 "UDP statistics (struct udpstat, netinet/udp_var.h)");
150
151#ifdef INET
152static void udp_detach(struct socket *so);
153static int udp_output(struct inpcb *, struct mbuf *, struct sockaddr *,
154 struct mbuf *, struct thread *);
155#endif
156
157#ifdef IPSEC
158#ifdef IPSEC_NAT_T

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

202 * general layout of udpstat into the caller, it doesn't encode its location,
203 * so that future changes to add, for example, per-CPU stats support won't
204 * cause binary compatibility problems for kernel modules.
205 */
206void
207kmod_udpstat_inc(int statnum)
208{
209
210 (*((u_long *)&V_udpstat + statnum))++;
211}
212
213int
214udp_newudpcb(struct inpcb *inp)
215{
216 struct udpcb *up;
217
218 up = uma_zalloc(V_udpcb_zone, M_NOWAIT | M_ZERO);

--- 1407 unchanged lines hidden ---