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{
21 uint8_t addr_bytes[4];
22};
23
25{
26 struct rte_ether_hdr eth_hdr;
27 // l3 header
32 // struct rte_ether_hdr {
33 // struct rte_ether_addr d_addr; /**< Destination address. */
34 // struct rte_ether_addr s_addr; /**< Source address. */
35 // rte_be16_t ether_type; /**< Frame type. */
36 // } __rte_aligned(2);
37 struct rte_ipv4_hdr ipv4_hdr;
38 // l3 header
42 // struct rte_ipv4_hdr {
43 // uint8_t version_ihl; /**< version and header length */
44 // uint8_t type_of_service; /**< type of service */
45 // rte_be16_t total_length; /**< length of packet */
46 // rte_be16_t packet_id; /**< packet ID */
47 // rte_be16_t fragment_offset; /**< fragmentation offset */
48 // uint8_t time_to_live; /**< time to live */
49 // uint8_t next_proto_id; /**< protocol ID */
50 // rte_be16_t hdr_checksum; /**< header checksum */
51 // rte_be32_t src_addr; /**< source address */
52 // rte_be32_t dst_addr; /**< destination address */
53 // } __rte_packed;
54 struct rte_udp_hdr udp_hdr;
58 // struct rte_udp_hdr {
59 // rte_be16_t src_port; /**< UDP source port. */
60 // rte_be16_t dst_port; /**< UDP destination port. */
61 // rte_be16_t dgram_len; /**< UDP datagram length */
62 // rte_be16_t dgram_cksum; /**< UDP datagram checksum */
63 // } __rte_packed;
65
66} // namespace udp
67} // namespace dpdklibs
68} // namespace dunedaq
69
70#endif // DPDKLIBS_SRC_UDP_IPV4UDPPACKET_HPP_
struct dunedaq::dpdklibs::udp::ipv4_udp_packet_hdr __rte_packed
The DUNE-DAQ namespace.