Voxia OS
v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
ethernet.h
Go to the documentation of this file.
1
#ifndef __NET__ETHERNET_H__
2
#define __NET__ETHERNET_H__
3
4
#include "
net/netbuff.h
"
5
#include "
net/netdev.h
"
6
#include <
type.h
>
7
8
struct
ethernet_header
{
9
uint8_t
dest_mac
[6];
10
uint8_t
src_mac
[6];
11
uint16_t
ethertype
;
12
}
__attribute__
((packed));
13
14
void
ethernet_send_frame
(
netdev_t
* dev,
struct
netbuff
*
netbuff
,
15
uint16_t
ethertype
,
const
uint8_t
dst_mac[6]);
16
17
#define ETHER_TYPE_ARP 0x0806
18
#define ETHER_TYPE_IP 0x0800
19
20
#endif
// __NET__ETHERNET_H__
__attribute__
typedef __attribute__
Definition
msi.c:47
ethernet_send_frame
void ethernet_send_frame(netdev_t *dev, struct netbuff *netbuff, uint16_t ethertype, const uint8_t dst_mac[6])
Definition
ethernet.c:9
ethertype
uint16_t ethertype
Definition
ethernet.h:2
netbuff.h
netdev.h
netdev_t
struct netdev netdev_t
Definition
netdev.h:19
ethernet_header
Definition
ethernet.h:8
ethernet_header::src_mac
uint8_t src_mac[6]
Definition
ethernet.h:10
ethernet_header::ethertype
uint16_t ethertype
Definition
ethernet.h:11
ethernet_header::dest_mac
uint8_t dest_mac[6]
Definition
ethernet.h:9
netbuff
Definition
netbuff.h:9
type.h
uint16_t
unsigned short uint16_t
Definition
type.h:13
uint8_t
unsigned char uint8_t
Definition
type.h:7
kernel
net
ethernet.h
Generated on Sat May 30 2026 11:09:57 for Voxia OS by
1.13.2