Loading...
Searching...
No Matches
hdr.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for
6 * more details.
7 */
8
9#pragma once
10
22
23#include <inttypes.h>
24
25#include "byteorder.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#define ETHERNET_ADDR_LEN (6)
32
33#ifndef ETH_ALEN
34#define ETH_ALEN ETHERNET_ADDR_LEN
37#endif
38
42typedef struct __attribute__((packed)) {
47
48#ifdef __cplusplus
49}
50#endif
51
Functions to work with different byte orders.
be_uint16_t network_uint16_t
A 16 bit integer in network byte order.
Definition byteorder.h:107
#define ETHERNET_ADDR_LEN
Length of an Ethernet address.
Definition hdr.h:31
Adds include for missing inttype definitions.
Ethernet header.
Definition hdr.h:42
network_uint16_t type
ether type (see Ether types)
Definition hdr.h:45
uint8_t src[ETHERNET_ADDR_LEN]
source address
Definition hdr.h:44
uint8_t dst[ETHERNET_ADDR_LEN]
destination address
Definition hdr.h:43