]> git.saurik.com Git - apple/xnu.git/blob - bsd/net/etherdefs.h
cd56710f99dbab34477f98149b3c875f8249182f
[apple/xnu.git] / bsd / net / etherdefs.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 * Mach Operating System
24 * Copyright (c) 1987 Carnegie-Mellon University
25 * All rights reserved. The CMU software License Agreement specifies
26 * the terms and conditions for use and redistribution.
27 */
28
29 /*
30 * Copyright (c) 1982, 1986 Regents of the University of California.
31 * All rights reserved.
32 *
33 * Redistribution and use in source and binary forms are permitted
34 * provided that this notice is preserved and that due credit is given
35 * to the University of California at Berkeley. The name of the University
36 * may not be used to endorse or promote products derived from this
37 * software without specific prior written permission. This software
38 * is provided ``as is'' without express or implied warranty.
39 *
40 * HISTORY
41 * 11-Jul-93 Mac Gillon (mgillon) at NeXT
42 * Integrated MULTICAST support
43 *
44 * 09-Apr-90 Bradley Taylor (btaylor) at NeXT, Inc.
45 * Created. Originally part of <netinet/if_ether.h>.
46 */
47 #ifndef _ETHERDEFS_
48 #define _ETHERDEFS_
49
50 #include <netinet/if_ether.h>
51 /*
52 * Ethernet address - 6 octets
53 */
54 #define NUM_EN_ADDR_BYTES 6
55
56
57 typedef struct ether_addr enet_addr_t;
58
59 typedef struct ether_header ether_header_t;
60
61 #define IFTYPE_ETHERNET "10MB Ethernet"
62
63 #define ETHERHDRSIZE 14
64 #define ETHERMAXPACKET (ETHERHDRSIZE + ETHERMTU)
65 #define ETHERMINPACKET 64
66 #define ETHERCRC 4
67
68 /*
69 * Byte and bit in an enet_addr_t defining individual/group destination.
70 */
71 #define EA_GROUP_BYTE 0
72 #define EA_GROUP_BIT 0x01
73
74
75 #endif /* _ETHERDEFS_ */