[dpdk-dev] Error : dereferencing pointer to incomplete type......

Richardson, Bruce bruce.richardson at intel.com
Tue Mar 18 10:55:55 CET 2014


Maybe check that you have included the header files with the correct structure definitions.

> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of sabu kurian
> Sent: Monday, March 17, 2014 8:28 AM
> To: dev at dpdk.org
> Subject: Re: [dpdk-dev] Error : dereferencing pointer to incomplete type......
> 
> A little bit of correction on the second format:
> 
> iphdr->packet_id = rte_bswap16(0x0001); // This one gives error as well....
> 
> Any idea on what could be wrong ?
> 
> Thanks
> 
> 
> 
> 
> 
> 
> On Mon, Mar 17, 2014 at 1:51 PM, sabu kurian <sabu2kurian at gmail.com>
> wrote:
> 
> > Hello friends,
> >
> > I get a error like "dereferencing pointer to incomplete type", when I
> > try to fill in the IPv4 headers.
> >
> > Below is the code snippet:
> >
> > struct ether_hdr *ehdr = rte_pktmbuf_mtod(m_pool, struct ether_hdr
> *);
> >
> > struct ipv4_hdr *iphdr = (struct ipv4_hdr *)(&ehdr[1]);
> >
> >
> > iphdr->packet_id = (uint16_t)0x0001; //This gives error.
> >
> > rte_bswap16(iphdr->packet_id,0x0001); //This format also gives the
> > same error.
> >
> > And also what is the best way to copy an 8 bit (1 byte) value for
> > fields like 'type_of_service' ? will rte_memcpy() work for it ?
> >
> >
> >
> > Thanks in advance....
> >
> >


More information about the dev mailing list