Loading...
Searching...
No Matches
hdr.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
19
20#include <inttypes.h>
21
22#include "byteorder.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#define ETHERNET_ADDR_LEN (6)
29
30#ifndef ETH_ALEN
31#define ETH_ALEN ETHERNET_ADDR_LEN
34#endif
35
39typedef struct __attribute__((packed)) {
44
45#ifdef __cplusplus
46}
47#endif
48
Functions to work with different byte orders.
be_uint16_t network_uint16_t
A 16 bit integer in network byte order.
Definition byteorder.h:104
#define ETHERNET_ADDR_LEN
Length of an Ethernet address.
Definition hdr.h:28
Adds include for missing inttype definitions.
Ethernet header.
Definition hdr.h:39
network_uint16_t type
ether type (see Ether types)
Definition hdr.h:42
uint8_t src[ETHERNET_ADDR_LEN]
source address
Definition hdr.h:41
uint8_t dst[ETHERNET_ADDR_LEN]
destination address
Definition hdr.h:40