Home | History | Annotate | Line # | Download | only in netinet
      1  1.27  christos /*	$NetBSD: igmp_var.h,v 1.27 2021/02/17 22:32:04 christos Exp $	*/
      2   1.6       cgd 
      3   1.1   hpeyerl /*
      4   1.5   mycroft  * Copyright (c) 1992, 1993
      5   1.5   mycroft  *	The Regents of the University of California.  All rights reserved.
      6  1.17       agc  *
      7  1.17       agc  * This code is derived from software contributed to Berkeley by
      8  1.17       agc  * Stephen Deering of Stanford University.
      9  1.17       agc  *
     10  1.17       agc  * Redistribution and use in source and binary forms, with or without
     11  1.17       agc  * modification, are permitted provided that the following conditions
     12  1.17       agc  * are met:
     13  1.17       agc  * 1. Redistributions of source code must retain the above copyright
     14  1.17       agc  *    notice, this list of conditions and the following disclaimer.
     15  1.17       agc  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.17       agc  *    notice, this list of conditions and the following disclaimer in the
     17  1.17       agc  *    documentation and/or other materials provided with the distribution.
     18  1.17       agc  * 3. Neither the name of the University nor the names of its contributors
     19  1.17       agc  *    may be used to endorse or promote products derived from this software
     20  1.17       agc  *    without specific prior written permission.
     21  1.17       agc  *
     22  1.17       agc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     23  1.17       agc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     24  1.17       agc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     25  1.17       agc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     26  1.17       agc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     27  1.17       agc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     28  1.17       agc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     29  1.17       agc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     30  1.17       agc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     31  1.17       agc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     32  1.17       agc  * SUCH DAMAGE.
     33  1.17       agc  *
     34  1.17       agc  *	@(#)igmp_var.h	8.1 (Berkeley) 7/19/93
     35  1.17       agc  */
     36  1.17       agc 
     37  1.17       agc /*
     38  1.17       agc  * Copyright (c) 1988 Stephen Deering.
     39   1.1   hpeyerl  *
     40   1.1   hpeyerl  * This code is derived from software contributed to Berkeley by
     41   1.1   hpeyerl  * Stephen Deering of Stanford University.
     42   1.1   hpeyerl  *
     43   1.1   hpeyerl  * Redistribution and use in source and binary forms, with or without
     44   1.1   hpeyerl  * modification, are permitted provided that the following conditions
     45   1.1   hpeyerl  * are met:
     46   1.1   hpeyerl  * 1. Redistributions of source code must retain the above copyright
     47   1.1   hpeyerl  *    notice, this list of conditions and the following disclaimer.
     48   1.1   hpeyerl  * 2. Redistributions in binary form must reproduce the above copyright
     49   1.1   hpeyerl  *    notice, this list of conditions and the following disclaimer in the
     50   1.1   hpeyerl  *    documentation and/or other materials provided with the distribution.
     51   1.1   hpeyerl  * 3. All advertising materials mentioning features or use of this software
     52   1.1   hpeyerl  *    must display the following acknowledgement:
     53   1.1   hpeyerl  *	This product includes software developed by the University of
     54   1.1   hpeyerl  *	California, Berkeley and its contributors.
     55   1.1   hpeyerl  * 4. Neither the name of the University nor the names of its contributors
     56   1.1   hpeyerl  *    may be used to endorse or promote products derived from this software
     57   1.1   hpeyerl  *    without specific prior written permission.
     58   1.1   hpeyerl  *
     59   1.1   hpeyerl  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     60   1.1   hpeyerl  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     61   1.1   hpeyerl  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     62   1.1   hpeyerl  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     63   1.1   hpeyerl  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     64   1.1   hpeyerl  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     65   1.1   hpeyerl  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     66   1.1   hpeyerl  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     67   1.1   hpeyerl  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     68   1.1   hpeyerl  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     69   1.1   hpeyerl  * SUCH DAMAGE.
     70   1.1   hpeyerl  *
     71   1.6       cgd  *	@(#)igmp_var.h	8.1 (Berkeley) 7/19/93
     72   1.1   hpeyerl  */
     73   1.1   hpeyerl 
     74  1.10     perry #ifndef _NETINET_IGMP_VAR_H_
     75  1.10     perry #define _NETINET_IGMP_VAR_H_
     76  1.10     perry 
     77   1.1   hpeyerl /*
     78   1.1   hpeyerl  * Internet Group Management Protocol (IGMP),
     79   1.1   hpeyerl  * implementation-specific definitions.
     80   1.1   hpeyerl  *
     81   1.1   hpeyerl  * Written by Steve Deering, Stanford, May 1988.
     82   1.8   mycroft  * Modified by Rosen Sharma, Stanford, Aug 1994.
     83   1.8   mycroft  * Modified by Bill Fenner, Xerox PARC, Feb 1995.
     84   1.1   hpeyerl  *
     85   1.8   mycroft  * MULTICAST 1.3
     86   1.1   hpeyerl  */
     87   1.1   hpeyerl 
     88  1.23   thorpej #define	IGMP_STAT_RCV_TOTAL	1	/* total IGMP messages received */
     89  1.23   thorpej #define	IGMP_STAT_RCV_TOOSHORT	2	/* received with too few bytes */
     90  1.23   thorpej #define	IGMP_STAT_RCV_BADSUM	3	/* received with bad checksum */
     91  1.23   thorpej #define	IGMP_STAT_RCV_QUERIES	4	/* received membership queries */
     92  1.23   thorpej #define	IGMP_STAT_RCV_BADQUERIES 5	/* received invalid queries */
     93  1.23   thorpej #define	IGMP_STAT_RCV_REPORTS	6	/* received membership reports */
     94  1.23   thorpej #define	IGMP_STAT_RCV_BADREPORTS 7	/* received invalid reports */
     95  1.23   thorpej #define	IGMP_STAT_RCV_OURREPORTS 8	/* received reports for our groups */
     96  1.23   thorpej #define	IGMP_STAT_SND_REPORTS	9	/* sent membership reports */
     97  1.23   thorpej 
     98  1.23   thorpej #define	IGMP_NSTATS		10
     99   1.1   hpeyerl 
    100   1.7       jtc #ifdef _KERNEL
    101   1.1   hpeyerl /*
    102   1.1   hpeyerl  * Macro to compute a random timer value between 1 and (IGMP_MAX_REPORTING_
    103   1.1   hpeyerl  * DELAY * countdown frequency).  We assume that the routine random()
    104   1.1   hpeyerl  * is defined somewhere (and that it returns a positive number).
    105   1.1   hpeyerl  */
    106  1.24     rmind #define	IGMP_RANDOM_DELAY(X)	(cprng_fast32() % (X) + 1)
    107  1.14   thorpej 
    108  1.23   thorpej void	igmp_init(void);
    109  1.25      maxv void	igmp_input(struct mbuf *, int, int);
    110  1.20    itojun int	igmp_joingroup(struct in_multi *);
    111  1.20    itojun void	igmp_leavegroup(struct in_multi *);
    112  1.20    itojun void	igmp_fasttimo(void);
    113  1.20    itojun void	igmp_slowtimo(void);
    114  1.20    itojun void	igmp_purgeif(struct ifnet *);
    115  1.23   thorpej #endif /* _KERNEL */
    116  1.10     perry 
    117  1.22      elad #endif /* !_NETINET_IGMP_VAR_H_ */
    118