From: Jijiang Liu Date: Fri, 5 Feb 2016 07:31:40 +0000 (+0800) Subject: examples/vhost: remove IPv4 header definition X-Git-Tag: spdx-start~7618 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=691693c6e6653dc887bd7eb5cc868d41082ca17f;p=dpdk.git examples/vhost: remove IPv4 header definition Remove the ipv4_hdr structure defination in vhost sample. The same structure has already defined in the rte_ip.h file, so we remove the defination from the sample, and include that header file. Signed-off-by: Jijiang Liu Acked-by: Yuanhan Liu --- diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 73564f01c5..43183971c9 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -50,6 +50,7 @@ #include #include #include +#include #include "main.h" @@ -294,20 +295,6 @@ struct vlan_ethhdr { __be16 h_vlan_encapsulated_proto; }; -/* IPv4 Header */ -struct ipv4_hdr { - uint8_t version_ihl; /**< version and header length */ - uint8_t type_of_service; /**< type of service */ - uint16_t total_length; /**< length of packet */ - uint16_t packet_id; /**< packet ID */ - uint16_t fragment_offset; /**< fragmentation offset */ - uint8_t time_to_live; /**< time to live */ - uint8_t next_proto_id; /**< protocol ID */ - uint16_t hdr_checksum; /**< header checksum */ - uint32_t src_addr; /**< source address */ - uint32_t dst_addr; /**< destination address */ -} __attribute__((__packed__)); - /* Header lengths. */ #define VLAN_HLEN 4 #define VLAN_ETH_HLEN 18