vinod nagula
|
invalid application of 'sizeof' to incomplete type 'struct ifreq'
|
vinod nagula
07/21/2009 5:58 AM
post34157
|
invalid application of 'sizeof' to incomplete type 'struct ifreq'
I am using following structure, it is defined in net/if.h.
struct ifreq ifr;
ifr.ifr_flags = ifr.ifr_flags | IFF_PROMISC;
When I compile my application following errors displayed,
error: storage size of 'ifr' isn't known
error: invalid application of 'sizeof' to incomplete type 'struct ifreq'
error: 'IFF_PROMISC' undeclared (first use in this function)
error: invalid application of 'sizeof' to incomplete type 'struct ifreq'
error: invalid application of 'sizeof' to incomplete type 'struct ifreq'
error: invalid application of 'sizeof' to incomplete type 'struct ifreq'
And also I would like to get interface hw address, somebody suggested to use getifaddrs(), freeifaddrs() because
SIOCGIFHWADDR is not supported in QNX, Can anybody give me the sample code for the same.
Thanks,
Vinod.
|
|
|