]> git.saurik.com Git - apple/network_cmds.git/blame_incremental - rbootd.tproj/rmp.h
network_cmds-85.tar.gz
[apple/network_cmds.git] / rbootd.tproj / rmp.h
... / ...
CommitLineData
1/*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
12 * this file.
13 *
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
20 * under the License."
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24/*
25 * Copyright (c) 1988, 1992 The University of Utah and the Center
26 * for Software Science (CSS).
27 * Copyright (c) 1992, 1993
28 * The Regents of the University of California. All rights reserved.
29 *
30 * This code is derived from software contributed to Berkeley by
31 * the Center for Software Science of the University of Utah Computer
32 * Science Department. CSS requests users of this software to return
33 * to css-dist@cs.utah.edu any improvements that they make and grant
34 * CSS redistribution rights.
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
38 * are met:
39 * 1. Redistributions of source code must retain the above copyright
40 * notice, this list of conditions and the following disclaimer.
41 * 2. Redistributions in binary form must reproduce the above copyright
42 * notice, this list of conditions and the following disclaimer in the
43 * documentation and/or other materials provided with the distribution.
44 * 3. All advertising materials mentioning features or use of this software
45 * must display the following acknowledgement:
46 * This product includes software developed by the University of
47 * California, Berkeley and its contributors.
48 * 4. Neither the name of the University nor the names of its contributors
49 * may be used to endorse or promote products derived from this software
50 * without specific prior written permission.
51 *
52 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
53 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
54 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
55 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
56 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
57 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
58 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
60 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
61 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 * SUCH DAMAGE.
63 *
64 * @(#)rmp.h 8.1 (Berkeley) 6/4/93
65 *
66 * Utah $Hdr: rmp.h 3.1 92/07/06$
67 * Author: Jeff Forys, University of Utah CSS
68 */
69
70/*
71 * Define MIN/MAX sizes of RMP (ethernet) packet.
72 * For ease of computation, the 4 octet CRC field is not included.
73 *
74 * MCLBYTES is for bpfwrite(); it is adamant about using a cluster.
75 */
76
77#define RMP_MAX_PACKET MIN(1514,MCLBYTES)
78#define RMP_MIN_PACKET 60
79
80/*
81 * Define RMP/Ethernet Multicast address (9:0:9:0:0:4) and its length.
82 */
83#define RMP_ADDR { 0x9, 0x0, 0x9, 0x0, 0x0, 0x4 }
84#define RMP_ADDRLEN 6
85
86/*
87 * Define IEEE802.2 (Logical Link Control) information.
88 */
89#define IEEE_DSAP_HP 0xF8 /* Destination Service Access Point */
90#define IEEE_SSAP_HP 0xF8 /* Source Service Access Point */
91#define IEEE_CNTL_HP 0x0300 /* Type 1 / I format control information */
92
93#define HPEXT_DXSAP 0x608 /* HP Destination Service Access Point */
94#define HPEXT_SXSAP 0x609 /* HP Source Service Access Point */
95
96/*
97 * 802.3-style "Ethernet" header.
98 */
99
100struct hp_hdr {
101 u_char daddr[RMP_ADDRLEN];
102 u_char saddr[RMP_ADDRLEN];
103 u_short len;
104};
105
106/*
107 * HP uses 802.2 LLC with their own local extensions. This struct makes
108 * sence out of this data (encapsulated in the above 802.3 packet).
109 */
110
111struct hp_llc {
112 u_char dsap; /* 802.2 DSAP */
113 u_char ssap; /* 802.2 SSAP */
114 u_short cntrl; /* 802.2 control field */
115 u_short filler; /* HP filler (must be zero) */
116 u_short dxsap; /* HP extended DSAP */
117 u_short sxsap; /* HP extended SSAP */
118};