1299425Smm/*	$NetBSD: rmp.h,v 1.5 2003/08/07 11:25:41 agc Exp $	*/
2299425Smm
3299425Smm/*
4299425Smm * Copyright (c) 1988, 1992 The University of Utah and the Center
5299425Smm *	for Software Science (CSS).
6299425Smm * Copyright (c) 1992, 1993
7299425Smm *	The Regents of the University of California.  All rights reserved.
8299425Smm *
9299425Smm * This code is derived from software contributed to Berkeley by
10299425Smm * the Center for Software Science of the University of Utah Computer
11299425Smm * Science Department.  CSS requests users of this software to return
12299425Smm * to css-dist@cs.utah.edu any improvements that they make and grant
13299425Smm * CSS redistribution rights.
14299425Smm *
15299425Smm * Redistribution and use in source and binary forms, with or without
16299425Smm * modification, are permitted provided that the following conditions
17299425Smm * are met:
18299425Smm * 1. Redistributions of source code must retain the above copyright
19299425Smm *    notice, this list of conditions and the following disclaimer.
20299425Smm * 2. Redistributions in binary form must reproduce the above copyright
21299425Smm *    notice, this list of conditions and the following disclaimer in the
22299425Smm *    documentation and/or other materials provided with the distribution.
23299425Smm * 3. Neither the name of the University nor the names of its contributors
24299425Smm *    may be used to endorse or promote products derived from this software
25299425Smm *    without specific prior written permission.
26299425Smm *
27299425Smm * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28299425Smm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29299425Smm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30299425Smm * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31299425Smm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32370535Sgit2svn * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33299425Smm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34299425Smm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35299425Smm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36299425Smm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37299425Smm * SUCH DAMAGE.
38299425Smm *
39299425Smm *	from: @(#)rmp.h	8.1 (Berkeley) 6/4/93
40299425Smm *
41299425Smm * From: Utah Hdr: rmp.h 3.1 92/07/06
42299425Smm * Author: Jeff Forys, University of Utah CSS
43299425Smm */
44299425Smm
45299425Smm/*
46299425Smm *  Define MIN/MAX sizes of RMP (ethernet) packet.
47299425Smm *  For ease of computation, the 4 octet CRC field is not included.
48299425Smm *
49299425Smm *  MCLBYTES is for bpfwrite(); it is adamant about using a cluster.
50299425Smm */
51299425Smm
52299425Smm#define	RMP_MAX_PACKET	MIN(1514,MCLBYTES)
53299425Smm#define	RMP_MIN_PACKET	60
54299425Smm
55299425Smm/*
56299425Smm *  Define RMP/Ethernet Multicast address (9:0:9:0:0:4) and its length.
57299425Smm */
58299425Smm#define	RMP_ADDR	{ 0x9, 0x0, 0x9, 0x0, 0x0, 0x4 }
59299425Smm#define	RMP_ADDRLEN	6
60299425Smm
61299425Smm/*
62299425Smm *  Define IEEE802.2 (Logical Link Control) information.
63299425Smm */
64299425Smm#define	IEEE_DSAP_HP	0xF8	/* Destination Service Access Point */
65299425Smm#define	IEEE_SSAP_HP	0xF8	/* Source Service Access Point */
66299425Smm#define	IEEE_CNTL_HP	0x0300	/* Type 1 / I format control information */
67299425Smm
68299425Smm#define	HPEXT_DXSAP	0x608	/* HP Destination Service Access Point */
69299425Smm#define	HPEXT_SXSAP	0x609	/* HP Source Service Access Point */
70299425Smm
71299425Smm/*
72299425Smm *  802.3-style "Ethernet" header.
73299425Smm */
74299425Smm
75299425Smmstruct hp_hdr {
76299425Smm	u_int8_t	daddr[RMP_ADDRLEN];
77299425Smm	u_int8_t	saddr[RMP_ADDRLEN];
78299425Smm	u_int16_t	len;
79299425Smm};
80299425Smm
81299425Smm/*
82299425Smm * HP uses 802.2 LLC with their own local extensions.  This struct makes
83299425Smm * sense out of this data (encapsulated in the above 802.3 packet).
84299425Smm */
85299425Smm
86299425Smmstruct hp_llc {
87299425Smm	u_int8_t	dsap;		/* 802.2 DSAP */
88299425Smm	u_int8_t	ssap;		/* 802.2 SSAP */
89358088Smm	u_int16_t	cntrl;		/* 802.2 control field */
90299425Smm	u_int16_t	filler;		/* HP filler (must be zero) */
91299425Smm	u_int16_t	dxsap;		/* HP extended DSAP */
92299425Smm	u_int16_t	sxsap;		/* HP extended SSAP */
93299425Smm};
94299425Smm