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

📄 igmp.h

📁 用于嵌入式系统的TCP/IP协议栈及若干服务
💻 H
字号:
/**            Copyright (c) 1998-2001 by NETsilicon Inc.**  This software is copyrighted by and is the sole property of*  NETsilicon.  All rights, title, ownership, or other interests*  in the software remain the property of NETsilicon.  This*  software may only be used in accordance with the corresponding*  license agreement.  Any unauthorized use, duplication, transmission,*  distribution, or disclosure of this software is expressly forbidden.**  This Copyright notice may not be removed or modified without prior*  written consent of NETsilicon.**  NETsilicon, reserves the right to modify this software*  without notice.**  NETsilicon*  411 Waverley Oaks Road                  USA 781.647.1234*  Suite 227                               http://www.netsilicon.com*  Waltham, MA 02452                       AmericaSales@netsilicon.com***************************************************************************  $Name: Fusion 6.52 Fusion 6.51 $*  $Date: 2001/09/20 10:19:19 $*  $Source: M:/psisrc/stack/incl/rcs/igmp.h $*  $Revision: 1.11 $**************************************************************************  File Description:  Header for igmp.c***************************************************************************/#ifndef _IGMP_#define _IGMP_#include "config.h"#include "ccdep.h"#include "q.h"#include "std.h"#include "timer.h"/* For IGMP v2.  There is no longer a version.  The * full byte is used for a type field.  However, this is * backwards compatible since the upper nibble is always 1.  #define IGMP_QUERY	1#define IGMP_REPORT	2#define IGMP_VERSION	1		*/#define IGMP_QUERY		0x11#define IGMP_V2_REPORT	0x16#define IGMP_V2_LEAVE	0x17#define IGMP_V1_REPORT	0x12#ifndef IGMP_CNT#define IGMP_CNT	10	/* default ICMP count */#endif /* IGMP_CNT */#define IGMP_ALLHOST	0xe0000001#define IGMP_ALLROUTER  0xe0000002/* MAT:  IGMP_V1_ROUTER_PRESENT_TIMEOUT is the time a V2 host must wait after   hearing a V1 membership query (Max response time of zero) before it can    respond to query with a IGMP_V2_REPORT. Until IGMP_V1_ROUTER_PRESENT_TIMEOUT   expires the host must respond to all queries with a V1 report.*/#ifndef IGMP_V1_ROUTER_PRESENT_TIMEOUT#define IGMP_V1_ROUTER_PRESENT_TIMEOUT	400 /* Seconds */#endiftypedef struct sigmp_entry {/* OL: re-arranged for 32-bit alignment */	u8				state;		/* igmp state see below	*/	u8				refs;		/* reference count */	u16				pad;	struct netdev			*ndp;		/* device driver */	u32				ip_multi;	/* multicast IP address */	tcb				*timer;		/* timer queue for this entry */	u8				last_2_report; /* Flag set to 1 indicating we were the last host									  to send a report and cleared when we see a 									  report from another host.									*/	u32				seed;} igmp_entry;/* 7/12/96 ML: conflicts with igmp.c.extern igmp_entry *igmp_tbl;*//* igmp stat */#define IGMP_FREE		0#define IGMP_DELAY		1#define IGMP_IDLE		2#define IGMP_STATIC		3typedef u8 IGMP_T;#define IGMP_T_IGMP_TYPE    0                   /* message type, 1 byte */#define IGMP_T_MAX_RESP_TIME IGMP_T_IGMP_TYPE+1  /* error code, 1 byte */#define IGMP_T_IGMP_CHECKSUM IGMP_T_MAX_RESP_TIME+1 /* checksum, 2 bytes */#define IGMP_T_IP_ADDR  	IGMP_T_IGMP_CHECKSUM+2 /* miscellaneous fields, 4 bytes */#define SIZEOF_IGMP_T       (IGMP_T_IP_ADDR+4)#define IGMP_VER(igmphp) (((igmphp)[IGMP_T_IGMP_TYPE] >> 4) & 0xf)/* For IGMPv2 the type is now the full byte.  MAT #define IGMP_TP(igmphp) ((igmphp)->igmp_type & 0xf)*/#define IGMP_TP(igmphp) (igmphp)[IGMP_T_IGMP_TYPE]#endif /* _IGMP_ */

⌨️ 快捷键说明

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