#include <netinet/igmp.h>

netinet/igmp.h

includes: sys/appleapiopts.h, netinet/in.h, sys/types.h
33 macros · 4 structs

macroIGMP_MINLEN

Minimum length of any IGMP protocol message.
#define IGMP_MINLEN 8

structigmp

IGMPv1/v2 query and host report format.
size 8, align 4
u_charigmp_typeversion & type of IGMP message
u_charigmp_codesubtype for routing msgs
u_shortigmp_cksumIP-style checksum
struct in_addrigmp_groupgroup address being reported
(zero for queries)

structigmpv3

IGMP v3 query format.
size 12, align 4
u_charigmp_typeversion & type of IGMP message
u_charigmp_codesubtype for routing msgs
u_shortigmp_cksumIP-style checksum
struct in_addrigmp_groupgroup address being reported
u_charigmp_misc(zero for queries) reserved/suppress/robustness
u_charigmp_qqiquerier's query interval
u_shortigmp_numsrcnumber of sources

macroIGMP_V3_QUERY_MINLEN

#define IGMP_V3_QUERY_MINLEN 12

macroIGMP_V3_QUERY_MAX_SRCS

#define IGMP_V3_QUERY_MAX_SRCS 366
From RFC 3376, section 4.1.8

macroIGMP_EXP

#define IGMP_EXP(x) (((x) >> 4) & 0x07)

macroIGMP_MANT

#define IGMP_MANT(x) ((x) & 0x0f)

macroIGMP_QRESV

#define IGMP_QRESV(x) (((x) >> 4) & 0x0f)

macroIGMP_SFLAG

#define IGMP_SFLAG(x) (((x) >> 3) & 0x01)

macroIGMP_QRV

#define IGMP_QRV(x) ((x) & 0x07)

structigmp_grouprec

size 8, align 4
u_charig_typerecord type
u_charig_datalenlength of auxiliary data
u_shortig_numsrcnumber of sources
struct in_addrig_groupgroup address being reported

macroIGMP_GRPREC_HDRLEN

#define IGMP_GRPREC_HDRLEN 8

structigmp_report

IGMPv3 host membership report header.
size 8, align 2
u_charir_typeIGMP_v3_HOST_MEMBERSHIP_REPORT
u_charir_rsv1must be zero
u_shortir_cksumchecksum
u_shortir_rsv2must be zero
u_shortir_numgrpsnumber of group records

macroIGMP_V3_REPORT_MINLEN

#define IGMP_V3_REPORT_MINLEN 8

macroIGMP_V3_REPORT_MAXRECS

#define IGMP_V3_REPORT_MAXRECS 65535

macroIGMP_HOST_MEMBERSHIP_QUERY

Message types, including version number.
#define IGMP_HOST_MEMBERSHIP_QUERY 0x11
membership query

macroIGMP_v1_HOST_MEMBERSHIP_REPORT

#define IGMP_v1_HOST_MEMBERSHIP_REPORT 0x12
Ver. 1 membership report

macroIGMP_DVMRP

#define IGMP_DVMRP 0x13
DVMRP routing message

macroIGMP_PIM

#define IGMP_PIM 0x14
PIMv1 message (historic)

macroIGMP_v2_HOST_MEMBERSHIP_REPORT

#define IGMP_v2_HOST_MEMBERSHIP_REPORT 0x16
Ver. 2 membership report

macroIGMP_HOST_LEAVE_MESSAGE

#define IGMP_HOST_LEAVE_MESSAGE 0x17
Leave-group message

macroIGMP_MTRACE_REPLY

#define IGMP_MTRACE_REPLY 0x1e
mtrace(8) reply

macroIGMP_MTRACE_QUERY

#define IGMP_MTRACE_QUERY 0x1f
mtrace(8) probe

macroIGMP_v3_HOST_MEMBERSHIP_REPORT

#define IGMP_v3_HOST_MEMBERSHIP_REPORT 0x22
Ver. 3 membership report

macroIGMP_DO_NOTHING

IGMPv3 report modes.
#define IGMP_DO_NOTHING 0
don't send a record

macroIGMP_MODE_IS_INCLUDE

#define IGMP_MODE_IS_INCLUDE 1
MODE_IN

macroIGMP_MODE_IS_EXCLUDE

#define IGMP_MODE_IS_EXCLUDE 2
MODE_EX

macroIGMP_CHANGE_TO_INCLUDE_MODE

#define IGMP_CHANGE_TO_INCLUDE_MODE 3
TO_IN

macroIGMP_CHANGE_TO_EXCLUDE_MODE

#define IGMP_CHANGE_TO_EXCLUDE_MODE 4
TO_EX

macroIGMP_ALLOW_NEW_SOURCES

#define IGMP_ALLOW_NEW_SOURCES 5
ALLOW_NEW

macroIGMP_BLOCK_OLD_SOURCES

#define IGMP_BLOCK_OLD_SOURCES 6
BLOCK_OLD

macroIGMP_V3_GENERAL_QUERY

IGMPv3 query types.
#define IGMP_V3_GENERAL_QUERY 1

macroIGMP_V3_GROUP_QUERY

#define IGMP_V3_GROUP_QUERY 2

macroIGMP_V3_GROUP_SOURCE_QUERY

#define IGMP_V3_GROUP_SOURCE_QUERY 3

macroIGMP_V1V2_MAX_RI

Maximum report interval for IGMP v1/v2 host membership reports [RFC 1112]
#define IGMP_V1V2_MAX_RI 10

macroIGMP_MAX_HOST_REPORT_DELAY

#define IGMP_MAX_HOST_REPORT_DELAY IGMP_V1V2_MAX_RI

macroIGMP_TIMER_SCALE

IGMP_TIMER_SCALE denotes that the igmp code field specifies time in tenths of a second.
#define IGMP_TIMER_SCALE 10