⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ip_mroute.h

📁 vxworks 6.x 的全部头文件
💻 H
📖 第 1 页 / 共 2 页
字号:
/* ip_mroute.h - multicast forwarding header file *//* * Copyright (c) 1984-2005 Wind River Systems, Inc. * * The right to copy, distribute or otherwise make use of this software * may be licensed only pursuant to the terms of an applicable Wind River * license agreement. No license to Wind River intellectual property rights * is granted herein. All rights not licensed by Wind River are reserved * by Wind River. *//* * Copyright (c) 1989 Stephen Deering. * Copyright (c) 1992, 1993 *	The Regents of the University of California.  All rights reserved. * * This code is derived from software contributed to Berkeley by * Stephen Deering of Stanford University. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * *	@(#)ip_mroute.h	8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/ip_mroute.h,v 1.17 1999/12/29 04:41:01 peter Exp $ *//*modification history--------------------01h,16jul05,dlk  Added tbf_timeo member to struct tbf for timer cancellation                 when shutting down mrouter in virtual stack destructor.01g,25feb05,niq  add support for router alert01f,31jan05,niq  merge mroute changes from comp_wn_ipv6_multicast_interim-dev                 branch  (ver 1)01e,20sep04,rae  fix compiler warnings01d,24jun03,rae  add #include netVersion.h01c,10oct01,rae  merge from truestack ver 01k (v2 upgrade)01b,08apr97,vin  removed declarations for ip_mforward and ip_mrouter_done.		 implemented ip_mforward as a hook for scalability.01a,03mar96,vin  created from BSD4.4lite2.*/#ifndef _NETINET_IP_MROUTE_H_#define _NETINET_IP_MROUTE_H_#ifdef __cplusplusextern "C" {#endif#include "sys/times.h"#include <netVersion.h>#include <net/route.h>/* * Definitions for IP multicast forwarding. * * 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. * Modified by Ahmed Helmy, SGI, June 1996. * Modified by Pavlin Radoslavov, ICSI, October 2002. * * MROUTING Revision: 3.3.1.3 * and PIM-SMv2 and PIM-DM support, advanced API support, * bandwidth metering and signaling. *//* * Multicast Routing set/getsockopt commands. */#define	MRT_INIT	100	/* initialize forwarder */#define	MRT_DONE	101	/* shut down forwarder */#define	MRT_ADD_VIF	102	/* create virtual interface */#define	MRT_DEL_VIF	103	/* delete virtual interface */#define MRT_ADD_MFC	104	/* insert forwarding cache entry */#define MRT_DEL_MFC	105	/* delete forwarding cache entry */#define MRT_VERSION	106	/* get kernel version number */#define MRT_ASSERT      107     /* enable assert processing */#define MRT_PIM		MRT_ASSERT /* enable PIM processing */#define MRT_API_SUPPORT	109	/* supported MRT API */#define MRT_API_CONFIG	110	/* config MRT API */#define MRT_ADD_BW_UPCALL 111	/* create bandwidth monitor */#define MRT_DEL_BW_UPCALL 112	/* delete bandwidth monitor */#define MRT_DEBUG 	120	/* enable debugging */#define GET_TIME(t)	microtime(&t)/* * Define common interface for timeval-related methods *//* * Types and macros for handling bitmaps with one bit per virtual interface. */#define	MAXVIFS 32typedef u_long vifbitmap_t;typedef u_short vifi_t;		/* type of a vif index */#define ALL_VIFS (vifi_t)-1#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)#define	VIFM_COPY(mfrom, mto)	((mto) = (mfrom))#define	VIFM_SAME(m1, m2)	((m1) == (m2))    typedef struct ipm_config_params {    CFG_DATA_HDR         cfgh;     FUNCPTR		 cfg_privInitSysctl;    } IPM_CONFIG_PARAMS;/* * Argument structure for MRT_ADD_VIF. * (MRT_DEL_VIF takes a single vifi_t argument.) */struct vifctl {	vifi_t	vifc_vifi;	    	/* the index of the vif to be added */	u_char	vifc_flags;     	/* VIFF_ flags defined below */	u_char	vifc_threshold; 	/* min ttl required to forward on vif */	u_int	vifc_rate_limit;	/* max rate */	struct	in_addr vifc_lcl_addr;	/* local interface address */	struct	in_addr vifc_rmt_addr;	/* remote address (tunnels only) */};#define	VIFF_TUNNEL	0x1		/* vif represents a tunnel end-point */#define VIFF_SRCRT	0x2		/* tunnel uses IP source routing */#define VIFF_REGISTER	0x4		/* used for PIM Register encap/decap *//* * Argument structure for MRT_ADD_MFC and MRT_DEL_MFC * XXX if you change this, make sure to change struct mfcctl2 as well. */struct mfcctl {    struct in_addr  mfcc_origin;		/* ip origin of mcasts       */    struct in_addr  mfcc_mcastgrp; 		/* multicast group associated*/    vifi_t	    mfcc_parent;   		/* incoming vif              */    u_char	    mfcc_ttls[MAXVIFS]; 	/* forwarding ttls on vifs   */};/* * The new argument structure for MRT_ADD_MFC and MRT_DEL_MFC overlays * and extends the old struct mfcctl. */struct mfcctl2 {	/* the mfcctl fields */	struct in_addr	mfcc_origin;		/* ip origin of mcasts	     */	struct in_addr	mfcc_mcastgrp;		/* multicast group associated*/	vifi_t		mfcc_parent;		/* incoming vif		     */	u_char		mfcc_ttls[MAXVIFS]; 	/* forwarding ttls on vifs   */	/* extension fields */	uint8_t		mfcc_flags[MAXVIFS];	/* the MRT_MFC_FLAGS_* flags */	struct in_addr	mfcc_rp;		/* the RP address            */};/* * The advanced-API flags. * * The MRT_MFC_FLAGS_XXX API flags are also used as flags * for the mfcc_flags field. */#define	MRT_MFC_FLAGS_DISABLE_WRONGVIF	(1 << 0) /* disable WRONGVIF signals */#define	MRT_MFC_FLAGS_BORDER_VIF	(1 << 1) /* border vif		     */#define MRT_MFC_RP			(1 << 8) /* enable RP address	     */#define MRT_MFC_BW_UPCALL		(1 << 9) /* enable bw upcalls	     */#define MRT_MFC_FLAGS_ALL		(MRT_MFC_FLAGS_DISABLE_WRONGVIF |    \					 MRT_MFC_FLAGS_BORDER_VIF)#define MRT_API_FLAGS_ALL		(MRT_MFC_FLAGS_ALL |		     \					 MRT_MFC_RP |			     \					 MRT_MFC_BW_UPCALL)/* * Structure for installing or delivering an upcall if the * measured bandwidth is above or below a threshold. * * User programs (e.g. daemons) may have a need to know when the * bandwidth used by some data flow is above or below some threshold. * This interface allows the userland to specify the threshold (in * bytes and/or packets) and the measurement interval. Flows are * all packet with the same source and destination IP address. * At the moment the code is only used for multicast destinations * but there is nothing that prevents its use for unicast. * * The measurement interval cannot be shorter than some Tmin (currently, 3s). * The threshold is set in packets and/or bytes per_interval. * * Measurement works as follows: * * For >= measurements:  * The first packet marks the start of a measurement interval. * During an interval we count packets and bytes, and when we * pass the threshold we deliver an upcall and we are done.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -