1 //==========================================================================
3 // include/netinet/igmp.h
7 //==========================================================================
8 //####BSDCOPYRIGHTBEGIN####
10 // -------------------------------------------
12 // Portions of this software may have been derived from OpenBSD or other sources,
13 // and are covered by the appropriate copyright disclaimers included herein.
15 // -------------------------------------------
17 //####BSDCOPYRIGHTEND####
18 //==========================================================================
19 //#####DESCRIPTIONBEGIN####
22 // Contributors: gthomas
28 //####DESCRIPTIONEND####
30 //==========================================================================
33 /* $OpenBSD: igmp.h,v 1.3 1999/08/08 00:43:00 niklas Exp $ */
34 /* $NetBSD: igmp.h,v 1.6 1995/05/31 06:08:21 mycroft Exp $ */
37 * Copyright (c) 1988 Stephen Deering.
38 * Copyright (c) 1992, 1993
39 * The Regents of the University of California. All rights reserved.
41 * This code is derived from software contributed to Berkeley by
42 * Stephen Deering of Stanford University.
44 * Redistribution and use in source and binary forms, with or without
45 * modification, are permitted provided that the following conditions
47 * 1. Redistributions of source code must retain the above copyright
48 * notice, this list of conditions and the following disclaimer.
49 * 2. Redistributions in binary form must reproduce the above copyright
50 * notice, this list of conditions and the following disclaimer in the
51 * documentation and/or other materials provided with the distribution.
52 * 3. All advertising materials mentioning features or use of this software
53 * must display the following acknowledgement:
54 * This product includes software developed by the University of
55 * California, Berkeley and its contributors.
56 * 4. Neither the name of the University nor the names of its contributors
57 * may be used to endorse or promote products derived from this software
58 * without specific prior written permission.
60 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
61 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
62 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
63 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
64 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
65 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
66 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
68 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
69 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
72 * @(#)igmp.h 8.1 (Berkeley) 6/10/93
75 #ifndef _NETINET_IGMP_H_
76 #define _NETINET_IGMP_H_
79 * Internet Group Management Protocol (IGMP) definitions.
88 u_int8_t igmp_type; /* version & type of IGMP message */
89 u_int8_t igmp_code; /* code for routing sub-messages */
90 u_int16_t igmp_cksum; /* IP-style checksum */
91 struct in_addr igmp_group; /* group address being reported */
92 }; /* (zero for queries) */
96 #define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* membership query */
97 #define IGMP_v1_HOST_MEMBERSHIP_REPORT 0x12 /* v1 membership report */
98 #define IGMP_DVMRP 0x13 /* DVMRP routing message */
99 #define IGMP_PIM 0x14 /* PIM routing message */
100 #define IGMP_v2_HOST_MEMBERSHIP_REPORT 0x16 /* v2 membership report */
101 #define IGMP_HOST_LEAVE_MESSAGE 0x17 /* leave-group message */
102 #define IGMP_MTRACE_REPLY 0x1e /* traceroute reply */
103 #define IGMP_MTRACE_QUERY 0x1f /* traceroute query */
105 #define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
106 /* query (in seconds) */
108 #define IGMP_TIMER_SCALE 10 /* denominator for igmp_timer */
111 * States for the IGMP v2 state table.
113 #define IGMP_DELAYING_MEMBER 1
114 #define IGMP_IDLE_MEMBER 2
115 #define IGMP_LAZY_MEMBER 3
116 #define IGMP_SLEEPING_MEMBER 4
117 #define IGMP_AWAKENING_MEMBER 5
120 * States for IGMP router version cache.
122 #define IGMP_v1_ROUTER 1
123 #define IGMP_v2_ROUTER 2
126 * Revert to v2 if we haven't heard from the router in this amount of time.
128 #define IGMP_AGE_THRESHOLD 540
131 void rti_delete __P((struct ifnet *));
134 #endif // _NETINET_IGMP_H_