summaryrefslogtreecommitdiff
path: root/net/eth.h
blob: f90e615465cf5433662e1cb0c000b28121a19d19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//http://www.saminiir.com/lets-code-tcp-ip-stack-1-ethernet-arp/
//https://tools.ietf.org/html/rfc7414
#ifndef FOOLOS_ETH_H
#define FOOLOS_ETH_H

#include <stdint.h>

struct eth_hdr
{
    unsigned char dmac[6];	// destination mac
    unsigned char smac[6];	// source mac
    uint16_t ethertype;		// length or type
    unsigned char payload[];	// payload
} __attribute__((packed));

#endif