| 1 | /* Copyright (C) 1997, 1999 Free Software Foundation, Inc. |
|---|
| 2 | This file is part of the GNU C Library. |
|---|
| 3 | |
|---|
| 4 | The GNU C Library is free software; you can redistribute it and/or |
|---|
| 5 | modify it under the terms of the GNU Lesser General Public |
|---|
| 6 | License as published by the Free Software Foundation; either |
|---|
| 7 | version 2.1 of the License, or (at your option) any later version. |
|---|
| 8 | |
|---|
| 9 | The GNU C Library is distributed in the hope that it will be useful, |
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 12 | Lesser General Public License for more details. |
|---|
| 13 | |
|---|
| 14 | You should have received a copy of the GNU Lesser General Public |
|---|
| 15 | License along with the GNU C Library; if not, write to the Free |
|---|
| 16 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
|---|
| 17 | 02111-1307 USA. */ |
|---|
| 18 | |
|---|
| 19 | #ifndef _NETINET_IGMP_H |
|---|
| 20 | #define _NETINET_IGMP_H 1 |
|---|
| 21 | |
|---|
| 22 | #include <sys/cdefs.h> |
|---|
| 23 | #include <sys/types.h> |
|---|
| 24 | |
|---|
| 25 | #include <asm/types.h> |
|---|
| 26 | #include <linux/igmp.h> |
|---|
| 27 | |
|---|
| 28 | #ifdef __USE_BSD |
|---|
| 29 | |
|---|
| 30 | #include <netinet/in.h> |
|---|
| 31 | |
|---|
| 32 | __BEGIN_DECLS |
|---|
| 33 | |
|---|
| 34 | /* |
|---|
| 35 | * Copyright (c) 1988 Stephen Deering. |
|---|
| 36 | * Copyright (c) 1992, 1993 |
|---|
| 37 | * The Regents of the University of California. All rights reserved. |
|---|
| 38 | * |
|---|
| 39 | * This code is derived from software contributed to Berkeley by |
|---|
| 40 | * Stephen Deering of Stanford University. |
|---|
| 41 | * |
|---|
| 42 | * Redistribution and use in source and binary forms, with or without |
|---|
| 43 | * modification, are permitted provided that the following conditions |
|---|
| 44 | * are met: |
|---|
| 45 | * 1. Redistributions of source code must retain the above copyright |
|---|
| 46 | * notice, this list of conditions and the following disclaimer. |
|---|
| 47 | * 2. Redistributions in binary form must reproduce the above copyright |
|---|
| 48 | * notice, this list of conditions and the following disclaimer in the |
|---|
| 49 | * documentation and/or other materials provided with the distribution. |
|---|
| 50 | * 4. Neither the name of the University nor the names of its contributors |
|---|
| 51 | * may be used to endorse or promote products derived from this software |
|---|
| 52 | * without specific prior written permission. |
|---|
| 53 | * |
|---|
| 54 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
|---|
| 55 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|---|
| 56 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|---|
| 57 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
|---|
| 58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|---|
| 59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
|---|
| 60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
|---|
| 61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|---|
| 62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
|---|
| 63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|---|
| 64 | * SUCH DAMAGE. |
|---|
| 65 | * |
|---|
| 66 | * @(#)igmp.h 8.1 (Berkeley) 6/10/93 |
|---|
| 67 | * $FreeBSD$ |
|---|
| 68 | */ |
|---|
| 69 | |
|---|
| 70 | struct igmp { |
|---|
| 71 | u_int8_t igmp_type; /* IGMP type */ |
|---|
| 72 | u_int8_t igmp_code; /* routing code */ |
|---|
| 73 | u_int16_t igmp_cksum; /* checksum */ |
|---|
| 74 | struct in_addr igmp_group; /* group address */ |
|---|
| 75 | }; |
|---|
| 76 | |
|---|
| 77 | /* |
|---|
| 78 | * Message types, including version number. |
|---|
| 79 | */ |
|---|
| 80 | #define IGMP_MEMBERSHIP_QUERY 0x11 /* membership query */ |
|---|
| 81 | #define IGMP_V1_MEMBERSHIP_REPORT 0x12 /* Ver. 1 membership report */ |
|---|
| 82 | #define IGMP_V2_MEMBERSHIP_REPORT 0x16 /* Ver. 2 membership report */ |
|---|
| 83 | #define IGMP_V2_LEAVE_GROUP 0x17 /* Leave-group message */ |
|---|
| 84 | |
|---|
| 85 | __END_DECLS |
|---|
| 86 | |
|---|
| 87 | #endif |
|---|
| 88 | |
|---|
| 89 | #endif /* netinet/igmp.h */ |
|---|