Deleted Added
full compact
ip6_var.h (249552) ip6_var.h (253081)
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

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

53 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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_var.h 8.1 (Berkeley) 6/10/93
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

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

53 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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_var.h 8.1 (Berkeley) 6/10/93
61 * $FreeBSD: head/sys/netinet6/ip6_var.h 249552 2013-04-16 16:59:29Z tijl $
61 * $FreeBSD: head/sys/netinet6/ip6_var.h 253081 2013-07-09 09:32:06Z ae $
62 */
63
64#ifndef _NETINET6_IP6_VAR_H_
65#define _NETINET6_IP6_VAR_H_
66
67/*
68 * IP6 reassembly queue structure. Each fragment
69 * being reassembled is attached to one of these structures.

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

176#define IP6PO_USECOA 0x08 /* use care of address */
177};
178
179/*
180 * Control options for incoming packets
181 */
182
183struct ip6stat {
62 */
63
64#ifndef _NETINET6_IP6_VAR_H_
65#define _NETINET6_IP6_VAR_H_
66
67/*
68 * IP6 reassembly queue structure. Each fragment
69 * being reassembled is attached to one of these structures.

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

176#define IP6PO_USECOA 0x08 /* use care of address */
177};
178
179/*
180 * Control options for incoming packets
181 */
182
183struct ip6stat {
184 u_quad_t ip6s_total; /* total packets received */
185 u_quad_t ip6s_tooshort; /* packet too short */
186 u_quad_t ip6s_toosmall; /* not enough data */
187 u_quad_t ip6s_fragments; /* fragments received */
188 u_quad_t ip6s_fragdropped; /* frags dropped(dups, out of space) */
189 u_quad_t ip6s_fragtimeout; /* fragments timed out */
190 u_quad_t ip6s_fragoverflow; /* fragments that exceeded limit */
191 u_quad_t ip6s_forward; /* packets forwarded */
192 u_quad_t ip6s_cantforward; /* packets rcvd for unreachable dest */
193 u_quad_t ip6s_redirectsent; /* packets forwarded on same net */
194 u_quad_t ip6s_delivered; /* datagrams delivered to upper level*/
195 u_quad_t ip6s_localout; /* total ip packets generated here */
196 u_quad_t ip6s_odropped; /* lost packets due to nobufs, etc. */
197 u_quad_t ip6s_reassembled; /* total packets reassembled ok */
198 u_quad_t ip6s_fragmented; /* datagrams successfully fragmented */
199 u_quad_t ip6s_ofragments; /* output fragments created */
200 u_quad_t ip6s_cantfrag; /* don't fragment flag was set, etc. */
201 u_quad_t ip6s_badoptions; /* error in option processing */
202 u_quad_t ip6s_noroute; /* packets discarded due to no route */
203 u_quad_t ip6s_badvers; /* ip6 version != 6 */
204 u_quad_t ip6s_rawout; /* total raw ip packets generated */
205 u_quad_t ip6s_badscope; /* scope error */
206 u_quad_t ip6s_notmember; /* don't join this multicast group */
184 uint64_t ip6s_total; /* total packets received */
185 uint64_t ip6s_tooshort; /* packet too short */
186 uint64_t ip6s_toosmall; /* not enough data */
187 uint64_t ip6s_fragments; /* fragments received */
188 uint64_t ip6s_fragdropped; /* frags dropped(dups, out of space) */
189 uint64_t ip6s_fragtimeout; /* fragments timed out */
190 uint64_t ip6s_fragoverflow; /* fragments that exceeded limit */
191 uint64_t ip6s_forward; /* packets forwarded */
192 uint64_t ip6s_cantforward; /* packets rcvd for unreachable dest */
193 uint64_t ip6s_redirectsent; /* packets forwarded on same net */
194 uint64_t ip6s_delivered; /* datagrams delivered to upper level*/
195 uint64_t ip6s_localout; /* total ip packets generated here */
196 uint64_t ip6s_odropped; /* lost packets due to nobufs, etc. */
197 uint64_t ip6s_reassembled; /* total packets reassembled ok */
198 uint64_t ip6s_fragmented; /* datagrams successfully fragmented */
199 uint64_t ip6s_ofragments; /* output fragments created */
200 uint64_t ip6s_cantfrag; /* don't fragment flag was set, etc. */
201 uint64_t ip6s_badoptions; /* error in option processing */
202 uint64_t ip6s_noroute; /* packets discarded due to no route */
203 uint64_t ip6s_badvers; /* ip6 version != 6 */
204 uint64_t ip6s_rawout; /* total raw ip packets generated */
205 uint64_t ip6s_badscope; /* scope error */
206 uint64_t ip6s_notmember; /* don't join this multicast group */
207#define IP6S_HDRCNT 256 /* headers count */
207#define IP6S_HDRCNT 256 /* headers count */
208 u_quad_t ip6s_nxthist[IP6S_HDRCNT]; /* next header history */
209 u_quad_t ip6s_m1; /* one mbuf */
208 uint64_t ip6s_nxthist[IP6S_HDRCNT]; /* next header history */
209 uint64_t ip6s_m1; /* one mbuf */
210#define IP6S_M2MMAX 32
210#define IP6S_M2MMAX 32
211 u_quad_t ip6s_m2m[IP6S_M2MMAX]; /* two or more mbuf */
212 u_quad_t ip6s_mext1; /* one ext mbuf */
213 u_quad_t ip6s_mext2m; /* two or more ext mbuf */
214 u_quad_t ip6s_exthdrtoolong; /* ext hdr are not contiguous */
215 u_quad_t ip6s_nogif; /* no match gif found */
216 u_quad_t ip6s_toomanyhdr; /* discarded due to too many headers */
211 uint64_t ip6s_m2m[IP6S_M2MMAX]; /* two or more mbuf */
212 uint64_t ip6s_mext1; /* one ext mbuf */
213 uint64_t ip6s_mext2m; /* two or more ext mbuf */
214 uint64_t ip6s_exthdrtoolong; /* ext hdr are not contiguous */
215 uint64_t ip6s_nogif; /* no match gif found */
216 uint64_t ip6s_toomanyhdr; /* discarded due to too many headers */
217
218 /*
219 * statistics for improvement of the source address selection
220 * algorithm:
221 * XXX: hardcoded 16 = # of ip6 multicast scope types + 1
222 */
223#define IP6S_RULESMAX 16
224#define IP6S_SCOPECNT 16
225 /* number of times that address selection fails */
217
218 /*
219 * statistics for improvement of the source address selection
220 * algorithm:
221 * XXX: hardcoded 16 = # of ip6 multicast scope types + 1
222 */
223#define IP6S_RULESMAX 16
224#define IP6S_SCOPECNT 16
225 /* number of times that address selection fails */
226 u_quad_t ip6s_sources_none;
226 uint64_t ip6s_sources_none;
227 /* number of times that an address on the outgoing I/F is chosen */
227 /* number of times that an address on the outgoing I/F is chosen */
228 u_quad_t ip6s_sources_sameif[IP6S_SCOPECNT];
228 uint64_t ip6s_sources_sameif[IP6S_SCOPECNT];
229 /* number of times that an address on a non-outgoing I/F is chosen */
229 /* number of times that an address on a non-outgoing I/F is chosen */
230 u_quad_t ip6s_sources_otherif[IP6S_SCOPECNT];
230 uint64_t ip6s_sources_otherif[IP6S_SCOPECNT];
231 /*
232 * number of times that an address that has the same scope
233 * from the destination is chosen.
234 */
231 /*
232 * number of times that an address that has the same scope
233 * from the destination is chosen.
234 */
235 u_quad_t ip6s_sources_samescope[IP6S_SCOPECNT];
235 uint64_t ip6s_sources_samescope[IP6S_SCOPECNT];
236 /*
237 * number of times that an address that has a different scope
238 * from the destination is chosen.
239 */
236 /*
237 * number of times that an address that has a different scope
238 * from the destination is chosen.
239 */
240 u_quad_t ip6s_sources_otherscope[IP6S_SCOPECNT];
240 uint64_t ip6s_sources_otherscope[IP6S_SCOPECNT];
241 /* number of times that a deprecated address is chosen */
241 /* number of times that a deprecated address is chosen */
242 u_quad_t ip6s_sources_deprecated[IP6S_SCOPECNT];
242 uint64_t ip6s_sources_deprecated[IP6S_SCOPECNT];
243
244 /* number of times that each rule of source selection is applied. */
243
244 /* number of times that each rule of source selection is applied. */
245 u_quad_t ip6s_sources_rule[IP6S_RULESMAX];
245 uint64_t ip6s_sources_rule[IP6S_RULESMAX];
246};
247
248#ifdef _KERNEL
249#define IP6STAT_ADD(name, val) V_ip6stat.name += (val)
250#define IP6STAT_SUB(name, val) V_ip6stat.name -= (val)
251#define IP6STAT_INC(name) IP6STAT_ADD(name, 1)
252#define IP6STAT_DEC(name) IP6STAT_SUB(name, 1)
253#endif

--- 208 unchanged lines hidden ---
246};
247
248#ifdef _KERNEL
249#define IP6STAT_ADD(name, val) V_ip6stat.name += (val)
250#define IP6STAT_SUB(name, val) V_ip6stat.name -= (val)
251#define IP6STAT_INC(name) IP6STAT_ADD(name, 1)
252#define IP6STAT_DEC(name) IP6STAT_SUB(name, 1)
253#endif

--- 208 unchanged lines hidden ---