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