1239281Sgonzo/*
2239281Sgonzo * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3239281Sgonzo *
4239281Sgonzo * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5239281Sgonzo *
6239281Sgonzo * This file contains Original Code and/or Modifications of Original Code
7239281Sgonzo * as defined in and that are subject to the Apple Public Source License
8239281Sgonzo * Version 2.0 (the 'License'). You may not use this file except in
9239281Sgonzo * compliance with the License. The rights granted to you under the License
10239281Sgonzo * may not be used to create, or enable the creation or redistribution of,
11239281Sgonzo * unlawful or unlicensed copies of an Apple operating system, or to
12239281Sgonzo * circumvent, violate, or enable the circumvention or violation of, any
13239281Sgonzo * terms of an Apple operating system software license agreement.
14239281Sgonzo *
15239281Sgonzo * Please obtain a copy of the License at
16239281Sgonzo * http://www.opensource.apple.com/apsl/ and read it before using this file.
17239281Sgonzo *
18239281Sgonzo * The Original Code and all software distributed under the License are
19239281Sgonzo * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20239281Sgonzo * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21239281Sgonzo * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22239281Sgonzo * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23239281Sgonzo * Please see the License for the specific language governing rights and
24239281Sgonzo * limitations under the License.
25239281Sgonzo *
26239281Sgonzo * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27239281Sgonzo */
28239281Sgonzo/*
29239281Sgonzo * Mach Operating System
30239281Sgonzo * Copyright (c) 1987 Carnegie-Mellon University
31239281Sgonzo * All rights reserved.  The CMU software License Agreement specifies
32239281Sgonzo * the terms and conditions for use and redistribution.
33239281Sgonzo */
34239281Sgonzo
35239281Sgonzo/*
36239281Sgonzo * Copyright (c) 1982, 1986 Regents of the University of California.
37239281Sgonzo * All rights reserved.
38239281Sgonzo *
39239281Sgonzo * Redistribution and use in source and binary forms are permitted
40239281Sgonzo * provided that this notice is preserved and that due credit is given
41239281Sgonzo * to the University of California at Berkeley. The name of the University
42239281Sgonzo * may not be used to endorse or promote products derived from this
43239281Sgonzo * software without specific prior written permission. This software
44239281Sgonzo * is provided ``as is'' without express or implied warranty.
45239281Sgonzo *
46239281Sgonzo * HISTORY
47239281Sgonzo * 11-Jul-93  Mac Gillon (mgillon) at NeXT
48239281Sgonzo *	Integrated MULTICAST support
49239281Sgonzo *
50239281Sgonzo * 09-Apr-90  Bradley Taylor (btaylor) at NeXT, Inc.
51239281Sgonzo *	Created. Originally part of <netinet/if_ether.h>.
52239281Sgonzo */
53239281Sgonzo#ifndef _ETHERDEFS_
54239281Sgonzo#define _ETHERDEFS_
55239281Sgonzo#include <sys/appleapiopts.h>
56239281Sgonzo#if !defined(KERNEL) || defined(__APPLE_API_OBSOLETE)
57239281Sgonzo
58239281Sgonzo#include <net/ethernet.h>
59239281Sgonzo#warning net/etherdefs.h is obsolete! Use net/ethernet.h
60239281Sgonzo
61239281Sgonzo#include	<netinet/if_ether.h>
62239281Sgonzo
63239281Sgonzo/*
64239281Sgonzo * Ethernet address - 6 octets
65239281Sgonzo */
66239281Sgonzo#define NUM_EN_ADDR_BYTES	ETHER_ADDR_LEN
67239281Sgonzo
68239281Sgonzo
69239281Sgonzotypedef struct ether_addr enet_addr_t;
70239281Sgonzo
71239281Sgonzotypedef struct ether_header ether_header_t;
72239281Sgonzo
73239281Sgonzo#define IFTYPE_ETHERNET "10MB Ethernet"
74239281Sgonzo
75239281Sgonzo#define ETHERHDRSIZE	ETHER_HDR_LEN
76239281Sgonzo#define ETHERMAXPACKET	ETHER_MAX_LEN
77239281Sgonzo#define ETHERMINPACKET	ETHER_MIN_LEN
78239281Sgonzo#define ETHERCRC	ETHER_CRC_LEN
79239281Sgonzo
80239281Sgonzo/*
81239281Sgonzo * Byte and bit in an enet_addr_t defining individual/group destination.
82239281Sgonzo */
83239281Sgonzo#define EA_GROUP_BYTE	0
84239281Sgonzo#define EA_GROUP_BIT	0x01
85239281Sgonzo
86239281Sgonzo
87239281Sgonzo#endif /* KERNEL && !__APPLE_API_OBSOLETE */
88239281Sgonzo#endif /* _ETHERDEFS_ */
89239281Sgonzo