1139826Simp/*- 253541Sshin * Copyright (C) 1998 WIDE Project. 353541Sshin * All rights reserved. 453541Sshin * 553541Sshin * Redistribution and use in source and binary forms, with or without 653541Sshin * modification, are permitted provided that the following conditions 753541Sshin * are met: 853541Sshin * 1. Redistributions of source code must retain the above copyright 953541Sshin * notice, this list of conditions and the following disclaimer. 1053541Sshin * 2. Redistributions in binary form must reproduce the above copyright 1153541Sshin * notice, this list of conditions and the following disclaimer in the 1253541Sshin * documentation and/or other materials provided with the distribution. 1353541Sshin * 3. Neither the name of the project nor the names of its contributors 1453541Sshin * may be used to endorse or promote products derived from this software 1553541Sshin * without specific prior written permission. 1653541Sshin * 1753541Sshin * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 1853541Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1953541Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2053541Sshin * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 2153541Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2253541Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2353541Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2453541Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2553541Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2653541Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2753541Sshin * SUCH DAMAGE. 28174510Sobrien * 29174510Sobrien * $KAME: pim6.h,v 1.3 2000/03/25 07:23:58 sumikawa Exp $ 30174510Sobrien * $FreeBSD$ 3153541Sshin */ 3253541Sshin/* 3353541Sshin * Protocol Independent Multicast (PIM) definitions 3453541Sshin * 3553541Sshin * Written by Ahmed Helmy, SGI, July 1996 3653541Sshin * 3753541Sshin * MULTICAST 3853541Sshin */ 3953541Sshin 4053541Sshin/* 4153541Sshin * PIM packet header 4253541Sshin */ 4362587Sitojun#define PIM_VERSION 2 4453541Sshinstruct pim { 4553541Sshin#if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN) 4653541Sshin u_char pim_type:4, /* the PIM message type, currently they are: 4753541Sshin * Hello, Register, Register-Stop, Join/Prune, 4853541Sshin * Bootstrap, Assert, Graft (PIM-DM only), 4953541Sshin * Graft-Ack (PIM-DM only), C-RP-Adv 5053541Sshin */ 5153541Sshin pim_ver:4; /* PIM version number; 2 for PIMv2 */ 5253541Sshin#else 5353541Sshin u_char pim_ver:4, /* PIM version */ 5453541Sshin pim_type:4; /* PIM type */ 5553541Sshin#endif 5662587Sitojun u_char pim_rsv; /* Reserved */ 5753541Sshin u_short pim_cksum; /* IP style check sum */ 5853541Sshin}; 5953541Sshin 6062587Sitojun#define PIM_MINLEN 8 /* The header min. length is 8 */ 6162587Sitojun#define PIM6_REG_MINLEN (PIM_MINLEN+40) /* Register message + inner IP6 header */ 6253541Sshin 6353541Sshin/* 6453541Sshin * Message types 6553541Sshin */ 6662587Sitojun#define PIM_REGISTER 1 /* PIM Register type is 1 */ 6753541Sshin 6853541Sshin/* second bit in reg_head is the null bit */ 6962587Sitojun#define PIM_NULL_REGISTER 0x40000000 70