xref: /netbsd/sys/netinet6/mld6_var.h (revision 8e933452)
1*8e933452Stls /*	$NetBSD: mld6_var.h,v 1.10 2011/11/19 22:51:29 tls Exp $	*/
2e1f4f779Sitojun /*	$KAME: mld6_var.h,v 1.4 2000/03/25 07:23:54 sumikawa Exp $	*/
3cd3a345eSthorpej 
474d3c214Sitojun /*
574d3c214Sitojun  * Copyright (C) 1998 WIDE Project.
674d3c214Sitojun  * All rights reserved.
774d3c214Sitojun  *
874d3c214Sitojun  * Redistribution and use in source and binary forms, with or without
974d3c214Sitojun  * modification, are permitted provided that the following conditions
1074d3c214Sitojun  * are met:
1174d3c214Sitojun  * 1. Redistributions of source code must retain the above copyright
1274d3c214Sitojun  *    notice, this list of conditions and the following disclaimer.
1374d3c214Sitojun  * 2. Redistributions in binary form must reproduce the above copyright
1474d3c214Sitojun  *    notice, this list of conditions and the following disclaimer in the
1574d3c214Sitojun  *    documentation and/or other materials provided with the distribution.
1674d3c214Sitojun  * 3. Neither the name of the project nor the names of its contributors
1774d3c214Sitojun  *    may be used to endorse or promote products derived from this software
1874d3c214Sitojun  *    without specific prior written permission.
1974d3c214Sitojun  *
2074d3c214Sitojun  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
2174d3c214Sitojun  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2274d3c214Sitojun  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2374d3c214Sitojun  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
2474d3c214Sitojun  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2574d3c214Sitojun  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2674d3c214Sitojun  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2774d3c214Sitojun  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2874d3c214Sitojun  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2974d3c214Sitojun  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3074d3c214Sitojun  * SUCH DAMAGE.
3174d3c214Sitojun  */
3274d3c214Sitojun 
3374d3c214Sitojun #ifndef _NETINET6_MLD6_VAR_H_
3474d3c214Sitojun #define _NETINET6_MLD6_VAR_H_
3574d3c214Sitojun 
3674d3c214Sitojun #ifdef _KERNEL
3774d3c214Sitojun 
38*8e933452Stls #define MLD_RANDOM_DELAY(X)	(cprng_fast32() % (X) + 1)
3974d3c214Sitojun 
4074d3c214Sitojun /*
4174d3c214Sitojun  * States for MLD stop-listening processing
4274d3c214Sitojun  */
437a574165Sitojun #define MLD_OTHERLISTENER			0
447a574165Sitojun #define MLD_IREPORTEDLAST			1
458c2379fdSrpaulo #define MLD_REPORTPENDING			2 /* implementation specific */
4674d3c214Sitojun 
478c2379fdSrpaulo /* denotes that the MLD max response delay field specifies time in milliseconds */
488c2379fdSrpaulo #define MLD_TIMER_SCALE	1000
498c2379fdSrpaulo 
50122b86e2Sdyoung void	mld_init(void);
51122b86e2Sdyoung void	mld_input(struct mbuf *, int);
5274d3c214Sitojun #endif /* _KERNEL */
5374d3c214Sitojun 
549702e987Selad #endif /* !_NETINET6_MLD6_VAR_H_ */
55