My Kernel v0.1.0
ethernet.h File Reference
#include <kernel/error.h>
#include <kernel/types.h>
#include <utils/compiler.h>
Include dependency graph for ethernet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ethernet_header
 An ethernet frame. More...
 

Macros

#define ETHERNET_ADDR_SIZE   6
 Size of an ethernet MAC address.
 
#define ETHERNET_HEADER_SIZE   14
 Size of an ethernet header.
 

Typedefs

typedef uint8_t mac_address_t[ETHERNET_ADDR_SIZE]
 Represents an ethernet MAC address. More...
 

Enumerations

enum  ethernet_type { ETH_PROTO_IP = 0x0800 , ETH_PROTO_ARP = 0x0806 }
 Supported ethernet protocols, as defined by IANA. More...
 

Functions

void ethernet_fill_packet (struct packet *, enum ethernet_type, const mac_address_t dst)
 Insert headers for layer 2 inside a packet over ethernet.
 
error_t ethernet_receive_packet (struct packet *)
 Process a packet received by an ethernet network device.