tcpdump mailing list archives

compilation errors in pcap.h


From: gurumoorthi K <gurumoorthi () vit ac in>
Date: Sat, 8 Feb 2003 12:30:13 -0000


Hello,

I noticed the following problem: I can't compile files
including pcap.h in Linux. The problem seems to
be the u_ types that are no longer being defined.IMHO
pcap.h should make sure it brings in any non standard
types it needs itself. Until such a
time/version: Any hints how I may use pcap.h and still
work in a more or less platform independent way?

 Thanks
        Guru
 
I liked to get a detailed reply.

program ->  pcc.c

#include <pcap.h>

int main()
{
return 0;
}

command shell:-
  
            #cc pcc.c
 
In file included from /usr/include/pcap.h:43,
                 from pcap-types.c:1:
/usr/include/net/bpf.h:53: parse error before
`bpf_u_int32'
/usr/include/net/bpf.h:53: warning: data definition
has no type or storage class
/usr/include/net/bpf.h:74: parse error before `u_int'
/usr/include/net/bpf.h:74: warning: no semicolon at
end of struct or union
/usr/include/net/bpf.h:76: parse error before `}'
/usr/include/net/bpf.h:82: parse error before `u_int'
/usr/include/net/bpf.h:82: warning: no semicolon at
end of struct or union
/usr/include/net/bpf.h:83: warning: data definition
has no type or storage class
/usr/include/net/bpf.h:98: parse error before
`u_short'
/usr/include/net/bpf.h:98: warning: no semicolon at
end of struct or union
/usr/include/net/bpf.h:99: warning: data definition
has no type or storage class
/usr/include/net/bpf.h:151: parse error before
`bpf_u_int32'
/usr/include/net/bpf.h:151: warning: no semicolon at
end of struct or union
/usr/include/net/bpf.h:152: warning: data definition
has no type or storage class
/usr/include/net/bpf.h:153: parse error before
`bh_hdrlen'
/usr/include/net/bpf.h:153: warning: data definition
has no type or storage class
/usr/include/net/bpf.h:404: parse error before
`u_short'
/usr/include/net/bpf.h:404: warning: no semicolon at
end of struct or union
/usr/include/net/bpf.h:405: warning: data definition
has no type or storage class
/usr/include/net/bpf.h:406: parse error before `jf'
/usr/include/net/bpf.h:406: warning: data definition
has no type or storage class
/usr/include/net/bpf.h:408: parse error before `}'
/usr/include/net/bpf.h:435: parse error before
`bpf_filter'
/usr/include/net/bpf.h:435: parse error before
`u_char'
/usr/include/net/bpf.h:435: warning: data definition
has no type or storage class
In file included from pcap-types.c:1:
/usr/include/pcap.h:105: parse error before
`bpf_u_int32'
/usr/include/pcap.h:105: warning: no semicolon at end
of struct or union
/usr/include/pcap.h:106: warning: data definition has
no type or storage class
/usr/include/pcap.h:107: parse error before
`version_minor'
/usr/include/pcap.h:107: warning: data definition has
no type or storage class
/usr/include/pcap.h:109: parse error before `sigfigs'
/usr/include/pcap.h:109: warning: data definition has
no type or storage class
/usr/include/pcap.h:110: parse error before `snaplen'
/usr/include/pcap.h:110: warning: data definition has
no type or storage class
/usr/include/pcap.h:111: parse error before `linktype'
/usr/include/pcap.h:111: warning: data definition has
no type or storage class
/usr/include/pcap.h:121: parse error before
`bpf_u_int32'
/usr/include/pcap.h:121: warning: no semicolon at end
of struct or union
/usr/include/pcap.h:122: warning: data definition has
no type or storage class
/usr/include/pcap.h:129: parse error before `u_int'
/usr/include/pcap.h:129: warning: no semicolon at end
of struct or union
/usr/include/pcap.h:130: warning: data definition has
no type or storage class
/usr/include/pcap.h:131: parse error before
`ps_ifdrop'
/usr/include/pcap.h:131: warning: data definition has
no type or storage class
/usr/include/pcap.h:142: parse error before `u_int'
/usr/include/pcap.h:142: warning: no semicolon at end
of struct or union
/usr/include/pcap.h:158: parse error before `*'
/usr/include/pcap.h:162: parse error before
`bpf_u_int32'
/usr/include/pcap.h:167: parse error before `u_char'
/usr/include/pcap.h:168: parse error before `u_char'
/usr/include/pcap.h:169: parse error before `*'
/usr/include/pcap.h:170: warning: data definition has
no type or storage class
/usr/include/pcap.h:179: parse error before
`bpf_u_int32'
/usr/include/pcap.h:181: parse error before
`bpf_u_int32'
/usr/include/pcap.h:195: parse error before `*'
/usr/include/pcap.h:201: parse error before
`bpf_filter'
/usr/include/pcap.h:201: parse error before `u_char'
/usr/local/include/pcap.h:201: warning: data
definition has no type or storage class
 
     
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: