Deleted Added
full compact
udp_usrreq.c (252026) udp_usrreq.c (253084)
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>
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 $");
39__FBSDID("$FreeBSD: head/sys/netinet/udp_usrreq.c 253084 2013-07-09 09:50:15Z 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
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)");
146VNET_PCPUSTAT_DEFINE(struct udpstat, udpstat); /* from udp_var.h */
147VNET_PCPUSTAT_SYSINIT(udpstat);
148SYSCTL_VNET_PCPUSTAT(_net_inet_udp, UDPCTL_STATS, stats, struct udpstat,
149 udpstat, "UDP statistics (struct udpstat, netinet/udp_var.h)");
150
150
151#ifdef VIMAGE
152VNET_PCPUSTAT_SYSUNINIT(udpstat);
153#endif /* VIMAGE */
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
154#ifdef INET
155static void udp_detach(struct socket *so);
156static int udp_output(struct inpcb *, struct mbuf *, struct sockaddr *,
157 struct mbuf *, struct thread *);
158#endif
159
160#ifdef IPSEC
161#ifdef IPSEC_NAT_T

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

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

--- 1407 unchanged lines hidden ---