1*9b6bd2d9Srmind /* $NetBSD: rmp.h,v 1.6 2011/02/08 20:20:28 rmind Exp $ */ 2326b2259Sagc 3326b2259Sagc /* 4*9b6bd2d9Srmind * Copyright (c) 1988, 1992 The University of Utah and the Center 5*9b6bd2d9Srmind * for Software Science (CSS). 6326b2259Sagc * Copyright (c) 1992, 1993 7326b2259Sagc * The Regents of the University of California. All rights reserved. 8326b2259Sagc * 9326b2259Sagc * This code is derived from software contributed to Berkeley by 10326b2259Sagc * the Center for Software Science of the University of Utah Computer 11326b2259Sagc * Science Department. CSS requests users of this software to return 12326b2259Sagc * to css-dist@cs.utah.edu any improvements that they make and grant 13326b2259Sagc * CSS redistribution rights. 14326b2259Sagc * 15326b2259Sagc * Redistribution and use in source and binary forms, with or without 16326b2259Sagc * modification, are permitted provided that the following conditions 17326b2259Sagc * are met: 18326b2259Sagc * 1. Redistributions of source code must retain the above copyright 19326b2259Sagc * notice, this list of conditions and the following disclaimer. 20326b2259Sagc * 2. Redistributions in binary form must reproduce the above copyright 21326b2259Sagc * notice, this list of conditions and the following disclaimer in the 22326b2259Sagc * documentation and/or other materials provided with the distribution. 23326b2259Sagc * 3. Neither the name of the University nor the names of its contributors 24326b2259Sagc * may be used to endorse or promote products derived from this software 25326b2259Sagc * without specific prior written permission. 26326b2259Sagc * 27326b2259Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 28326b2259Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 29326b2259Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30326b2259Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 31326b2259Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 32326b2259Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 33326b2259Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34326b2259Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35326b2259Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36326b2259Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37326b2259Sagc * SUCH DAMAGE. 38326b2259Sagc * 39326b2259Sagc * from: @(#)rmp.h 8.1 (Berkeley) 6/4/93 40326b2259Sagc * 41326b2259Sagc * From: Utah Hdr: rmp.h 3.1 92/07/06 42326b2259Sagc * Author: Jeff Forys, University of Utah CSS 43326b2259Sagc */ 446799ca39Sthorpej 45e05cab76Sbrezak /* 46e05cab76Sbrezak * Define MIN/MAX sizes of RMP (ethernet) packet. 47e05cab76Sbrezak * For ease of computation, the 4 octet CRC field is not included. 48e05cab76Sbrezak * 49e05cab76Sbrezak * MCLBYTES is for bpfwrite(); it is adamant about using a cluster. 50e05cab76Sbrezak */ 51e05cab76Sbrezak 52e05cab76Sbrezak #define RMP_MAX_PACKET MIN(1514,MCLBYTES) 53e05cab76Sbrezak #define RMP_MIN_PACKET 60 54e05cab76Sbrezak 55e05cab76Sbrezak /* 56e05cab76Sbrezak * Define RMP/Ethernet Multicast address (9:0:9:0:0:4) and its length. 57e05cab76Sbrezak */ 58e05cab76Sbrezak #define RMP_ADDR { 0x9, 0x0, 0x9, 0x0, 0x0, 0x4 } 59e05cab76Sbrezak #define RMP_ADDRLEN 6 60e05cab76Sbrezak 61e05cab76Sbrezak /* 62e05cab76Sbrezak * Define IEEE802.2 (Logical Link Control) information. 63e05cab76Sbrezak */ 64e05cab76Sbrezak #define IEEE_DSAP_HP 0xF8 /* Destination Service Access Point */ 65e05cab76Sbrezak #define IEEE_SSAP_HP 0xF8 /* Source Service Access Point */ 66e05cab76Sbrezak #define IEEE_CNTL_HP 0x0300 /* Type 1 / I format control information */ 67e05cab76Sbrezak 68e05cab76Sbrezak #define HPEXT_DXSAP 0x608 /* HP Destination Service Access Point */ 69e05cab76Sbrezak #define HPEXT_SXSAP 0x609 /* HP Source Service Access Point */ 70e05cab76Sbrezak 71e05cab76Sbrezak /* 72e05cab76Sbrezak * 802.3-style "Ethernet" header. 73e05cab76Sbrezak */ 74e05cab76Sbrezak 75e05cab76Sbrezak struct hp_hdr { 7631903d0eSthorpej u_int8_t daddr[RMP_ADDRLEN]; 7731903d0eSthorpej u_int8_t saddr[RMP_ADDRLEN]; 7831903d0eSthorpej u_int16_t len; 79e05cab76Sbrezak }; 80e05cab76Sbrezak 81e05cab76Sbrezak /* 82e05cab76Sbrezak * HP uses 802.2 LLC with their own local extensions. This struct makes 8331903d0eSthorpej * sense out of this data (encapsulated in the above 802.3 packet). 84e05cab76Sbrezak */ 85e05cab76Sbrezak 86e05cab76Sbrezak struct hp_llc { 8731903d0eSthorpej u_int8_t dsap; /* 802.2 DSAP */ 8831903d0eSthorpej u_int8_t ssap; /* 802.2 SSAP */ 8931903d0eSthorpej u_int16_t cntrl; /* 802.2 control field */ 9031903d0eSthorpej u_int16_t filler; /* HP filler (must be zero) */ 9131903d0eSthorpej u_int16_t dxsap; /* HP extended DSAP */ 9231903d0eSthorpej u_int16_t sxsap; /* HP extended SSAP */ 93e05cab76Sbrezak }; 94