xref: /freebsd/sys/netinet6/raw_ip6.h (revision 2ff63af9b88c7413b7d71715b5532625752a248e)
1caf43b02SWarner Losh /*-
2*51369649SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
3*51369649SPedro F. Giffuni  *
433841545SHajimu UMEMOTO  * Copyright (C) 2001 WIDE Project.
533841545SHajimu UMEMOTO  * All rights reserved.
633841545SHajimu UMEMOTO  *
733841545SHajimu UMEMOTO  * Redistribution and use in source and binary forms, with or without
833841545SHajimu UMEMOTO  * modification, are permitted provided that the following conditions
933841545SHajimu UMEMOTO  * are met:
1033841545SHajimu UMEMOTO  * 1. Redistributions of source code must retain the above copyright
1133841545SHajimu UMEMOTO  *    notice, this list of conditions and the following disclaimer.
1233841545SHajimu UMEMOTO  * 2. Redistributions in binary form must reproduce the above copyright
1333841545SHajimu UMEMOTO  *    notice, this list of conditions and the following disclaimer in the
1433841545SHajimu UMEMOTO  *    documentation and/or other materials provided with the distribution.
1533841545SHajimu UMEMOTO  * 3. Neither the name of the project nor the names of its contributors
1633841545SHajimu UMEMOTO  *    may be used to endorse or promote products derived from this software
1733841545SHajimu UMEMOTO  *    without specific prior written permission.
1833841545SHajimu UMEMOTO  *
1933841545SHajimu UMEMOTO  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
2033841545SHajimu UMEMOTO  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2133841545SHajimu UMEMOTO  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2233841545SHajimu UMEMOTO  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
2333841545SHajimu UMEMOTO  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2433841545SHajimu UMEMOTO  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2533841545SHajimu UMEMOTO  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2633841545SHajimu UMEMOTO  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2733841545SHajimu UMEMOTO  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2833841545SHajimu UMEMOTO  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2933841545SHajimu UMEMOTO  * SUCH DAMAGE.
30b48287a3SDavid E. O'Brien  *
31b48287a3SDavid E. O'Brien  *	$KAME: raw_ip6.h,v 1.2 2001/05/27 13:28:35 itojun Exp $
3233841545SHajimu UMEMOTO  */
3333841545SHajimu UMEMOTO 
3433841545SHajimu UMEMOTO #ifndef _NETINET6_RAW_IP6_H_
3533841545SHajimu UMEMOTO #define _NETINET6_RAW_IP6_H_
3633841545SHajimu UMEMOTO 
3733841545SHajimu UMEMOTO /*
3833841545SHajimu UMEMOTO  * ICMPv6 stat is counted separately.  see netinet/icmp6.h
3933841545SHajimu UMEMOTO  */
4033841545SHajimu UMEMOTO struct rip6stat {
41c80211e3SAndrey V. Elsukov 	uint64_t rip6s_ipackets;	/* total input packets */
42c80211e3SAndrey V. Elsukov 	uint64_t rip6s_isum;		/* input checksum computations */
43c80211e3SAndrey V. Elsukov 	uint64_t rip6s_badsum;		/* of above, checksum error */
44c80211e3SAndrey V. Elsukov 	uint64_t rip6s_nosock;		/* no matching socket */
45c80211e3SAndrey V. Elsukov 	uint64_t rip6s_nosockmcast;	/* of above, arrived as multicast */
46c80211e3SAndrey V. Elsukov 	uint64_t rip6s_fullsock;	/* not delivered, input socket full */
4733841545SHajimu UMEMOTO 
48c80211e3SAndrey V. Elsukov 	uint64_t rip6s_opackets;	/* total output packets */
4933841545SHajimu UMEMOTO };
5033841545SHajimu UMEMOTO 
5133841545SHajimu UMEMOTO #ifdef _KERNEL
52a786f679SAndrey V. Elsukov #include <sys/counter.h>
53a786f679SAndrey V. Elsukov 
54a786f679SAndrey V. Elsukov VNET_PCPUSTAT_DECLARE(struct rip6stat, rip6stat);
55a786f679SAndrey V. Elsukov #define	RIP6STAT_ADD(name, val)	\
56a786f679SAndrey V. Elsukov     VNET_PCPUSTAT_ADD(struct rip6stat, rip6stat, name, (val))
57f1d7ebfeSAndrey V. Elsukov #define	RIP6STAT_INC(name)	RIP6STAT_ADD(name, 1)
58a786f679SAndrey V. Elsukov #endif /* _KERNEL */
5933841545SHajimu UMEMOTO 
6033841545SHajimu UMEMOTO #endif
61