From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-x242.google.com (mail-qc0-x242.google.com [IPv6:2607:f8b0:400d:c01::242]) by dpdk.org (Postfix) with ESMTP id 6364E5907 for ; Thu, 13 Mar 2014 12:14:24 +0100 (CET) Received: by mail-qc0-f194.google.com with SMTP id i8so337333qcq.5 for ; Thu, 13 Mar 2014 04:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=644SS2cX3chHkWwf8wDGkoU0T9dX6DgW3G/1S+tj744=; b=wDBOqIBkgXo3HjgO9d+XLPf8PtuVCCcWSGEFBYjJBSgUPTEGOSCRfqXuuxMQHNVPET 5oBNTfGtoOEkAHdd7nZMHiACtqJmEZ5zUnD8rxfev1RTK/5UgDBSpg2YLnVvqcZ43MaM gOMX9NIOoWfjpbP78Gd4pkFYwwrttVfQaUFwlzMOt2j06eJJw7L7Og4Wth2pnJ3o4qSy 1ksGXugd3zsl1W6NdnUwyH9vUpRkEonvq8UND51WI6jmx7hrfLbyuoKhpkTYcmQ6Js2K RUpXDMpXF6nEnXyUK871q57bK3cOymIQYPUbAER9MoXuT0V+XwkoI/tNuH+BAmasnuaC 8cNA== MIME-Version: 1.0 X-Received: by 10.140.44.69 with SMTP id f63mr1383902qga.31.1394709354306; Thu, 13 Mar 2014 04:15:54 -0700 (PDT) Received: by 10.96.69.97 with HTTP; Thu, 13 Mar 2014 04:15:54 -0700 (PDT) Date: Thu, 13 Mar 2014 16:45:54 +0530 Message-ID: From: sabu kurian To: dev@dpdk.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Crafting a packet for transmission. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2014 11:14:24 -0000 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