Blame inet/netinet/igmp.h

Packit Service 82fcde
/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
#ifndef _NETINET_IGMP_H
Packit Service 82fcde
#define	_NETINET_IGMP_H 1
Packit Service 82fcde
Packit Service 82fcde
#include <sys/cdefs.h>
Packit Service 82fcde
#include <sys/types.h>
Packit Service 82fcde
Packit Service 82fcde
#ifdef __USE_MISC
Packit Service 82fcde
Packit Service 82fcde
#include <netinet/in.h>
Packit Service 82fcde
Packit Service 82fcde
__BEGIN_DECLS
Packit Service 82fcde
Packit Service 82fcde
/*
Packit Service 82fcde
 * Copyright (c) 1988 Stephen Deering.
Packit Service 82fcde
 * Copyright (c) 1992, 1993
Packit Service 82fcde
 *	The Regents of the University of California.  All rights reserved.
Packit Service 82fcde
 *
Packit Service 82fcde
 * This code is derived from software contributed to Berkeley by
Packit Service 82fcde
 * Stephen Deering of Stanford University.
Packit Service 82fcde
 *
Packit Service 82fcde
 * Redistribution and use in source and binary forms, with or without
Packit Service 82fcde
 * modification, are permitted provided that the following conditions
Packit Service 82fcde
 * are met:
Packit Service 82fcde
 * 1. Redistributions of source code must retain the above copyright
Packit Service 82fcde
 *    notice, this list of conditions and the following disclaimer.
Packit Service 82fcde
 * 2. Redistributions in binary form must reproduce the above copyright
Packit Service 82fcde
 *    notice, this list of conditions and the following disclaimer in the
Packit Service 82fcde
 *    documentation and/or other materials provided with the distribution.
Packit Service 82fcde
 * 4. Neither the name of the University nor the names of its contributors
Packit Service 82fcde
 *    may be used to endorse or promote products derived from this software
Packit Service 82fcde
 *    without specific prior written permission.
Packit Service 82fcde
 *
Packit Service 82fcde
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
Packit Service 82fcde
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit Service 82fcde
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit Service 82fcde
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
Packit Service 82fcde
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit Service 82fcde
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit Service 82fcde
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit Service 82fcde
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit Service 82fcde
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit Service 82fcde
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit Service 82fcde
 * SUCH DAMAGE.
Packit Service 82fcde
 *
Packit Service 82fcde
 *	@(#)igmp.h	8.1 (Berkeley) 6/10/93
Packit Service 82fcde
 *	$FreeBSD$
Packit Service 82fcde
 */
Packit Service 82fcde
Packit Service 82fcde
struct igmp {
Packit Service 82fcde
  uint8_t igmp_type;             /* IGMP type */
Packit Service 82fcde
  uint8_t igmp_code;             /* routing code */
Packit Service 82fcde
  uint16_t igmp_cksum;           /* checksum */
Packit Service 82fcde
  struct in_addr igmp_group;     /* group address */
Packit Service 82fcde
};
Packit Service 82fcde
Packit Service 82fcde
#define IGMP_MINLEN			8
Packit Service 82fcde
Packit Service 82fcde
/*
Packit Service 82fcde
 * Message types, including version number.
Packit Service 82fcde
 */
Packit Service 82fcde
#define IGMP_MEMBERSHIP_QUERY   	0x11	/* membership query         */
Packit Service 82fcde
#define IGMP_V1_MEMBERSHIP_REPORT	0x12	/* Ver. 1 membership report */
Packit Service 82fcde
#define IGMP_V2_MEMBERSHIP_REPORT	0x16	/* Ver. 2 membership report */
Packit Service 82fcde
#define IGMP_V2_LEAVE_GROUP		0x17	/* Leave-group message	    */
Packit Service 82fcde
Packit Service 82fcde
#define IGMP_DVMRP			0x13	/* DVMRP routing message    */
Packit Service 82fcde
#define IGMP_PIM			0x14	/* PIM routing message      */
Packit Service 82fcde
#define IGMP_TRACE			0x15
Packit Service 82fcde
Packit Service 82fcde
#define IGMP_MTRACE_RESP		0x1e	/* traceroute resp.(to sender)*/
Packit Service 82fcde
#define IGMP_MTRACE			0x1f	/* mcast traceroute messages  */
Packit Service 82fcde
Packit Service 82fcde
#define IGMP_MAX_HOST_REPORT_DELAY	10	/* max delay for response to     */
Packit Service 82fcde
						/*  query (in seconds) according */
Packit Service 82fcde
						/*  to RFC1112                   */
Packit Service 82fcde
#define IGMP_TIMER_SCALE		10	/* denotes that the igmp code field */
Packit Service 82fcde
						/* specifies time in 10th of seconds*/
Packit Service 82fcde
Packit Service 82fcde
/*
Packit Service 82fcde
 * States for the IGMP v2 state table.
Packit Service 82fcde
 */
Packit Service 82fcde
#define IGMP_DELAYING_MEMBER	1
Packit Service 82fcde
#define IGMP_IDLE_MEMBER	2
Packit Service 82fcde
#define IGMP_LAZY_MEMBER	3
Packit Service 82fcde
#define IGMP_SLEEPING_MEMBER	4
Packit Service 82fcde
#define IGMP_AWAKENING_MEMBER	5
Packit Service 82fcde
Packit Service 82fcde
/*
Packit Service 82fcde
 * States for IGMP router version cache.
Packit Service 82fcde
 */
Packit Service 82fcde
#define IGMP_v1_ROUTER		1
Packit Service 82fcde
#define IGMP_v2_ROUTER		2
Packit Service 82fcde
Packit Service 82fcde
/*
Packit Service 82fcde
 * The following four defininitions are for backwards compatibility.
Packit Service 82fcde
 * They should be removed as soon as all applications are updated to
Packit Service 82fcde
 * use the new constant names.
Packit Service 82fcde
 */
Packit Service 82fcde
#define IGMP_HOST_MEMBERSHIP_QUERY	IGMP_MEMBERSHIP_QUERY
Packit Service 82fcde
#define IGMP_HOST_MEMBERSHIP_REPORT	IGMP_V1_MEMBERSHIP_REPORT
Packit Service 82fcde
#define IGMP_HOST_NEW_MEMBERSHIP_REPORT	IGMP_V2_MEMBERSHIP_REPORT
Packit Service 82fcde
#define IGMP_HOST_LEAVE_MESSAGE		IGMP_V2_LEAVE_GROUP
Packit Service 82fcde
Packit Service 82fcde
__END_DECLS
Packit Service 82fcde
Packit Service 82fcde
#endif
Packit Service 82fcde
Packit Service 82fcde
#endif	/* netinet/igmp.h */