Benoît Locher / mbedNet
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Ethernet.h Source File

Ethernet.h

00001 /*
00002  * $Id: Ethernet.h 23 2011-06-06 06:03:23Z benoit $
00003  * $Author: benoit $
00004  * $Date: 2011-06-06 08:03:23 +0200 (lun., 06 juin 2011) $
00005  * $Rev: 23 $
00006  * 
00007  * 
00008  * 
00009  * 
00010  * 
00011  */
00012  
00013 #ifndef __ETHERNET_H__
00014 #define    __ETHERNET_H__
00015 
00016 #include <stdint.h>
00017 #include "mbedNet.h"
00018 #include "NetIF.h"
00019 
00020 
00021 typedef uint16_t                Ethernet_Proto_t;
00022 
00023 
00024 #define    ETHERNET_PROTO_IPV4        0x800
00025 #define    ETHERNET_PROTO_ARP        0x806
00026 
00027 
00028 #pragma push
00029 #pragma pack(1)
00030 struct Ethernet_Header
00031 {
00032     Ethernet_Addr_t        destination,
00033                         source;
00034     Ethernet_Proto_t    protocol;
00035 };
00036 #pragma pop
00037 
00038 
00039 typedef struct Ethernet_Header Ethernet_Header_t;
00040 
00041 
00042 extern Protocol_Handler_t ethernet;
00043 
00044 
00045 #endif /*  __ETHERNET_H__ */
00046 
00047 
00048