ip_mroute.h revision bd670b35a010421b6e1a5536c34453a827007c81
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1990 Mentat Inc. */
#ifndef _NETINET_IP_MROUTE_H
#define _NETINET_IP_MROUTE_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions for the kernel part of DVMRP,
* a Distance-Vector Multicast Routing Protocol.
* (See RFC-1075.)
*
* Written by David Waitzman, BBN Labs, August 1988.
* Modified by Steve Deering, Stanford, February 1989.
* Modified by Ajit Thyagarajan, PARC, August 1993.
* Modified by Ajit Thyagarajan, PARC, August 1994.
*
* MROUTING 3.5
*/
/*
* DVMRP-specific setsockopt commands.
*/
/*
* Types and macros for handling bitmaps with one bit per virtual interface.
*/
#define MAXVIFS 32
typedef uint_t vifbitmap_t;
#define VIFM_SET(n, m) ((m) |= (1 << (n)))
#define VIFM_CLR(n, m) ((m) &= ~(1 << (n)))
#define VIFM_ISSET(n, m) ((m) & (1 << (n)))
#define VIFM_CLRALL(m) ((m) = 0x00000000)
/*
* Argument structure for MRT_ADD_VIF. Also used for netstat.
* (MRT_DEL_VIF takes a single vifi_t argument.)
*/
struct vifctl {
/*
* vifc_pkt_in/out in Solaris, to report out of the kernel.
* Not nec. in BSD.
*/
};
/*
* Argument structure for MRT_ADD_MFC and MRT_DEL_MFC
* (mfcc_tos to be added at a future point)
*/
struct mfcctl {
};
/*
* The kernel's multicast routing statistics.
*/
struct mrtstat {
};
/*
* Argument structure used by mrouted to get src-grp pkt counts
*/
struct sioc_sg_req {
};
/*
* Argument structure used by mrouted to get vif pkt counts
*/
struct sioc_vif_req {
};
#ifdef _KERNEL
/*
* The kernel's virtual-interface structure.
*/
struct vif {
/*
* struct route v_route; Cached route if this is a tunnel
* Used in bsd for performance
*/
};
/*
* vif is not being used. However if refcnt != 0 than its being initalized.
*/
/*
* The kernel's multicast forwarding cache entry structure
* (A field for the type of service (mfc_tos) is to be added
* at a future point)
*/
struct mfc {
};
/*
* mfc bucket structure.
*/
struct mfcb {
};
#define MFCB_MARK_CONDEMNED 0x1
/*
* Argument structure used for pkt info. while upcall is made
*/
struct rtdetq {
};
#endif
/*
* Struct used to communicate from kernel to multicast router
* note the convenient similarity to an IP packet
*/
struct igmpmsg {
#define IGMPMSG_NOCACHE 1
#define IGMPMSG_WRONGVIF 2
#define IGMPMSG_WHOLEPKT 3
};
#ifdef _KERNEL
#define MFCTBLSIZ 256
#else
#define MFCHASHMOD(h) ((h) % MFCTBLSIZ)
#endif
/*
* Token Bucket filter code
*/
/*
* The token bucket filter at each vif
*/
struct tbf {
};
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _NETINET_IP_MROUTE_H */