Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
igmp.h
00001 /** 00002 * @file 00003 * IGMP protocol definitions 00004 */ 00005 00006 /* 00007 * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 00008 * All rights reserved. 00009 * 00010 * Redistribution and use in source and binary forms, with or without modification, 00011 * are permitted provided that the following conditions are met: 00012 * 00013 * 1. Redistributions of source code must retain the above copyright notice, 00014 * this list of conditions and the following disclaimer. 00015 * 2. Redistributions in binary form must reproduce the above copyright notice, 00016 * this list of conditions and the following disclaimer in the documentation 00017 * and/or other materials provided with the distribution. 00018 * 3. The name of the author may not be used to endorse or promote products 00019 * derived from this software without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 00022 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00023 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00024 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00025 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00026 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00027 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00028 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00029 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00030 * OF SUCH DAMAGE. 00031 * 00032 * This file is part of the lwIP TCP/IP stack. 00033 * 00034 * Author: Adam Dunkels <adam@sics.se> 00035 * 00036 */ 00037 #ifndef LWIP_HDR_PROT_IGMP_H 00038 #define LWIP_HDR_PROT_IGMP_H 00039 00040 #include "lwip/arch.h" 00041 #include "lwip/ip4_addr.h" 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00047 /* 00048 * IGMP constants 00049 */ 00050 #define IGMP_TTL 1 00051 #define IGMP_MINLEN 8 00052 #define ROUTER_ALERT 0x9404U 00053 #define ROUTER_ALERTLEN 4 00054 00055 /* 00056 * IGMP message types, including version number. 00057 */ 00058 #define IGMP_MEMB_QUERY 0x11 /* Membership query */ 00059 #define IGMP_V1_MEMB_REPORT 0x12 /* Ver. 1 membership report */ 00060 #define IGMP_V2_MEMB_REPORT 0x16 /* Ver. 2 membership report */ 00061 #define IGMP_LEAVE_GROUP 0x17 /* Leave-group message */ 00062 00063 /* Group membership states */ 00064 #define IGMP_GROUP_NON_MEMBER 0 00065 #define IGMP_GROUP_DELAYING_MEMBER 1 00066 #define IGMP_GROUP_IDLE_MEMBER 2 00067 00068 /** 00069 * IGMP packet format. 00070 */ 00071 #ifdef PACK_STRUCT_USE_INCLUDES 00072 # include "arch/bpstruct.h" 00073 #endif 00074 PACK_STRUCT_BEGIN 00075 struct igmp_msg { 00076 PACK_STRUCT_FLD_8(u8_t igmp_msgtype); 00077 PACK_STRUCT_FLD_8(u8_t igmp_maxresp); 00078 PACK_STRUCT_FIELD(u16_t igmp_checksum); 00079 PACK_STRUCT_FLD_S(ip4_addr_p_t igmp_group_address); 00080 } PACK_STRUCT_STRUCT; 00081 PACK_STRUCT_END 00082 #ifdef PACK_STRUCT_USE_INCLUDES 00083 # include "arch/epstruct.h" 00084 #endif 00085 00086 #ifdef __cplusplus 00087 } 00088 #endif 00089 00090 #endif /* LWIP_HDR_PROT_IGMP_H */
Generated on Tue Jul 12 2022 12:44:22 by
