1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright (c) 1999 by Sun Microsystems, Inc. 24*7c478bd9Sstevel@tonic-gate * All rights reserved. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate /* 28*7c478bd9Sstevel@tonic-gate * Copyright (c) 1996-1999 by the University of Southern California. 29*7c478bd9Sstevel@tonic-gate * All rights reserved. 30*7c478bd9Sstevel@tonic-gate * 31*7c478bd9Sstevel@tonic-gate * Permission to use, copy, modify, and distribute this software and 32*7c478bd9Sstevel@tonic-gate * its documentation in source and binary forms for lawful 33*7c478bd9Sstevel@tonic-gate * purposes and without fee is hereby granted, provided 34*7c478bd9Sstevel@tonic-gate * that the above copyright notice appear in all copies and that both 35*7c478bd9Sstevel@tonic-gate * the copyright notice and this permission notice appear in supporting 36*7c478bd9Sstevel@tonic-gate * documentation, and that any documentation, advertising materials, 37*7c478bd9Sstevel@tonic-gate * and other materials related to such distribution and use acknowledge 38*7c478bd9Sstevel@tonic-gate * that the software was developed by the University of Southern 39*7c478bd9Sstevel@tonic-gate * California and/or Information Sciences Institute. 40*7c478bd9Sstevel@tonic-gate * The name of the University of Southern California may not 41*7c478bd9Sstevel@tonic-gate * be used to endorse or promote products derived from this software 42*7c478bd9Sstevel@tonic-gate * without specific prior written permission. 43*7c478bd9Sstevel@tonic-gate * 44*7c478bd9Sstevel@tonic-gate * THE UNIVERSITY OF SOUTHERN CALIFORNIA DOES NOT MAKE ANY REPRESENTATIONS 45*7c478bd9Sstevel@tonic-gate * ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. THIS SOFTWARE IS 46*7c478bd9Sstevel@tonic-gate * PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, 47*7c478bd9Sstevel@tonic-gate * INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 48*7c478bd9Sstevel@tonic-gate * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND 49*7c478bd9Sstevel@tonic-gate * NON-INFRINGEMENT. 50*7c478bd9Sstevel@tonic-gate * 51*7c478bd9Sstevel@tonic-gate * IN NO EVENT SHALL USC, OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY 52*7c478bd9Sstevel@tonic-gate * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, WHETHER IN CONTRACT, 53*7c478bd9Sstevel@tonic-gate * TORT, OR OTHER FORM OF ACTION, ARISING OUT OF OR IN CONNECTION WITH, 54*7c478bd9Sstevel@tonic-gate * THE USE OR PERFORMANCE OF THIS SOFTWARE. 55*7c478bd9Sstevel@tonic-gate * 56*7c478bd9Sstevel@tonic-gate * Other copyrights might apply to parts of this software and are so 57*7c478bd9Sstevel@tonic-gate * noted when applicable. 58*7c478bd9Sstevel@tonic-gate */ 59*7c478bd9Sstevel@tonic-gate 60*7c478bd9Sstevel@tonic-gate #ifndef _NETINET_PIM_H 61*7c478bd9Sstevel@tonic-gate #define _NETINET_PIM_H 62*7c478bd9Sstevel@tonic-gate 63*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 64*7c478bd9Sstevel@tonic-gate extern "C" { 65*7c478bd9Sstevel@tonic-gate #endif 66*7c478bd9Sstevel@tonic-gate 67*7c478bd9Sstevel@tonic-gate /* 68*7c478bd9Sstevel@tonic-gate * Protocol Independent Multicast (PIM) definitions 69*7c478bd9Sstevel@tonic-gate * 70*7c478bd9Sstevel@tonic-gate * Written by Ahmed Helmy, USC/SGI, July 1996 71*7c478bd9Sstevel@tonic-gate * Modified by George Edmond Eddy (Rusty), ISI, February 1998 72*7c478bd9Sstevel@tonic-gate * Modified by Pavlin Ivanov Radoslavov, USC/ISI, May 1998 73*7c478bd9Sstevel@tonic-gate * 74*7c478bd9Sstevel@tonic-gate * $Id: pim.h,v 1.3 1999/08/31 03:03:08 pavlin Exp $ 75*7c478bd9Sstevel@tonic-gate */ 76*7c478bd9Sstevel@tonic-gate 77*7c478bd9Sstevel@tonic-gate /* 78*7c478bd9Sstevel@tonic-gate * PIM packet format. 79*7c478bd9Sstevel@tonic-gate */ 80*7c478bd9Sstevel@tonic-gate typedef struct pim { 81*7c478bd9Sstevel@tonic-gate #ifdef _BIT_FIELDS_LTOH 82*7c478bd9Sstevel@tonic-gate uint8_t pim_type:4, /* type of PIM message */ 83*7c478bd9Sstevel@tonic-gate pim_vers:4; /* PIM version */ 84*7c478bd9Sstevel@tonic-gate #else 85*7c478bd9Sstevel@tonic-gate uint8_t pim_vers:4, /* PIM version */ 86*7c478bd9Sstevel@tonic-gate pim_type:4; /* type of PIM message */ 87*7c478bd9Sstevel@tonic-gate #endif 88*7c478bd9Sstevel@tonic-gate uint8_t pim_reserved; /* Reserved */ 89*7c478bd9Sstevel@tonic-gate uint16_t pim_cksum; /* IP-style checksum */ 90*7c478bd9Sstevel@tonic-gate } pim_t; 91*7c478bd9Sstevel@tonic-gate 92*7c478bd9Sstevel@tonic-gate #define PIM_VERSION 2 93*7c478bd9Sstevel@tonic-gate #define PIM_MINLEN 8 /* The header min. length is 8 */ 94*7c478bd9Sstevel@tonic-gate 95*7c478bd9Sstevel@tonic-gate /* Register message + inner IPheader */ 96*7c478bd9Sstevel@tonic-gate #define PIM_REG_MINLEN (PIM_MINLEN + IP_SIMPLE_HDR_LENGTH) 97*7c478bd9Sstevel@tonic-gate 98*7c478bd9Sstevel@tonic-gate /* 99*7c478bd9Sstevel@tonic-gate * From the PIM protocol spec (RFC 2362), the following PIM message types 100*7c478bd9Sstevel@tonic-gate * are defined. All of these, except PIM_REGISTER, are currently not defined 101*7c478bd9Sstevel@tonic-gate * in the USC/ISI distributed <netinet/pim.h> include file. So they are listed 102*7c478bd9Sstevel@tonic-gate * here commented out. 103*7c478bd9Sstevel@tonic-gate * 104*7c478bd9Sstevel@tonic-gate * #define PIM_HELLO 0x0 105*7c478bd9Sstevel@tonic-gate * #define PIM_REGISTER 0x1 106*7c478bd9Sstevel@tonic-gate * #define PIM_REGISTER_STOP 0x2 107*7c478bd9Sstevel@tonic-gate * #define PIM_JOIN_PRUNE 0x3 108*7c478bd9Sstevel@tonic-gate * #define PIM_BOOTSTRAP 0x4 109*7c478bd9Sstevel@tonic-gate * #define PIM_ASSERT 0x5 110*7c478bd9Sstevel@tonic-gate * #define PIM_GRAFT 0x6 111*7c478bd9Sstevel@tonic-gate * #define PIM_GRAFT_ACK 0x7 112*7c478bd9Sstevel@tonic-gate * #define PIM_CAND_RP_ADV 0x8 113*7c478bd9Sstevel@tonic-gate * 114*7c478bd9Sstevel@tonic-gate */ 115*7c478bd9Sstevel@tonic-gate #define PIM_REGISTER 0x1 /* PIM Register type is 1 */ 116*7c478bd9Sstevel@tonic-gate 117*7c478bd9Sstevel@tonic-gate /* 118*7c478bd9Sstevel@tonic-gate * First bit in reg_head (right after PIM header) is the Border bit. 119*7c478bd9Sstevel@tonic-gate */ 120*7c478bd9Sstevel@tonic-gate #define PIM_BORDER_REGISTER 0x80000000 121*7c478bd9Sstevel@tonic-gate 122*7c478bd9Sstevel@tonic-gate /* 123*7c478bd9Sstevel@tonic-gate * Second bit in reg_head (right after PIM header) is the Null-Register bit 124*7c478bd9Sstevel@tonic-gate */ 125*7c478bd9Sstevel@tonic-gate #define PIM_NULL_REGISTER 0x40000000 126*7c478bd9Sstevel@tonic-gate 127*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 128*7c478bd9Sstevel@tonic-gate } 129*7c478bd9Sstevel@tonic-gate #endif 130*7c478bd9Sstevel@tonic-gate 131*7c478bd9Sstevel@tonic-gate #endif /* _NETINET_PIM_H */ 132