Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


igmp.h
001: /* Copyright (C) 1997, 1999, 2003 Free Software Foundation, Inc.
002:    This file is part of the GNU C Library.
003: 
004:    The GNU C Library is free software; you can redistribute it and/or
005:    modify it under the terms of the GNU Lesser General Public
006:    License as published by the Free Software Foundation; either
007:    version 2.1 of the License, or (at your option) any later version.
008: 
009:    The GNU C Library is distributed in the hope that it will be useful,
010:    but WITHOUT ANY WARRANTY; without even the implied warranty of
011:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:    Lesser General Public License for more details.
013: 
014:    You should have received a copy of the GNU Lesser General Public
015:    License along with the GNU C Library; if not, write to the Free
016:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
017:    02111-1307 USA.  */
018: 
019: #ifndef _NETINET_IGMP_H
020: #define _NETINET_IGMP_H 1
021: 
022: #include <sys/cdefs.h>
023: #include <sys/types.h>
024: 
025: #ifdef __USE_BSD
026: 
027: #include <netinet/in.h>
028: 
029: __BEGIN_DECLS
030: 
031: /*
032:  * Copyright (c) 1988 Stephen Deering.
033:  * Copyright (c) 1992, 1993
034:  *      The Regents of the University of California.  All rights reserved.
035:  *
036:  * This code is derived from software contributed to Berkeley by
037:  * Stephen Deering of Stanford University.
038:  *
039:  * Redistribution and use in source and binary forms, with or without
040:  * modification, are permitted provided that the following conditions
041:  * are met:
042:  * 1. Redistributions of source code must retain the above copyright
043:  *    notice, this list of conditions and the following disclaimer.
044:  * 2. Redistributions in binary form must reproduce the above copyright
045:  *    notice, this list of conditions and the following disclaimer in the
046:  *    documentation and/or other materials provided with the distribution.
047:  * 4. Neither the name of the University nor the names of its contributors
048:  *    may be used to endorse or promote products derived from this software
049:  *    without specific prior written permission.
050:  *
051:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
052:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
053:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
054:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
055:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
056:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
057:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
058:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
059:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
060:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
061:  * SUCH DAMAGE.
062:  *
063:  *      @(#)igmp.h      8.1 (Berkeley) 6/10/93
064:  *      $FreeBSD$
065:  */
066: 
067: struct igmp {
068:   u_int8_t igmp_type;             /* IGMP type */
069:   u_int8_t igmp_code;             /* routing code */
070:   u_int16_t igmp_cksum;           /* checksum */
071:   struct in_addr igmp_group;      /* group address */
072: };
073: 
074: #define IGMP_MINLEN                     8
075: 
076: /*
077:  * Message types, including version number.
078:  */
079: #define IGMP_MEMBERSHIP_QUERY           0x11    /* membership query         */
080: #define IGMP_V1_MEMBERSHIP_REPORT       0x12    /* Ver. 1 membership report */
081: #define IGMP_V2_MEMBERSHIP_REPORT       0x16    /* Ver. 2 membership report */
082: #define IGMP_V2_LEAVE_GROUP             0x17    /* Leave-group message      */
083: 
084: #define IGMP_DVMRP                      0x13    /* DVMRP routing message    */
085: #define IGMP_PIM                        0x14    /* PIM routing message      */
086: #define IGMP_TRACE                      0x15
087: 
088: #define IGMP_MTRACE_RESP                0x1e    /* traceroute resp.(to sender)*/
089: #define IGMP_MTRACE                     0x1f    /* mcast traceroute messages  */
090: 
091: #define IGMP_MAX_HOST_REPORT_DELAY      10      /* max delay for response to     */
092:                                                 /*  query (in seconds) according */
093:                                                 /*  to RFC1112                   */
094: #define IGMP_TIMER_SCALE                10      /* denotes that the igmp code field */
095:                                                 /* specifies time in 10th of seconds*/
096: 
097: /*
098:  * States for the IGMP v2 state table.
099:  */
100: #define IGMP_DELAYING_MEMBER    1
101: #define IGMP_IDLE_MEMBER        2
102: #define IGMP_LAZY_MEMBER        3
103: #define IGMP_SLEEPING_MEMBER    4
104: #define IGMP_AWAKENING_MEMBER   5
105: 
106: /*
107:  * States for IGMP router version cache.
108:  */
109: #define IGMP_v1_ROUTER          1
110: #define IGMP_v2_ROUTER          2
111: 
112: /*
113:  * The following four defininitions are for backwards compatibility.
114:  * They should be removed as soon as all applications are updated to
115:  * use the new constant names.
116:  */
117: #define IGMP_HOST_MEMBERSHIP_QUERY      IGMP_MEMBERSHIP_QUERY
118: #define IGMP_HOST_MEMBERSHIP_REPORT     IGMP_V1_MEMBERSHIP_REPORT
119: #define IGMP_HOST_NEW_MEMBERSHIP_REPORT IGMP_V2_MEMBERSHIP_REPORT
120: #define IGMP_HOST_LEAVE_MESSAGE         IGMP_V2_LEAVE_GROUP
121: 
122: __END_DECLS
123: 
124: #endif
125: 
126: #endif  /* netinet/igmp.h */
127: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/