1 ------------------------------------------------------------------------
3 --- @brief C
struct definitions for all protocol headers and respective
4 --- additional structs for instance addresses.
5 --- Please check the source code for more information.
6 ------------------------------------------------------------------------
8 local
ffi = require
"ffi"
25 struct __attribute__ ((__packed__)) mac_address {
53 struct __attribute__((__packed__)) ethernet_header {
54 struct mac_address dst;
55 struct mac_address src;
59 struct __attribute__((__packed__)) arp_header {
65 struct mac_address sha;
66 union ip4_address spa;
67 struct mac_address tha;
68 union ip4_address tpa;
71 struct __attribute__((__packed__)) ptp_header {
78 uint32_t correction[2];
85 uint8_t logMessageInterval;
88 struct __attribute__((__packed__)) ip4_header {
97 union ip4_address src;
98 union ip4_address dst;
101 struct __attribute__((__packed__)) ip6_header {
106 union ip6_address src;
107 union ip6_address dst;
110 struct __attribute__((__packed__)) icmp_header {
114 union payload_t body;
117 struct __attribute__((__packed__)) udp_header {
124 struct __attribute__((__packed__)) tcp_header {
137 struct __attribute__((__packed__)) esp_header {
143 struct __attribute__((__packed__)) ah_header {
local ffi
low-level dpdk wrapper