DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
IPV4UDPPacket.hpp
Go to the documentation of this file.
1
8#ifndef DPDKLIBS_SRC_UDP_IPV4UDPPACKET_HPP_
9#define DPDKLIBS_SRC_UDP_IPV4UDPPACKET_HPP_
10
11#include <rte_ether.h>
12#include <rte_ip.h>
13#include <rte_udp.h>
14
15namespace dunedaq {
16namespace dpdklibs {
17namespace udp {
18
19struct ipaddr {
20 uint8_t addr_bytes[4];
21};
22
24 struct rte_ether_hdr eth_hdr;
25 // l3 header
30 //struct rte_ether_hdr {
31 // struct rte_ether_addr d_addr; /**< Destination address. */
32 // struct rte_ether_addr s_addr; /**< Source address. */
33 // rte_be16_t ether_type; /**< Frame type. */
34 //} __rte_aligned(2);
35 struct rte_ipv4_hdr ipv4_hdr;
36 // l3 header
40 //struct rte_ipv4_hdr {
41 // uint8_t version_ihl; /**< version and header length */
42 // uint8_t type_of_service; /**< type of service */
43 // rte_be16_t total_length; /**< length of packet */
44 // rte_be16_t packet_id; /**< packet ID */
45 // rte_be16_t fragment_offset; /**< fragmentation offset */
46 // uint8_t time_to_live; /**< time to live */
47 // uint8_t next_proto_id; /**< protocol ID */
48 // rte_be16_t hdr_checksum; /**< header checksum */
49 // rte_be32_t src_addr; /**< source address */
50 // rte_be32_t dst_addr; /**< destination address */
51 //} __rte_packed;
52 struct rte_udp_hdr udp_hdr;
56 //struct rte_udp_hdr {
57 // rte_be16_t src_port; /**< UDP source port. */
58 // rte_be16_t dst_port; /**< UDP destination port. */
59 // rte_be16_t dgram_len; /**< UDP datagram length */
60 // rte_be16_t dgram_cksum; /**< UDP datagram checksum */
61 //} __rte_packed;
63
66#warning RS FIXME -> Hardcoded IPV4 UDP packet payload size!
67 char payload[8000]; // TODO jumbo Mind the padding
68};
69
70} // namespace udp
71} // namespace dpdklibs
72} // namespace dunedaq
73
74#endif // DPDKLIBS_SRC_UDP_IPV4UDPPACKET_HPP_
struct dunedaq::dpdklibs::udp::ipv4_udp_packet_hdr __rte_packed
Including Qt Headers.