xref: /freebsd/sys/netinet/pim_var.h (revision 59ca77f4a1b6eedd9663d18de38019ef6f2446a8)
159ca77f4SJeffrey Hsu /*
259ca77f4SJeffrey Hsu  * Copyright (c) 1998-2000
359ca77f4SJeffrey Hsu  * University of Southern California/Information Sciences Institute.
459ca77f4SJeffrey Hsu  * All rights reserved.
559ca77f4SJeffrey Hsu  *
659ca77f4SJeffrey Hsu  * Redistribution and use in source and binary forms, with or without
759ca77f4SJeffrey Hsu  * modification, are permitted provided that the following conditions
859ca77f4SJeffrey Hsu  * are met:
959ca77f4SJeffrey Hsu  * 1. Redistributions of source code must retain the above copyright
1059ca77f4SJeffrey Hsu  *    notice, this list of conditions and the following disclaimer.
1159ca77f4SJeffrey Hsu  * 2. Redistributions in binary form must reproduce the above copyright
1259ca77f4SJeffrey Hsu  *    notice, this list of conditions and the following disclaimer in the
1359ca77f4SJeffrey Hsu  *    documentation and/or other materials provided with the distribution.
1459ca77f4SJeffrey Hsu  * 3. Neither the name of the project nor the names of its contributors
1559ca77f4SJeffrey Hsu  *    may be used to endorse or promote products derived from this software
1659ca77f4SJeffrey Hsu  *    without specific prior written permission.
1759ca77f4SJeffrey Hsu  *
1859ca77f4SJeffrey Hsu  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
1959ca77f4SJeffrey Hsu  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2059ca77f4SJeffrey Hsu  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2159ca77f4SJeffrey Hsu  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
2259ca77f4SJeffrey Hsu  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2359ca77f4SJeffrey Hsu  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2459ca77f4SJeffrey Hsu  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2559ca77f4SJeffrey Hsu  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2659ca77f4SJeffrey Hsu  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2759ca77f4SJeffrey Hsu  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2859ca77f4SJeffrey Hsu  * SUCH DAMAGE.
2959ca77f4SJeffrey Hsu  *
3059ca77f4SJeffrey Hsu  * $FreeBSD$
3159ca77f4SJeffrey Hsu  */
3259ca77f4SJeffrey Hsu 
3359ca77f4SJeffrey Hsu #ifndef _NETINET_PIM_VAR_H_
3459ca77f4SJeffrey Hsu #define _NETINET_PIM_VAR_H_
3559ca77f4SJeffrey Hsu 
3659ca77f4SJeffrey Hsu /*
3759ca77f4SJeffrey Hsu  * Protocol Independent Multicast (PIM),
3859ca77f4SJeffrey Hsu  * kernel variables and implementation-specific definitions.
3959ca77f4SJeffrey Hsu  *
4059ca77f4SJeffrey Hsu  * Written by George Edmond Eddy (Rusty), ISI, February 1998.
4159ca77f4SJeffrey Hsu  * Modified by Pavlin Radoslavov, USC/ISI, May 1998, Aug 1999, October 2000.
4259ca77f4SJeffrey Hsu  * Modified by Hitoshi Asaeda, WIDE, August 1998.
4359ca77f4SJeffrey Hsu  */
4459ca77f4SJeffrey Hsu 
4559ca77f4SJeffrey Hsu /*
4659ca77f4SJeffrey Hsu  * PIM statistics kept in the kernel
4759ca77f4SJeffrey Hsu  */
4859ca77f4SJeffrey Hsu struct pimstat {
4959ca77f4SJeffrey Hsu 	u_quad_t pims_rcv_total_msgs;	   /* total PIM messages received    */
5059ca77f4SJeffrey Hsu 	u_quad_t pims_rcv_total_bytes;	   /* total PIM bytes received	     */
5159ca77f4SJeffrey Hsu 	u_quad_t pims_rcv_tooshort;	   /* rcvd with too few bytes	     */
5259ca77f4SJeffrey Hsu 	u_quad_t pims_rcv_badsum;	   /* rcvd with bad checksum	     */
5359ca77f4SJeffrey Hsu 	u_quad_t pims_rcv_badversion;	   /* rcvd bad PIM version	     */
5459ca77f4SJeffrey Hsu 	u_quad_t pims_rcv_registers_msgs;  /* rcvd regs. msgs (data only)    */
5559ca77f4SJeffrey Hsu 	u_quad_t pims_rcv_registers_bytes; /* rcvd regs. bytes (data only)   */
5659ca77f4SJeffrey Hsu 	u_quad_t pims_rcv_registers_wrongiif; /* rcvd regs. on wrong iif     */
5759ca77f4SJeffrey Hsu 	u_quad_t pims_rcv_badregisters;	   /* rcvd invalid registers	     */
5859ca77f4SJeffrey Hsu 	u_quad_t pims_snd_registers_msgs;  /* sent regs. msgs (data only)    */
5959ca77f4SJeffrey Hsu 	u_quad_t pims_snd_registers_bytes; /* sent regs. bytes (data only)   */
6059ca77f4SJeffrey Hsu };
6159ca77f4SJeffrey Hsu 
6259ca77f4SJeffrey Hsu /*
6359ca77f4SJeffrey Hsu  * Names for PIM sysctl objects
6459ca77f4SJeffrey Hsu  */
6559ca77f4SJeffrey Hsu #define PIMCTL_STATS		1	/* statistics (read-only) */
6659ca77f4SJeffrey Hsu #define PIMCTL_MAXID		2
6759ca77f4SJeffrey Hsu 
6859ca77f4SJeffrey Hsu #define PIMCTL_NAMES {			\
6959ca77f4SJeffrey Hsu 	{ 0, 0 },			\
7059ca77f4SJeffrey Hsu 	{ "stats", CTLTYPE_STRUCT },	\
7159ca77f4SJeffrey Hsu }
7259ca77f4SJeffrey Hsu 
7359ca77f4SJeffrey Hsu #ifdef _KERNEL
7459ca77f4SJeffrey Hsu extern struct pimstat pimstat;
7559ca77f4SJeffrey Hsu 
7659ca77f4SJeffrey Hsu void pim_input(struct mbuf *, int);
7759ca77f4SJeffrey Hsu SYSCTL_DECL(_net_inet_pim);
7859ca77f4SJeffrey Hsu #endif
7959ca77f4SJeffrey Hsu 
8059ca77f4SJeffrey Hsu #endif /* _NETINET_PIM_VAR_H_ */
81