[dpdk-dev] Crafting a packet for transmission.

2014-03-13 Thread Vladimir Medvedkin
Cast pointer to required struct pointer, for example for ipv4 struct ipv4_hdr *iph; iph = (struct ipv4_hdr *)rte_pktmbuf_append(m, sizeof(struct ipv4_hdr)); and fill in fields. Look in lib/librte_net/ directory. Regards, Vladimir 2014-03-13 16:04 GMT+04:00 Aravind : > Thank you for your reply V

[dpdk-dev] Crafting a packet for transmission.

2014-03-13 Thread sabu kurian
Hai friends, My requirement is to create a packet generator. So I could use struct rte_mbuf * m; to create a single packet holder. So how am I suppose to fill in the packet details like the MAC source , destination and also the IP source , destination (in case of IPv4 packets). Following the l2

[dpdk-dev] Crafting a packet for transmission.

2014-03-13 Thread Vladimir Medvedkin
Hi, At first look at https://github.com/Pktgen/Pktgen-DPDK If you need your custom app: - alloc mbuf with rte_pktmbuf_alloc - fill up L2-4 headers fields (look at rte_pktmbuf_append func for example) - send packet via rte_eth_tx_burst Regards, Vladimir 2014-03-13 15:15 GMT+04:00 sabu kurian :