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