DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dpdklibs
include
dpdklibs
udp
PacketCtor.hpp
Go to the documentation of this file.
1
9
#ifndef DPDKLIBS_INCLUDE_DPDKLIBS_UDP_PACKETCTOR_HPP_
10
#define DPDKLIBS_INCLUDE_DPDKLIBS_UDP_PACKETCTOR_HPP_
11
12
#include <rte_byteorder.h>
13
#include "
IPV4UDPPacket.hpp
"
14
15
#include "
detdataformats/DAQEthHeader.hpp
"
16
17
#include <string>
18
19
namespace
dunedaq
{
20
namespace
dpdklibs
{
21
namespace
udp
{
22
23
rte_le16_t
packet_fill
(
struct
ipv4_udp_packet_hdr
* packet_hdr);
24
25
void
pktgen_udp_hdr_ctor
(
struct
ipv4_udp_packet_hdr
* packet_hdr, rte_le16_t packet_len,
int
sport = 55677,
int
dport = 55678);
26
27
void
pktgen_ipv4_ctor
(
struct
ipv4_udp_packet_hdr
* packet_hdr, rte_le16_t packet_len,
const
std::string& src_ip_addr =
"0.0.0.0"
,
const
std::string& dst_ip_addr =
"0.0.0.0"
);
28
29
void
pktgen_ether_hdr_ctor
(
struct
ipv4_udp_packet_hdr
* packet_hdr,
const
std::string& dst_mac_address =
"0a:00:10:c2:15:c1"
,
const
int
port_id = 0);
30
31
/* Convert 00:11:22:33:44:55 to ethernet address */
32
bool
get_ether_addr6
(
const
char
*s0,
struct
rte_ether_addr *ea);
33
34
// n.b. The memory pool which bufs is pointing to must be allocated, otherwise you'll get a crash
35
void
construct_packets_for_burst
(
const
int
port_id,
const
std::string& dst_mac_addr,
const
int
payload_bytes,
const
int
burst_size, rte_mbuf** bufs);
36
37
}
// namespace udp
38
}
// namespace dpdklibs
39
}
// namespace dunedaq
40
41
#endif
// DPDKLIBS_INCLUDE_DPDKLIBS_PACKETCTOR_HPP_
DAQEthHeader.hpp
IPV4UDPPacket.hpp
dunedaq::dpdklibs::udp
Definition
IPV4UDPPacket.hpp:17
dunedaq::dpdklibs::udp::pktgen_ether_hdr_ctor
void pktgen_ether_hdr_ctor(struct ipv4_udp_packet_hdr *packet_hdr, const std::string &dst_mac_address="0a:00:10:c2:15:c1", const int port_id=0)
Definition
PacketCtor.cpp:183
dunedaq::dpdklibs::udp::construct_packets_for_burst
void construct_packets_for_burst(const int port_id, const std::string &dst_mac_addr, const int payload_bytes, const int burst_size, rte_mbuf **bufs)
Definition
PacketCtor.cpp:202
dunedaq::dpdklibs::udp::pktgen_ipv4_ctor
void pktgen_ipv4_ctor(struct ipv4_udp_packet_hdr *packet_hdr, rte_le16_t packet_len, const std::string &src_ip_addr="0.0.0.0", const std::string &dst_ip_addr="0.0.0.0")
Definition
PacketCtor.cpp:119
dunedaq::dpdklibs::udp::packet_fill
rte_le16_t packet_fill(struct ipv4_udp_packet_hdr *packet_hdr)
Definition
PacketCtor.cpp:66
dunedaq::dpdklibs::udp::pktgen_udp_hdr_ctor
void pktgen_udp_hdr_ctor(struct ipv4_udp_packet_hdr *packet_hdr, rte_le16_t packet_len, int sport=55677, int dport=55678)
Definition
PacketCtor.cpp:95
dunedaq::dpdklibs::udp::get_ether_addr6
bool get_ether_addr6(const char *s0, struct rte_ether_addr *ea)
Definition
PacketCtor.cpp:37
dunedaq::dpdklibs
Definition
ARP.hpp:16
dunedaq
Including Qt Headers.
Definition
module.cpp:16
dunedaq::dpdklibs::udp::ipv4_udp_packet_hdr
Definition
IPV4UDPPacket.hpp:23
Generated on
for DUNE-DAQ by
1.17.0