mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-10 12:05:19 +02:00
add ifdefs to proto/ethernet.h so that it does't conflict with linux includes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@506 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
1b89da71e0
commit
e52a9b9eed
@ -26,37 +26,51 @@
|
|||||||
/*
|
/*
|
||||||
* The number of bytes in an ethernet (MAC) address.
|
* The number of bytes in an ethernet (MAC) address.
|
||||||
*/
|
*/
|
||||||
|
#ifndef ETHER_ADDR_LEN
|
||||||
#define ETHER_ADDR_LEN 6
|
#define ETHER_ADDR_LEN 6
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The number of bytes in the type field.
|
* The number of bytes in the type field.
|
||||||
*/
|
*/
|
||||||
|
#ifndef ETHER_TYPE_LEN
|
||||||
#define ETHER_TYPE_LEN 2
|
#define ETHER_TYPE_LEN 2
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The number of bytes in the trailing CRC field.
|
* The number of bytes in the trailing CRC field.
|
||||||
*/
|
*/
|
||||||
|
#ifndef ETHER_CRC_LEN
|
||||||
#define ETHER_CRC_LEN 4
|
#define ETHER_CRC_LEN 4
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The length of the combined header.
|
* The length of the combined header.
|
||||||
*/
|
*/
|
||||||
|
#ifndef ETHER_HDR_LEN
|
||||||
#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN)
|
#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The minimum packet length.
|
* The minimum packet length.
|
||||||
*/
|
*/
|
||||||
|
#ifndef ETHER_MIN_LEN
|
||||||
#define ETHER_MIN_LEN 64
|
#define ETHER_MIN_LEN 64
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The minimum packet user data length.
|
* The minimum packet user data length.
|
||||||
*/
|
*/
|
||||||
|
#ifndef ETHER_MIN_DATA
|
||||||
#define ETHER_MIN_DATA 46
|
#define ETHER_MIN_DATA 46
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The maximum packet length.
|
* The maximum packet length.
|
||||||
*/
|
*/
|
||||||
|
#ifndef ETHER_MAX_LEN
|
||||||
#define ETHER_MAX_LEN 1518
|
#define ETHER_MAX_LEN 1518
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The maximum packet user data length.
|
* The maximum packet user data length.
|
||||||
@ -107,7 +121,7 @@ struct vlan_tags {
|
|||||||
#define ETHER_IS_VALID_LEN(foo) \
|
#define ETHER_IS_VALID_LEN(foo) \
|
||||||
((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
|
((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
|
||||||
|
|
||||||
|
#ifndef __NET_ETHERNET_H
|
||||||
#ifndef __INCif_etherh /* Quick and ugly hack for VxWorks */
|
#ifndef __INCif_etherh /* Quick and ugly hack for VxWorks */
|
||||||
/*
|
/*
|
||||||
* Structure of a 10Mb/s Ethernet header.
|
* Structure of a 10Mb/s Ethernet header.
|
||||||
@ -125,6 +139,7 @@ struct ether_addr {
|
|||||||
uint8 octet[ETHER_ADDR_LEN];
|
uint8 octet[ETHER_ADDR_LEN];
|
||||||
} PACKED ;
|
} PACKED ;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Takes a pointer, returns true if a 48-bit multicast address
|
* Takes a pointer, returns true if a 48-bit multicast address
|
||||||
|
Loading…
Reference in New Issue
Block a user