]> git.saurik.com Git - apple/xnu.git/blame - bsd/net/etherdefs.h
xnu-792.tar.gz
[apple/xnu.git] / bsd / net / etherdefs.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
e5568f75
A
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.
1c79356b 11 *
e5568f75
A
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
1c79356b
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
e5568f75
A
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.
1c79356b
A
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_
9bccf70c
A
49#include <sys/appleapiopts.h>
50#if !defined(KERNEL) || defined(__APPLE_API_OBSOLETE)
51
52#include <net/ethernet.h>
53#warning net/etherdefs.h is obsolete! Use net/ethernet.h
1c79356b
A
54
55#include <netinet/if_ether.h>
9bccf70c 56
1c79356b
A
57/*
58 * Ethernet address - 6 octets
59 */
9bccf70c 60#define NUM_EN_ADDR_BYTES ETHER_ADDR_LEN
1c79356b
A
61
62
63typedef struct ether_addr enet_addr_t;
64
65typedef struct ether_header ether_header_t;
66
67#define IFTYPE_ETHERNET "10MB Ethernet"
68
9bccf70c
A
69#define ETHERHDRSIZE ETHER_HDR_LEN
70#define ETHERMAXPACKET ETHER_MAX_LEN
71#define ETHERMINPACKET ETHER_MIN_LEN
72#define ETHERCRC ETHER_CRC_LEN
1c79356b
A
73
74/*
75 * Byte and bit in an enet_addr_t defining individual/group destination.
76 */
77#define EA_GROUP_BYTE 0
78#define EA_GROUP_BIT 0x01
79
80
9bccf70c 81#endif /* KERNEL && !__APPLE_API_OBSOLETE */
1c79356b 82#endif /* _ETHERDEFS_ */