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 <sabu2kurian at gmail.com>: > 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 l2fwd example, which has got the TAP interface to write the > data to and read the data from. > > using the ether_hdr , one could read the MAC address from the packet > > eth = rte_pktmbuf_mtod(m, struct ether_hdr *); > tmp = ð->s_addr.addr_bytes[0]; > > But how am I suppose to craft a packet and supply in all these details , so > that I could sent the packet via rte_eth_tx_burst > > > Thanks in advance >