Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
ethernet.h File Reference
#include "net/netbuff.h"
#include "net/netdev.h"
#include <type.h>

Go to the source code of this file.

Data Structures

struct  ethernet_header
 

Macros

#define ETHER_TYPE_ARP   0x0806
 
#define ETHER_TYPE_IP   0x0800
 

Functions

struct ethernet_header __attribute__ ((packed))
 
void ethernet_send_frame (netdev_t *dev, struct netbuff *netbuff, uint16_t ethertype, const uint8_t dst_mac[6])
 

Variables

uint8_t dest_mac [6]
 
uint8_t src_mac [6]
 
uint16_t ethertype
 

Macro Definition Documentation

◆ ETHER_TYPE_ARP

#define ETHER_TYPE_ARP   0x0806

Definition at line 17 of file ethernet.h.

Referenced by socket_receive().

◆ ETHER_TYPE_IP

#define ETHER_TYPE_IP   0x0800

Definition at line 18 of file ethernet.h.

Referenced by ipv4_send(), and socket_receive().

Function Documentation

◆ __attribute__()

struct ethernet_header __attribute__ ( (packed) )

Definition at line 1 of file tcp.h.

◆ ethernet_send_frame()

Variable Documentation

◆ dest_mac

uint8_t dest_mac[6]

Definition at line 0 of file ethernet.h.

◆ ethertype

uint16_t ethertype

Definition at line 2 of file ethernet.h.

Referenced by ethernet_send_frame(), and socket_receive().

◆ src_mac

uint8_t src_mac[6]

Definition at line 1 of file ethernet.h.