gno/include/net/etherdefs.h

64 lines
1.7 KiB
C
Raw Normal View History

1997-02-28 04:42:19 +00:00
/*
* Mach Operating System
* Copyright (c) 1987 Carnegie-Mellon University
* All rights reserved. The CMU software License Agreement specifies
* the terms and conditions for use and redistribution.
*/
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of California at Berkeley. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*
* HISTORY
* 09-Apr-90 Bradley Taylor (btaylor) at NeXT, Inc.
* Created. Originally part of <netinet/if_ether.h>.
*/
#ifndef _ETHERDEFS_
#define _ETHERDEFS_
/*
* Ethernet address - 6 octets
*/
struct ether_addr {
u_char ether_addr_octet[6];
};
/*
* Structure of a 10Mb/s Ethernet header.
*/
struct ether_header {
u_char ether_dhost[6];
u_char ether_shost[6];
u_short ether_type;
};
#define IFTYPE_ETHERNET "10MB Ethernet"
#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
#define ETHERTYPE_IP 0x0800 /* IP protocol */
#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */
#define ETHERTYPE_REVARP 0x8035 /* Reverse ARP (SUN_RPC) */
/*
* The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
* (type-ETHERTYPE_TRAIL)*512 bytes of data followed
* by an ETHER type (as given above) and then the (variable-length) header.
*/
#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */
#define ETHERTYPE_NTRAILER 16
#define ETHERHDRSIZE 14
#define ETHERMTU 1500
#define ETHERMIN (60-ETHERHDRSIZE)
#endif /* _ETHERDEFS_ */