xref: /freebsd/sys/netinet6/ip6_mroute.h (revision 2ff63af9)
1caf43b02SWarner Losh /*-
251369649SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
351369649SPedro F. Giffuni  *
491ec0a1eSYoshinobu Inoue  * Copyright (C) 1998 WIDE Project.
591ec0a1eSYoshinobu Inoue  * All rights reserved.
691ec0a1eSYoshinobu Inoue  *
791ec0a1eSYoshinobu Inoue  * Redistribution and use in source and binary forms, with or without
891ec0a1eSYoshinobu Inoue  * modification, are permitted provided that the following conditions
991ec0a1eSYoshinobu Inoue  * are met:
1091ec0a1eSYoshinobu Inoue  * 1. Redistributions of source code must retain the above copyright
1191ec0a1eSYoshinobu Inoue  *    notice, this list of conditions and the following disclaimer.
1291ec0a1eSYoshinobu Inoue  * 2. Redistributions in binary form must reproduce the above copyright
1391ec0a1eSYoshinobu Inoue  *    notice, this list of conditions and the following disclaimer in the
1491ec0a1eSYoshinobu Inoue  *    documentation and/or other materials provided with the distribution.
1591ec0a1eSYoshinobu Inoue  * 3. Neither the name of the project nor the names of its contributors
1691ec0a1eSYoshinobu Inoue  *    may be used to endorse or promote products derived from this software
1791ec0a1eSYoshinobu Inoue  *    without specific prior written permission.
1891ec0a1eSYoshinobu Inoue  *
1991ec0a1eSYoshinobu Inoue  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
2091ec0a1eSYoshinobu Inoue  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2191ec0a1eSYoshinobu Inoue  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2291ec0a1eSYoshinobu Inoue  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
2391ec0a1eSYoshinobu Inoue  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2491ec0a1eSYoshinobu Inoue  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2591ec0a1eSYoshinobu Inoue  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2691ec0a1eSYoshinobu Inoue  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2791ec0a1eSYoshinobu Inoue  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2891ec0a1eSYoshinobu Inoue  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2991ec0a1eSYoshinobu Inoue  * SUCH DAMAGE.
30b48287a3SDavid E. O'Brien  *
31b48287a3SDavid E. O'Brien  *	$KAME: ip6_mroute.h,v 1.19 2001/06/14 06:12:55 suz Exp $
3291ec0a1eSYoshinobu Inoue  */
3391ec0a1eSYoshinobu Inoue 
3491ec0a1eSYoshinobu Inoue /*	BSDI ip_mroute.h,v 2.5 1996/10/11 16:01:48 pjd Exp	*/
3591ec0a1eSYoshinobu Inoue 
3691ec0a1eSYoshinobu Inoue /*
3791ec0a1eSYoshinobu Inoue  * Definitions for IP multicast forwarding.
3891ec0a1eSYoshinobu Inoue  *
3991ec0a1eSYoshinobu Inoue  * Written by David Waitzman, BBN Labs, August 1988.
4091ec0a1eSYoshinobu Inoue  * Modified by Steve Deering, Stanford, February 1989.
4191ec0a1eSYoshinobu Inoue  * Modified by Ajit Thyagarajan, PARC, August 1993.
4291ec0a1eSYoshinobu Inoue  * Modified by Ajit Thyagarajan, PARC, August 1994.
4391ec0a1eSYoshinobu Inoue  * Modified by Ahmed Helmy, USC, September 1996.
4491ec0a1eSYoshinobu Inoue  *
4591ec0a1eSYoshinobu Inoue  * MROUTING Revision: 1.2
4691ec0a1eSYoshinobu Inoue  */
4791ec0a1eSYoshinobu Inoue 
4891ec0a1eSYoshinobu Inoue #ifndef _NETINET6_IP6_MROUTE_H_
4991ec0a1eSYoshinobu Inoue #define _NETINET6_IP6_MROUTE_H_
5091ec0a1eSYoshinobu Inoue 
5191ec0a1eSYoshinobu Inoue /*
5291ec0a1eSYoshinobu Inoue  * Multicast Routing set/getsockopt commands.
5391ec0a1eSYoshinobu Inoue  */
54686cdd19SJun-ichiro itojun Hagino #ifdef _KERNEL
55686cdd19SJun-ichiro itojun Hagino #define MRT6_OINIT		100	/* initialize forwarder (omrt6msg) */
56686cdd19SJun-ichiro itojun Hagino #endif
5791ec0a1eSYoshinobu Inoue #define MRT6_DONE		101	/* shut down forwarder */
5891ec0a1eSYoshinobu Inoue #define MRT6_ADD_MIF		102	/* add multicast interface */
5991ec0a1eSYoshinobu Inoue #define MRT6_DEL_MIF		103	/* delete multicast interface */
6091ec0a1eSYoshinobu Inoue #define MRT6_ADD_MFC		104	/* insert forwarding cache entry */
6191ec0a1eSYoshinobu Inoue #define MRT6_DEL_MFC		105	/* delete forwarding cache entry */
6291ec0a1eSYoshinobu Inoue #define MRT6_PIM                107     /* enable pim code */
63686cdd19SJun-ichiro itojun Hagino #define MRT6_INIT		108	/* initialize forwarder (mrt6msg) */
6491ec0a1eSYoshinobu Inoue 
6591ec0a1eSYoshinobu Inoue #if BSD >= 199103
6691ec0a1eSYoshinobu Inoue #define GET_TIME(t)	microtime(&t)
6791ec0a1eSYoshinobu Inoue #elif defined(sun)
6891ec0a1eSYoshinobu Inoue #define GET_TIME(t)	uniqtime(&t)
6991ec0a1eSYoshinobu Inoue #else
7091ec0a1eSYoshinobu Inoue #define GET_TIME(t)	((t) = time)
7191ec0a1eSYoshinobu Inoue #endif
7291ec0a1eSYoshinobu Inoue 
7391ec0a1eSYoshinobu Inoue /*
7491ec0a1eSYoshinobu Inoue  * Types and macros for handling bitmaps with one bit per multicast interface.
7591ec0a1eSYoshinobu Inoue  */
7691ec0a1eSYoshinobu Inoue typedef u_short mifi_t;		/* type of a mif index */
7791ec0a1eSYoshinobu Inoue #define MAXMIFS		64
7891ec0a1eSYoshinobu Inoue 
7991ec0a1eSYoshinobu Inoue #ifndef	IF_SETSIZE
8091ec0a1eSYoshinobu Inoue #define	IF_SETSIZE	256
8191ec0a1eSYoshinobu Inoue #endif
8291ec0a1eSYoshinobu Inoue 
8333841545SHajimu UMEMOTO typedef	u_int32_t	if_mask;
8491ec0a1eSYoshinobu Inoue #define	NIFBITS	(sizeof(if_mask) * NBBY)	/* bits per mask */
8591ec0a1eSYoshinobu Inoue 
8691ec0a1eSYoshinobu Inoue #ifndef howmany
8791ec0a1eSYoshinobu Inoue #define	howmany(x, y)	(((x) + ((y) - 1)) / (y))
8891ec0a1eSYoshinobu Inoue #endif
8991ec0a1eSYoshinobu Inoue 
9091ec0a1eSYoshinobu Inoue typedef	struct if_set {
9133841545SHajimu UMEMOTO 	if_mask	ifs_bits[howmany(IF_SETSIZE, NIFBITS)];
9291ec0a1eSYoshinobu Inoue } if_set;
9391ec0a1eSYoshinobu Inoue 
9491ec0a1eSYoshinobu Inoue #define	IF_SET(n, p)	((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS)))
9591ec0a1eSYoshinobu Inoue #define	IF_CLR(n, p)	((p)->ifs_bits[(n)/NIFBITS] &= ~(1 << ((n) % NIFBITS)))
9691ec0a1eSYoshinobu Inoue #define	IF_ISSET(n, p)	((p)->ifs_bits[(n)/NIFBITS] & (1 << ((n) % NIFBITS)))
9791ec0a1eSYoshinobu Inoue #define	IF_COPY(f, t)	bcopy(f, t, sizeof(*(f)))
9891ec0a1eSYoshinobu Inoue #define	IF_ZERO(p)	bzero(p, sizeof(*(p)))
9991ec0a1eSYoshinobu Inoue 
10091ec0a1eSYoshinobu Inoue /*
10191ec0a1eSYoshinobu Inoue  * Argument structure for MRT6_ADD_IF.
10291ec0a1eSYoshinobu Inoue  */
10391ec0a1eSYoshinobu Inoue struct mif6ctl {
10491ec0a1eSYoshinobu Inoue 	mifi_t	    mif6c_mifi;		/* the index of the mif to be added  */
10591ec0a1eSYoshinobu Inoue 	u_char	    mif6c_flags;	/* MIFF_ flags defined below         */
10691ec0a1eSYoshinobu Inoue 	u_short	    mif6c_pifi;		/* the index of the physical IF */
10791ec0a1eSYoshinobu Inoue };
10891ec0a1eSYoshinobu Inoue 
10991ec0a1eSYoshinobu Inoue #define	MIFF_REGISTER	0x1	/* mif represents a register end-point */
11091ec0a1eSYoshinobu Inoue 
11191ec0a1eSYoshinobu Inoue /*
11291ec0a1eSYoshinobu Inoue  * Argument structure for MRT6_ADD_MFC and MRT6_DEL_MFC
11391ec0a1eSYoshinobu Inoue  */
11491ec0a1eSYoshinobu Inoue struct mf6cctl {
11591ec0a1eSYoshinobu Inoue 	struct sockaddr_in6 mf6cc_origin;	/* IPv6 origin of mcasts */
11691ec0a1eSYoshinobu Inoue 	struct sockaddr_in6 mf6cc_mcastgrp; /* multicast group associated */
11791ec0a1eSYoshinobu Inoue 	mifi_t		mf6cc_parent;	/* incoming ifindex */
11891ec0a1eSYoshinobu Inoue 	struct if_set	mf6cc_ifset;	/* set of forwarding ifs */
11991ec0a1eSYoshinobu Inoue };
12091ec0a1eSYoshinobu Inoue 
12191ec0a1eSYoshinobu Inoue /*
12291ec0a1eSYoshinobu Inoue  * The kernel's multicast routing statistics.
12391ec0a1eSYoshinobu Inoue  */
12491ec0a1eSYoshinobu Inoue struct mrt6stat {
125c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_mfc_lookups;	/* # forw. cache hash table hits   */
126c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_mfc_misses;	/* # forw. cache hash table misses */
127c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_upcalls;		/* # calls to multicast routing daemon */
128c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_no_route;	/* no route for packet's origin    */
129c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_bad_tunnel;	/* malformed tunnel options        */
130c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_cant_tunnel;	/* no room for tunnel options      */
131c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_wrong_if;	/* arrived on wrong interface	   */
132c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_upq_ovflw;	/* upcall Q overflow		   */
133c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_cache_cleanups;	/* # entries with no upcalls	   */
134c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_drop_sel;	/* pkts dropped selectively        */
135c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_q_overflow;	/* pkts dropped - Q overflow       */
136c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_pkt2large;	/* pkts dropped - size > BKT SIZE  */
137c80211e3SAndrey V. Elsukov 	uint64_t mrt6s_upq_sockfull;	/* upcalls dropped - socket full   */
13891ec0a1eSYoshinobu Inoue };
13991ec0a1eSYoshinobu Inoue 
140686cdd19SJun-ichiro itojun Hagino #ifdef MRT6_OINIT
14191ec0a1eSYoshinobu Inoue /*
14291ec0a1eSYoshinobu Inoue  * Struct used to communicate from kernel to multicast router
14391ec0a1eSYoshinobu Inoue  * note the convenient similarity to an IPv6 header.
144686cdd19SJun-ichiro itojun Hagino  * XXX old version, superseded by mrt6msg.
14591ec0a1eSYoshinobu Inoue  */
146686cdd19SJun-ichiro itojun Hagino struct omrt6msg {
14791ec0a1eSYoshinobu Inoue 	u_long	    unused1;
14891ec0a1eSYoshinobu Inoue 	u_char	    im6_msgtype;		/* what type of message	    */
149686cdd19SJun-ichiro itojun Hagino 	u_char	    im6_mbz;			/* must be zero		    */
150686cdd19SJun-ichiro itojun Hagino 	u_char	    im6_mif;			/* mif rec'd on		    */
151686cdd19SJun-ichiro itojun Hagino 	u_char	    unused2;
152686cdd19SJun-ichiro itojun Hagino 	struct in6_addr  im6_src, im6_dst;
153686cdd19SJun-ichiro itojun Hagino };
154686cdd19SJun-ichiro itojun Hagino #endif
155686cdd19SJun-ichiro itojun Hagino 
156686cdd19SJun-ichiro itojun Hagino /*
157686cdd19SJun-ichiro itojun Hagino  * Structure used to communicate from kernel to multicast router.
158686cdd19SJun-ichiro itojun Hagino  * We'll overlay the structure onto an MLD header (not an IPv6 header
159686cdd19SJun-ichiro itojun Hagino  * like igmpmsg{} used for IPv4 implementation). This is because this
160686cdd19SJun-ichiro itojun Hagino  * structure will be passed via an IPv6 raw socket, on which an application
161686cdd19SJun-ichiro itojun Hagino  * will only receive the payload i.e. the data after the IPv6 header and all
16218b35df8SHajimu UMEMOTO  * the extension headers. (see Section 3 of RFC3542)
163686cdd19SJun-ichiro itojun Hagino  */
164686cdd19SJun-ichiro itojun Hagino struct mrt6msg {
16591ec0a1eSYoshinobu Inoue #define MRT6MSG_NOCACHE		1
16691ec0a1eSYoshinobu Inoue #define MRT6MSG_WRONGMIF	2
16791ec0a1eSYoshinobu Inoue #define MRT6MSG_WHOLEPKT	3		/* used for user level encap*/
16891ec0a1eSYoshinobu Inoue 	u_char	    im6_mbz;			/* must be zero		    */
169686cdd19SJun-ichiro itojun Hagino 	u_char	    im6_msgtype;		/* what type of message	    */
170686cdd19SJun-ichiro itojun Hagino 	u_int16_t   im6_mif;			/* mif rec'd on		    */
171686cdd19SJun-ichiro itojun Hagino 	u_int32_t   im6_pad;			/* padding for 64bit arch   */
17291ec0a1eSYoshinobu Inoue 	struct in6_addr  im6_src, im6_dst;
17391ec0a1eSYoshinobu Inoue };
17491ec0a1eSYoshinobu Inoue 
17591ec0a1eSYoshinobu Inoue /*
17691ec0a1eSYoshinobu Inoue  * Argument structure used by multicast routing daemon to get src-grp
17791ec0a1eSYoshinobu Inoue  * packet counts
17891ec0a1eSYoshinobu Inoue  */
17991ec0a1eSYoshinobu Inoue struct sioc_sg_req6 {
18091ec0a1eSYoshinobu Inoue 	struct sockaddr_in6 src;
18191ec0a1eSYoshinobu Inoue 	struct sockaddr_in6 grp;
18291ec0a1eSYoshinobu Inoue 	u_quad_t pktcnt;
18391ec0a1eSYoshinobu Inoue 	u_quad_t bytecnt;
18491ec0a1eSYoshinobu Inoue 	u_quad_t wrong_if;
18591ec0a1eSYoshinobu Inoue };
18691ec0a1eSYoshinobu Inoue 
18791ec0a1eSYoshinobu Inoue /*
18891ec0a1eSYoshinobu Inoue  * Argument structure used by mrouted to get mif pkt counts
18991ec0a1eSYoshinobu Inoue  */
19091ec0a1eSYoshinobu Inoue struct sioc_mif_req6 {
19191ec0a1eSYoshinobu Inoue 	mifi_t mifi;		/* mif number				*/
19291ec0a1eSYoshinobu Inoue 	u_quad_t icount;	/* Input packet count on mif		*/
19391ec0a1eSYoshinobu Inoue 	u_quad_t ocount;	/* Output packet count on mif		*/
19491ec0a1eSYoshinobu Inoue 	u_quad_t ibytes;	/* Input byte count on mif		*/
19591ec0a1eSYoshinobu Inoue 	u_quad_t obytes;	/* Output byte count on mif		*/
19691ec0a1eSYoshinobu Inoue };
19791ec0a1eSYoshinobu Inoue 
198c151f24dSGleb Smirnoff /*
199c151f24dSGleb Smirnoff  * Structure to export 'struct mif6' to userland via sysctl.
200c151f24dSGleb Smirnoff  */
201c151f24dSGleb Smirnoff struct mif6_sctl {
202c151f24dSGleb Smirnoff 	u_char		m6_flags;	/* MIFF_ flags defined above         */
203c151f24dSGleb Smirnoff 	u_int		m6_rate_limit;	/* max rate			     */
204c151f24dSGleb Smirnoff 	struct in6_addr	m6_lcl_addr;	/* local interface address           */
205c151f24dSGleb Smirnoff 	uint32_t	m6_ifp;		/* interface index	             */
206c151f24dSGleb Smirnoff 	u_quad_t	m6_pkt_in;	/* # pkts in on interface            */
207c151f24dSGleb Smirnoff 	u_quad_t	m6_pkt_out;	/* # pkts out on interface           */
208c151f24dSGleb Smirnoff 	u_quad_t	m6_bytes_in;	/* # bytes in on interface	     */
209c151f24dSGleb Smirnoff 	u_quad_t	m6_bytes_out;	/* # bytes out on interface	     */
210c151f24dSGleb Smirnoff };
211c151f24dSGleb Smirnoff 
212f2effe74SJohn-Mark Gurney #if defined(_KERNEL) || defined(KERNEL)
21391ec0a1eSYoshinobu Inoue /*
21491ec0a1eSYoshinobu Inoue  * The kernel's multicast-interface structure.
21591ec0a1eSYoshinobu Inoue  */
21691ec0a1eSYoshinobu Inoue struct mif6 {
21791ec0a1eSYoshinobu Inoue         u_char		m6_flags;	/* MIFF_ flags defined above         */
21891ec0a1eSYoshinobu Inoue 	u_int		m6_rate_limit;	/* max rate			     */
21991ec0a1eSYoshinobu Inoue 	struct in6_addr	m6_lcl_addr;	/* local interface address           */
22091ec0a1eSYoshinobu Inoue 	struct ifnet    *m6_ifp;	/* pointer to interface              */
22191ec0a1eSYoshinobu Inoue 	u_quad_t	m6_pkt_in;	/* # pkts in on interface            */
22291ec0a1eSYoshinobu Inoue 	u_quad_t	m6_pkt_out;	/* # pkts out on interface           */
22391ec0a1eSYoshinobu Inoue 	u_quad_t	m6_bytes_in;	/* # bytes in on interface	     */
22491ec0a1eSYoshinobu Inoue 	u_quad_t	m6_bytes_out;	/* # bytes out on interface	     */
22591ec0a1eSYoshinobu Inoue #ifdef notyet
22691ec0a1eSYoshinobu Inoue 	u_int		m6_rsvp_on;	/* RSVP listening on this vif */
22791ec0a1eSYoshinobu Inoue 	struct socket   *m6_rsvpd;	/* RSVP daemon socket */
22891ec0a1eSYoshinobu Inoue #endif
22991ec0a1eSYoshinobu Inoue };
23091ec0a1eSYoshinobu Inoue 
23191ec0a1eSYoshinobu Inoue /*
23291ec0a1eSYoshinobu Inoue  * The kernel's multicast forwarding cache entry structure
23391ec0a1eSYoshinobu Inoue  */
23491ec0a1eSYoshinobu Inoue struct mf6c {
23591ec0a1eSYoshinobu Inoue 	struct sockaddr_in6  mf6c_origin;	/* IPv6 origin of mcasts     */
23691ec0a1eSYoshinobu Inoue 	struct sockaddr_in6  mf6c_mcastgrp;	/* multicast group associated*/
23791ec0a1eSYoshinobu Inoue 	mifi_t		 mf6c_parent;		/* incoming IF               */
23891ec0a1eSYoshinobu Inoue 	struct if_set	 mf6c_ifset;		/* set of outgoing IFs */
23991ec0a1eSYoshinobu Inoue 
24091ec0a1eSYoshinobu Inoue 	u_quad_t	mf6c_pkt_cnt;		/* pkt count for src-grp     */
24191ec0a1eSYoshinobu Inoue 	u_quad_t	mf6c_byte_cnt;		/* byte count for src-grp    */
24291ec0a1eSYoshinobu Inoue 	u_quad_t	mf6c_wrong_if;		/* wrong if for src-grp	     */
24391ec0a1eSYoshinobu Inoue 	int		mf6c_expire;		/* time to clean entry up    */
24491ec0a1eSYoshinobu Inoue 	struct timeval  mf6c_last_assert;	/* last time I sent an assert*/
24591ec0a1eSYoshinobu Inoue 	struct rtdetq  *mf6c_stall;		/* pkts waiting for route */
24691ec0a1eSYoshinobu Inoue 	struct mf6c    *mf6c_next;		/* hash table linkage */
24791ec0a1eSYoshinobu Inoue };
24891ec0a1eSYoshinobu Inoue 
24991ec0a1eSYoshinobu Inoue #define MF6C_INCOMPLETE_PARENT ((mifi_t)-1)
25091ec0a1eSYoshinobu Inoue 
25191ec0a1eSYoshinobu Inoue /*
25291ec0a1eSYoshinobu Inoue  * Argument structure used for pkt info. while upcall is made
25391ec0a1eSYoshinobu Inoue  */
25491ec0a1eSYoshinobu Inoue #ifndef _NETINET_IP_MROUTE_H_
25591ec0a1eSYoshinobu Inoue struct rtdetq {		/* XXX: rtdetq is also defined in ip_mroute.h */
25691ec0a1eSYoshinobu Inoue     struct mbuf		*m;		/* A copy of the packet		    */
25791ec0a1eSYoshinobu Inoue     struct ifnet	*ifp;		/* Interface pkt came in on	    */
25891ec0a1eSYoshinobu Inoue #ifdef UPCALL_TIMING
25991ec0a1eSYoshinobu Inoue     struct timeval	t;		/* Timestamp */
26091ec0a1eSYoshinobu Inoue #endif /* UPCALL_TIMING */
26191ec0a1eSYoshinobu Inoue     struct rtdetq	*next;
26291ec0a1eSYoshinobu Inoue };
26391ec0a1eSYoshinobu Inoue #endif /* _NETINET_IP_MROUTE_H_ */
26491ec0a1eSYoshinobu Inoue 
26591ec0a1eSYoshinobu Inoue #define MF6CTBLSIZ	256
26691ec0a1eSYoshinobu Inoue #if (MF6CTBLSIZ & (MF6CTBLSIZ - 1)) == 0	  /* from sys:route.h */
26791ec0a1eSYoshinobu Inoue #define MF6CHASHMOD(h)	((h) & (MF6CTBLSIZ - 1))
26891ec0a1eSYoshinobu Inoue #else
26991ec0a1eSYoshinobu Inoue #define MF6CHASHMOD(h)	((h) % MF6CTBLSIZ)
27091ec0a1eSYoshinobu Inoue #endif
27191ec0a1eSYoshinobu Inoue 
27291ec0a1eSYoshinobu Inoue #define MAX_UPQ6	4		/* max. no of pkts in upcall Q */
27391ec0a1eSYoshinobu Inoue 
2746be2e366SBruce M Simpson extern int	(*ip6_mrouter_set)(struct socket *so, struct sockopt *sopt);
2756be2e366SBruce M Simpson extern int	(*ip6_mrouter_get)(struct socket *so, struct sockopt *sopt);
2766be2e366SBruce M Simpson extern int	(*ip6_mrouter_done)(void);
277e40bae9aSRoman Divacky extern int	(*mrt6_ioctl)(u_long, caddr_t);
27891ec0a1eSYoshinobu Inoue #endif /* _KERNEL */
27991ec0a1eSYoshinobu Inoue 
28091ec0a1eSYoshinobu Inoue #endif /* !_NETINET6_IP6_MROUTE_H_ */
281