Deleted Added
full compact
icmp6.c (196019) icmp6.c (196039)
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * 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

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

56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE.
59 *
60 * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94
61 */
62
63#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * 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

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

56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE.
59 *
60 * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94
61 */
62
63#include <sys/cdefs.h>
64__FBSDID("$FreeBSD: head/sys/netinet6/icmp6.c 196019 2009-08-01 19:26:27Z rwatson $");
64__FBSDID("$FreeBSD: head/sys/netinet6/icmp6.c 196039 2009-08-02 19:43:32Z rwatson $");
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
68#include "opt_ipsec.h"
69
70#include <sys/param.h>
71#include <sys/domain.h>
72#include <sys/jail.h>

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

147
148void
149icmp6_init(void)
150{
151
152 V_icmp6errpps_count = 0;
153}
154
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
68#include "opt_ipsec.h"
69
70#include <sys/param.h>
71#include <sys/domain.h>
72#include <sys/jail.h>

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

147
148void
149icmp6_init(void)
150{
151
152 V_icmp6errpps_count = 0;
153}
154
155/*
156 * Kernel module interface for updating icmp6stat. The argument is an index
157 * into icmp6stat treated as an array of u_quad_t. While this encodes the
158 * general layout of icmp6stat into the caller, it doesn't encode its
159 * location, so that future changes to add, for example, per-CPU stats
160 * support won't cause binary compatibility problems for kernel modules.
161 */
162void
163kmod_icmp6stat_inc(int statnum)
164{
165
166 (*((u_quad_t *)&V_icmp6stat + statnum))++;
167}
168
155static void
156icmp6_errcount(struct icmp6errstat *stat, int type, int code)
157{
158 switch (type) {
159 case ICMP6_DST_UNREACH:
160 switch (code) {
161 case ICMP6_DST_UNREACH_NOROUTE:
162 stat->icp6errs_dst_unreach_noroute++;

--- 2684 unchanged lines hidden ---
169static void
170icmp6_errcount(struct icmp6errstat *stat, int type, int code)
171{
172 switch (type) {
173 case ICMP6_DST_UNREACH:
174 switch (code) {
175 case ICMP6_DST_UNREACH_NOROUTE:
176 stat->icp6errs_dst_unreach_noroute++;

--- 2684 unchanged lines hidden ---