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

📄 pim.h

📁 vxworks 6.x 的全部头文件
💻 H
字号:
/* pim.h - PIM header file *//* * Copyright (c) 2001-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) 1996-2000 * University of Southern California/Information Sciences Institute. * All rights reserved. * * 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. Neither the name of the project 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 PROJECT 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 PROJECT 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. * * $FreeBSD: /repoman/r/ncvs/src/sys/netinet/pim.h,v 1.1.2.1 2003/08/24 17:04:44 hsu Exp $ *//*modification history--------------------01a,25feb05,niq  Created*/#ifndef _NETINET_PIM_H_#define _NETINET_PIM_H_#ifdef __cplusplusextern "C" {#endif/* * Protocol Independent Multicast (PIM) definitions. * RFC 2362, June 1998. * * Written by Ahmed Helmy, USC/SGI, July 1996. * Modified by George Edmond Eddy (Rusty), ISI, February 1998. * Modified by Pavlin Radoslavov, USC/ISI, May 1998, October 2000. */#ifndef _PIM_VT#ifndef _BYTE_ORDER# error _BYTE_ORDER is not defined!#endif#if (_BYTE_ORDER != _BIG_ENDIAN) && (_BYTE_ORDER != _LITTLE_ENDIAN)# error _BYTE_ORDER must be defined to either _BIG_ENDIAN or _LITTLE_ENDIAN#endif#endif /* ! _PIM_VT *//* * PIM packet header */struct pim {#ifdef _PIM_VT	uint8_t		pim_vt;		/* PIM version and message type	*/#else /* ! _PIM_VT   */#if _BYTE_ORDER == _BIG_ENDIAN	u_int		pim_vers:4,	/* PIM protocol version		*/			pim_type:4;	/* PIM message type		*/#endif#if _BYTE_ORDER == _LITTLE_ENDIAN	u_int		pim_type:4,	/* PIM message type		*/			pim_vers:4;	/* PIM protocol version		*/#endif#endif /* ! _PIM_VT  */	uint8_t		pim_reserved;	/* Reserved			*/	uint16_t	pim_cksum;	/* IP-style checksum		*/};/* KAME-related name backward compatibility */#define pim_ver pim_vers#define pim_rsv pim_reserved#ifdef _PIM_VT#define PIM_MAKE_VT(v, t)	(0xff & (((v) << 4) | (0x0f & (t))))#define PIM_VT_V(x)		(((x) >> 4) & 0x0f)#define PIM_VT_T(x)		((x) & 0x0f)#endif /* _PIM_VT */#define PIM_VERSION		2#define PIM_MINLEN		8	/* PIM message min. length	*/#define PIM_REG_MINLEN	(PIM_MINLEN+20)	/* PIM Register hdr + inner IPv4 hdr */#define PIM6_REG_MINLEN	(PIM_MINLEN+40)	/* PIM Register hdr + inner IPv6 hdr *//* * PIM message types */#define PIM_HELLO		0x0	/* PIM-SM and PIM-DM		*/#define PIM_REGISTER		0x1	/* PIM-SM only			*/#define PIM_REGISTER_STOP	0x2	/* PIM-SM only			*/#define PIM_JOIN_PRUNE		0x3	/* PIM-SM and PIM-DM		*/#define PIM_BOOTSTRAP		0x4	/* PIM-SM only			*/#define PIM_ASSERT		0x5	/* PIM-SM and PIM-DM		*/#define PIM_GRAFT		0x6	/* PIM-DM only			*/#define PIM_GRAFT_ACK		0x7	/* PIM-DM only			*/#define PIM_CAND_RP_ADV		0x8	/* PIM-SM only			*/#define PIM_ALL_DF_ELECTION	0xa	/* Bidir-PIM-SM only		*//* * PIM-Register message flags */#define PIM_BORDER_REGISTER 0x80000000U	/* The Border bit (host-order)	*/#define PIM_NULL_REGISTER   0x40000000U	/* The Null-Register bit (host-order)*//* * All-PIM-Routers IPv4 and IPv6 multicast addresses */#define INADDR_ALLPIM_ROUTERS_GROUP	(uint32_t)0xe000000dU  /* 224.0.0.13 */#define IN6ADDR_LINKLOCAL_ALLPIM_ROUTERS	"ff02::d"#define IN6ADDR_LINKLOCAL_ALLPIM_ROUTERS_INIT				\	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,		\	    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d }}}#ifdef __cplusplus}#endif    #endif /* _NETINET_PIM_H_ */

⌨️ 快捷键说明

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