1255767Sdes/*- 260573Skris * Copyright (C) 1998 WIDE Project. 360573Skris * All rights reserved. 465668Skris * 565668Skris * Redistribution and use in source and binary forms, with or without 665668Skris * modification, are permitted provided that the following conditions 765668Skris * are met: 865668Skris * 1. Redistributions of source code must retain the above copyright 965668Skris * notice, this list of conditions and the following disclaimer. 1065668Skris * 2. Redistributions in binary form must reproduce the above copyright 1165668Skris * notice, this list of conditions and the following disclaimer in the 1265668Skris * documentation and/or other materials provided with the distribution. 1365668Skris * 3. Neither the name of the project nor the names of its contributors 1465668Skris * may be used to endorse or promote products derived from this software 1565668Skris * without specific prior written permission. 1665668Skris * 1765668Skris * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 1865668Skris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1965668Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2065668Skris * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 2165668Skris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2265668Skris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2365668Skris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2460573Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2565668Skris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2660573Skris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27106121Sdes * SUCH DAMAGE. 28162852Sdes * 29162852Sdes * $KAME: pim6.h,v 1.3 2000/03/25 07:23:58 sumikawa Exp $ 30162852Sdes * $FreeBSD: releng/10.3/sys/netinet6/pim6.h 174510 2007-12-10 16:03:40Z obrien $ 31162852Sdes */ 32255767Sdes/* 33162852Sdes * Protocol Independent Multicast (PIM) definitions 3460573Skris * 3576259Sgreen * Written by Ahmed Helmy, SGI, July 1996 3660573Skris * 37197679Sdes * MULTICAST 38197679Sdes */ 39197679Sdes 40197679Sdes/* 41197679Sdes * PIM packet header 42197679Sdes */ 4360573Skris#define PIM_VERSION 2 44126274Sdesstruct pim { 4560573Skris#if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN) 4660573Skris u_char pim_type:4, /* the PIM message type, currently they are: 4760573Skris * Hello, Register, Register-Stop, Join/Prune, 4860573Skris * Bootstrap, Assert, Graft (PIM-DM only), 4960573Skris * Graft-Ack (PIM-DM only), C-RP-Adv 50197679Sdes */ 51197679Sdes pim_ver:4; /* PIM version number; 2 for PIMv2 */ 52197679Sdes#else 53197679Sdes u_char pim_ver:4, /* PIM version */ 54197679Sdes pim_type:4; /* PIM type */ 5560573Skris#endif 5676259Sgreen u_char pim_rsv; /* Reserved */ 5760573Skris u_short pim_cksum; /* IP style check sum */ 5860573Skris}; 5960573Skris 6060573Skris#define PIM_MINLEN 8 /* The header min. length is 8 */ 6160573Skris#define PIM6_REG_MINLEN (PIM_MINLEN+40) /* Register message + inner IP6 header */ 6260573Skris 6360573Skris/* 6460573Skris * Message types 6560573Skris */ 6660573Skris#define PIM_REGISTER 1 /* PIM Register type is 1 */ 6760573Skris 6892555Sdes/* second bit in reg_head is the null bit */ 6960573Skris#define PIM_NULL_REGISTER 0x40000000 7060573Skris