9#ifndef DPDKLIBS_INCLUDE_DPDKLIBS_UDP_PACKETCTOR_HPP_
10#define DPDKLIBS_INCLUDE_DPDKLIBS_UDP_PACKETCTOR_HPP_
12#include <rte_byteorder.h>
23rte_le16_t
packet_fill(
struct ipv4_udp_packet_hdr * packet_hdr);
25 void pktgen_udp_hdr_ctor(
struct ipv4_udp_packet_hdr * packet_hdr, rte_le16_t packet_len,
int sport = 55677,
int dport = 55678);
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");
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);
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);
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)
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)
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")
rte_le16_t packet_fill(struct ipv4_udp_packet_hdr *packet_hdr)
void pktgen_udp_hdr_ctor(struct ipv4_udp_packet_hdr *packet_hdr, rte_le16_t packet_len, int sport=55677, int dport=55678)
bool get_ether_addr6(const char *s0, struct rte_ether_addr *ea)