Annotation of embedaddon/pimd/igmpv3.h, revision 1.1
1.1 ! misho 1: /*
! 2: * Copyright (c) 1998-2001
! 3: * University of Southern California/Information Sciences Institute.
! 4: * All rights reserved.
! 5: *
! 6: * Redistribution and use in source and binary forms, with or without
! 7: * modification, are permitted provided that the following conditions
! 8: * are met:
! 9: * 1. Redistributions of source code must retain the above copyright
! 10: * notice, this list of conditions and the following disclaimer.
! 11: * 2. Redistributions in binary form must reproduce the above copyright
! 12: * notice, this list of conditions and the following disclaimer in the
! 13: * documentation and/or other materials provided with the distribution.
! 14: * 3. Neither the name of the project nor the names of its contributors
! 15: * may be used to endorse or promote products derived from this software
! 16: * without specific prior written permission.
! 17: *
! 18: * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
! 19: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 20: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 21: * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
! 22: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 23: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 24: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 25: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 26: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 27: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 28: * SUCH DAMAGE.
! 29: */
! 30:
! 31: #ifndef __PIMD_IGMPV3_H__
! 32: #define __PIMD_IGMPV3_H__
! 33:
! 34: /*
! 35: * IGMPv3 report modes.
! 36: */
! 37: #ifndef IGMP_MODE_IS_INCLUDE
! 38: #define IGMP_DO_NOTHING 0 /* don't send a record */
! 39: #define IGMP_MODE_IS_INCLUDE 1 /* MODE_IN */
! 40: #define IGMP_MODE_IS_EXCLUDE 2 /* MODE_EX */
! 41: #define IGMP_CHANGE_TO_INCLUDE_MODE 3 /* TO_IN */
! 42: #define IGMP_CHANGE_TO_EXCLUDE_MODE 4 /* TO_EX */
! 43: #define IGMP_ALLOW_NEW_SOURCES 5 /* ALLOW_NEW */
! 44: #define IGMP_BLOCK_OLD_SOURCES 6 /* BLOCK_OLD */
! 45: #endif
! 46:
! 47: struct igmpv3_query {
! 48: uint8_t type;
! 49: uint8_t code;
! 50: uint16_t csum;
! 51: uint32_t group;
! 52: #if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)
! 53: uint8_t qrv:3,
! 54: suppress:1,
! 55: resv:4;
! 56: #else
! 57: uint8_t resv:4,
! 58: suppress:1,
! 59: qrv:3;
! 60: #endif
! 61: uint8_t qqic;
! 62: uint16_t nsrcs;
! 63: uint32_t srcs[0];
! 64: };
! 65:
! 66: struct igmpv3_grec {
! 67: uint8_t grec_type;
! 68: uint8_t grec_auxwords;
! 69: uint16_t grec_nsrcs;
! 70: uint32_t grec_mca;
! 71: uint32_t grec_src[0];
! 72: };
! 73:
! 74: #define IGMP_GRPREC_HDRLEN 8
! 75: #define IGMP_V3_GROUP_RECORD_MIN_SIZE 8
! 76:
! 77: struct igmpv3_report {
! 78: uint8_t type;
! 79: uint8_t resv1;
! 80: uint16_t csum;
! 81: uint16_t resv2;
! 82: uint16_t ngrec;
! 83: struct igmpv3_grec grec[0];
! 84: };
! 85:
! 86: #ifndef IGMP_V3_REPORT_MINLEN
! 87: #define IGMP_V3_REPORT_MINLEN 8
! 88: #define IGMP_V3_REPORT_MAXRECS 65535
! 89: #endif
! 90:
! 91: #endif /* __PIMD_IGMPV3_H__ */
! 92:
! 93: /**
! 94: * Local Variables:
! 95: * version-control: t
! 96: * indent-tabs-mode: t
! 97: * c-file-style: "ellemtel"
! 98: * c-basic-offset: 4
! 99: * End:
! 100: */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>