#include <kernel/semaphore.h>
Go to the source code of this file.
Data Structures | |||||||||
struct | eth_buf | ||||||||
An ethernet buffer structure. More... | |||||||||
struct | ethernet | ||||||||
An ethernet packet structure. More... | |||||||||
struct | phys_packet | ||||||||
Physical packet structure. More... | |||||||||
Defines | |||||||||
#define | ETH_FRAME_IP 0x0800 | ||||||||
IP packet type. | |||||||||
#define | ETH_FRAME_ARP 0x0806 | ||||||||
ARP packet type. | |||||||||
#define | ETH_ADDR_LEN 6 | ||||||||
Size of an ethernet address (a.k.a. MAC). | |||||||||
#define | ETH_HEAD_LEN 14 | ||||||||
Size of the ethernet header. | |||||||||
#define | ETH_MIN_LEN 60 | ||||||||
Minimum ethernet packet size. | |||||||||
#define | ETH_FRAME_LEN 1514 | ||||||||
Maximum ethernet packet size. | |||||||||
#define | ETH_MTU (ETH_FRAME_LEN - ETH_HEAD_LEN) | ||||||||
Ethernet MTU (Maximum transfer unit). | |||||||||
#define | ETH_RECV_BUF_DIM 10 | ||||||||
Send and receive buffers size. | |||||||||
Typedefs | |||||||||
typedef phys_packet | phys_packet_t | ||||||||
Physical packet structure. | |||||||||
typedef eth_buf | eth_buf_t | ||||||||
An ethernet buffer structure. | |||||||||
typedef ethernet | ethernet_t | ||||||||
An ethernet packet structure. | |||||||||
Functions | |||||||||
void | to_eth_layer (ethernet_t *packet, size_t len) | ||||||||
Process an ethernet packet received from the physical layer.
| |||||||||
int | send_eth_packet (const uint8_t *to, const void *data, size_t len, uint16_t type) | ||||||||
Send an ethernet packet to the physiscal layer.
| |||||||||
bool | is_eth_promisc () | ||||||||
Check if the ethernet device has been configured in promiscuous mode.
| |||||||||
void | ifconfig (char *cmd) | ||||||||
This is the "ifconfig" command for the shell.
|
Definition in file eth.h.
|
Size of an ethernet address (a.k.a. MAC).
|
|
ARP packet type.
|
|
IP packet type.
|
|
Maximum ethernet packet size.
|
|
Size of the ethernet header.
|
|
Minimum ethernet packet size.
|
|
Ethernet MTU (Maximum transfer unit).
|
|
Send and receive buffers size.
|
|
An ethernet buffer structure.
|
|
Physical packet structure.
|