diff options
author | wollman <wollman@FreeBSD.org> | 1997-01-03 19:51:54 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1997-01-03 19:51:54 +0000 |
commit | 3a328fce052fe72103f9f172a07edcb29a9598c2 (patch) | |
tree | 9a91ea5cdd6ccaf292075c11d9972174617f68b8 /sys | |
parent | 4d20b5bdb1ab98e8e30b49f4823ca47016929850 (diff) | |
download | FreeBSD-src-3a328fce052fe72103f9f172a07edcb29a9598c2.zip FreeBSD-src-3a328fce052fe72103f9f172a07edcb29a9598c2.tar.gz |
Move the ethertypes from <netinet/if_ether.h> to <net/ethernet.h>.
Many programs need the numbers but don't need the internals of ARP.
More commits to follow...
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/ethernet.h | 20 | ||||
-rw-r--r-- | sys/netinet/if_ether.h | 18 |
2 files changed, 20 insertions, 18 deletions
diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h index 78e23aa..42401cc 100644 --- a/sys/net/ethernet.h +++ b/sys/net/ethernet.h @@ -1,7 +1,7 @@ /* * Fundamental constants relating to ethernet. * - * $Id: ethernet.h,v 1.4 1996/12/19 15:42:52 wollman Exp $ + * $Id: ethernet.h,v 1.5 1996/12/19 18:12:06 bde Exp $ * */ @@ -60,6 +60,24 @@ struct ether_addr { u_char octet[ETHER_ADDR_LEN]; }; +#define ETHERTYPE_PUP 0x0200 /* PUP protocol */ +#define ETHERTYPE_IP 0x0800 /* IP protocol */ +#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */ +#define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */ +#define ETHERTYPE_LOOPBACK 0x9000 /* used to test interfaces */ +/* XXX - add more useful types here */ + +/* + * 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 ETHERMTU (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN) +#define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN) + #ifndef KERNEL #include <sys/cdefs.h> diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index 64800bd..c4f56c8 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 - * $Id: if_ether.h,v 1.15 1996/08/06 21:14:28 phk Exp $ + * $Id: if_ether.h,v 1.16 1996/12/11 17:46:33 wollman Exp $ */ #ifndef _NETINET_IF_ETHER_H_ @@ -40,22 +40,6 @@ #include <net/ethernet.h> #include <net/if_arp.h> -#define ETHERTYPE_PUP 0x0200 /* PUP protocol */ -#define ETHERTYPE_IP 0x0800 /* IP protocol */ -#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */ -#define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */ - -/* - * 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 ETHERMTU (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN) -#define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN) - #ifdef KERNEL /* * Macro to map an IP multicast address to an Ethernet multicast address. |