igmp.h 3.6 KB

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