ip_icmp.c (196019) | ip_icmp.c (196039) |
---|---|
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_icmp.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_icmp.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/ip_icmp.c 196019 2009-08-01 19:26:27Z rwatson $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/ip_icmp.c 196039 2009-08-02 19:43:32Z rwatson $"); |
34 35#include "opt_ipsec.h" 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/mbuf.h> 40#include <sys/protosw.h> 41#include <sys/socket.h> --- 125 unchanged lines hidden (view full) --- 167 V_icmplim = 200; 168 V_icmplim_output = 1; 169 V_icmp_rfi = 0; 170 V_icmp_quotelen = 8; 171 V_icmpbmcastecho = 0; 172} 173 174/* | 34 35#include "opt_ipsec.h" 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/mbuf.h> 40#include <sys/protosw.h> 41#include <sys/socket.h> --- 125 unchanged lines hidden (view full) --- 167 V_icmplim = 200; 168 V_icmplim_output = 1; 169 V_icmp_rfi = 0; 170 V_icmp_quotelen = 8; 171 V_icmpbmcastecho = 0; 172} 173 174/* |
175 * Kernel module interface for updating icmpstat. The argument is an index 176 * into icmpstat treated as an array of u_long. While this encodes the 177 * general layout of icmpstat into the caller, it doesn't encode its 178 * location, so that future changes to add, for example, per-CPU stats 179 * support won't cause binary compatibility problems for kernel modules. 180 */ 181void 182kmod_icmpstat_inc(int statnum) 183{ 184 185 (*((u_long *)&V_icmpstat + statnum))++; 186} 187 188/* |
|
175 * Generate an error packet of type error 176 * in response to bad packet ip. 177 */ 178void 179icmp_error(struct mbuf *n, int type, int code, uint32_t dest, int mtu) 180{ 181 register struct ip *oip = mtod(n, struct ip *), *nip; 182 register unsigned oiphlen = oip->ip_hl << 2; --- 806 unchanged lines hidden --- | 189 * Generate an error packet of type error 190 * in response to bad packet ip. 191 */ 192void 193icmp_error(struct mbuf *n, int type, int code, uint32_t dest, int mtu) 194{ 195 register struct ip *oip = mtod(n, struct ip *), *nip; 196 register unsigned oiphlen = oip->ip_hl << 2; --- 806 unchanged lines hidden --- |