xorp

pim_var.h

00001 /*  $FreeBSD$   */
00002 
00003 /*
00004  * Copyright (c) 1998-2000
00005  * University of Southern California/Information Sciences Institute.
00006  * All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions
00010  * are met:
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  * 3. Neither the name of the project nor the names of its contributors
00017  *    may be used to endorse or promote products derived from this software
00018  *    without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
00021  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00022  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00023  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
00024  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00025  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00026  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00027  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00028  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00029  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00030  * SUCH DAMAGE.
00031  */
00032 
00033 #ifndef _NETINET_PIM_VAR_H_
00034 #define _NETINET_PIM_VAR_H_
00035 
00036 /*
00037  * Protocol Independent Multicast (PIM),
00038  * kernel variables and implementation-specific definitions.
00039  *
00040  * Written by George Edmond Eddy (Rusty), ISI, February 1998.
00041  * Modified by Pavlin Radoslavov, USC/ISI, May 1998, Aug 1999, October 2000.
00042  * Modified by Hitoshi Asaeda, WIDE, August 1998.
00043  */
00044 
00045 /*
00046  * PIM statistics kept in the kernel
00047  */
00048 struct pimstat {
00049     u_quad_t pims_rcv_total_msgs;      /* total PIM messages received    */
00050     u_quad_t pims_rcv_total_bytes;     /* total PIM bytes received       */
00051     u_quad_t pims_rcv_tooshort;    /* rcvd with too few bytes        */
00052     u_quad_t pims_rcv_badsum;      /* rcvd with bad checksum         */
00053     u_quad_t pims_rcv_badversion;      /* rcvd bad PIM version       */
00054     u_quad_t pims_rcv_registers_msgs;  /* rcvd regs. msgs (data only)    */
00055     u_quad_t pims_rcv_registers_bytes; /* rcvd regs. bytes (data only)   */
00056     u_quad_t pims_rcv_registers_wrongiif; /* rcvd regs. on wrong iif     */
00057     u_quad_t pims_rcv_badregisters;    /* rcvd invalid registers         */
00058     u_quad_t pims_snd_registers_msgs;  /* sent regs. msgs (data only)    */
00059     u_quad_t pims_snd_registers_bytes; /* sent regs. bytes (data only)   */
00060 };
00061 
00062 /*
00063  * Names for PIM sysctl objects
00064  */
00065 #define PIMCTL_STATS        1   /* statistics (read-only) */
00066 #define PIMCTL_MAXID        2
00067 
00068 #define PIMCTL_NAMES {          \
00069     { 0, 0 },           \
00070     { "stats", CTLTYPE_STRUCT },    \
00071 }
00072 
00073 #if (defined(KERNEL)) || (defined(_KERNEL))
00074 extern struct pimstat pimstat;
00075 
00076 void pim_input(struct mbuf *, int);
00077 SYSCTL_DECL(_net_inet_pim);
00078 #endif /* KERNEL */
00079 
00080 #endif /* _NETINET_PIM_VAR_H_ */
 All Classes Namespaces Functions Variables Typedefs Enumerations