1*ca915d33Sroot /*-
2*ca915d33Sroot  * Copyright (C) 2001 WIDE Project.
3*ca915d33Sroot  * All rights reserved.
4*ca915d33Sroot  *
5*ca915d33Sroot  * Redistribution and use in source and binary forms, with or without
6*ca915d33Sroot  * modification, are permitted provided that the following conditions
7*ca915d33Sroot  * are met:
8*ca915d33Sroot  * 1. Redistributions of source code must retain the above copyright
9*ca915d33Sroot  *    notice, this list of conditions and the following disclaimer.
10*ca915d33Sroot  * 2. Redistributions in binary form must reproduce the above copyright
11*ca915d33Sroot  *    notice, this list of conditions and the following disclaimer in the
12*ca915d33Sroot  *    documentation and/or other materials provided with the distribution.
13*ca915d33Sroot  * 3. Neither the name of the project nor the names of its contributors
14*ca915d33Sroot  *    may be used to endorse or promote products derived from this software
15*ca915d33Sroot  *    without specific prior written permission.
16*ca915d33Sroot  *
17*ca915d33Sroot  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
18*ca915d33Sroot  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19*ca915d33Sroot  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20*ca915d33Sroot  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
21*ca915d33Sroot  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22*ca915d33Sroot  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23*ca915d33Sroot  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24*ca915d33Sroot  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25*ca915d33Sroot  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26*ca915d33Sroot  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27*ca915d33Sroot  * SUCH DAMAGE.
28*ca915d33Sroot  *
29*ca915d33Sroot  *	$KAME: raw_ip6.h,v 1.2 2001/05/27 13:28:35 itojun Exp $
30*ca915d33Sroot  * $FreeBSD$
31*ca915d33Sroot  */
32*ca915d33Sroot 
33*ca915d33Sroot #ifndef _NETINET6_RAW_IP6_H_
34*ca915d33Sroot #define _NETINET6_RAW_IP6_H_
35*ca915d33Sroot 
36*ca915d33Sroot /*
37*ca915d33Sroot  * ICMPv6 stat is counted separately.  see netinet/icmp6.h
38*ca915d33Sroot  */
39*ca915d33Sroot struct rip6stat {
40*ca915d33Sroot 	uint64_t rip6s_ipackets;	/* total input packets */
41*ca915d33Sroot 	uint64_t rip6s_isum;		/* input checksum computations */
42*ca915d33Sroot 	uint64_t rip6s_badsum;		/* of above, checksum error */
43*ca915d33Sroot 	uint64_t rip6s_nosock;		/* no matching socket */
44*ca915d33Sroot 	uint64_t rip6s_nosockmcast;	/* of above, arrived as multicast */
45*ca915d33Sroot 	uint64_t rip6s_fullsock;	/* not delivered, input socket full */
46*ca915d33Sroot 
47*ca915d33Sroot 	uint64_t rip6s_opackets;	/* total output packets */
48*ca915d33Sroot };
49*ca915d33Sroot 
50*ca915d33Sroot #ifdef _KERNEL
51*ca915d33Sroot #include <sys/counter.h>
52*ca915d33Sroot 
53*ca915d33Sroot VNET_PCPUSTAT_DECLARE(struct rip6stat, rip6stat);
54*ca915d33Sroot #define	RIP6STAT_ADD(name, val)	\
55*ca915d33Sroot     VNET_PCPUSTAT_ADD(struct rip6stat, rip6stat, name, (val))
56*ca915d33Sroot #define	RIP6STAT_INC(name)	RIP6STAT_ADD(name, 1)
57*ca915d33Sroot #endif /* _KERNEL */
58*ca915d33Sroot 
59*ca915d33Sroot #endif
60