4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _NETINET_IGMP_VAR_H
27 #define _NETINET_IGMP_VAR_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
36 * Internet Group Management Protocol (IGMP),
37 * implementation-specific definitions.
39 * Written by Steve Deering, Stanford, May 1988.
40 * Modified by Ajit Thyagarajan, PARC, August 1994.
46 uint_t igps_rcv_total
; /* total IGMP messages received */
47 uint_t igps_rcv_tooshort
; /* received with too few bytes */
48 uint_t igps_rcv_badsum
; /* received with bad checksum */
49 uint_t igps_rcv_queries
; /* received membership queries */
50 uint_t igps_rcv_badqueries
; /* received invalid queries */
51 uint_t igps_rcv_reports
; /* received membership reports */
52 uint_t igps_rcv_badreports
; /* received invalid reports */
53 uint_t igps_rcv_ourreports
; /* received reports for our groups */
54 uint_t igps_snd_reports
; /* sent membership reports */
59 * slowtimo interval used for both IGMP and MLD
61 #define MCAST_SLOWTIMO_INTERVAL 10000 /* milliseconds */
65 * Macro to compute a random timer value between 1 and maxticks.
66 * Include <sys/random.h> for random_get_pseudo_bytes() declaration.
68 #include <sys/random.h>
69 #define MCAST_RANDOM_DELAY(timer, maxticks) \
70 /* uint_t timer; int maxticks */ \
71 (void) random_get_pseudo_bytes((uint8_t *)&(timer), sizeof (uint_t)); \
72 (timer) = ((uint_t)(timer) % (maxticks)) + 1
75 * States for IGMPv2's leave processing
77 #define IGMP_OTHERMEMBER 0
78 #define IGMP_IREPORTEDLAST 1
81 * We must remember what version the subnet's querier is.
83 #define IGMP_V1_ROUTER 0
84 #define IGMP_V2_ROUTER 1
85 #define IGMP_V3_ROUTER 2
88 * Map MLD versions to corresponding IGMP versions
90 #define MLD_V1_ROUTER IGMP_V2_ROUTER
91 #define MLD_V2_ROUTER IGMP_V3_ROUTER
94 * Default values for various IGMPv3/MLDv2 values
96 #define MCAST_DEF_ROBUSTNESS 2
97 #define MCAST_QUERY_RESP_INTERVAL 10 /* in seconds */
98 #define MCAST_DEF_QUERY_INTERVAL 125 /* in seconds */
99 #define MCAST_DEF_QUERY_RESP_INTERVAL 100 /* in tenths of secs */
100 #define MCAST_DEF_UNSOL_RPT_INTERVAL 1 /* in seconds */
103 * IGMP and MLD mandate a TTL/Hop Limit of 1 for protocol messages
106 #define MLD_HOP_LIMIT 1
114 #endif /* _NETINET_IGMP_VAR_H */