From: Dmitry G. <dgo...@un...> - 2009-01-24 12:59:47
|
The compiler doesn't see the definition of u_int16_t. On linux it is in sys/types.h and in linux/types.h. You need to find the header which contains the definition of u_int16_t and include that header. BR, Dmitry KATWALA, KALPESH, ATTLABS wrote: > Hi All, > > I'm trying to compile SIPp using pcapplay on Solaris 5.10 version. > It is erroring in prepare_pcap.h {62}. > > Any idea how to get around this error? > > I tried following what's on the SIPP digest - but doesn't look like it > is working. > > http://www.mail-archive.com/sip...@li.../msg00056.ht > ml > > root@srel-util # make pcapplay > make OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed > "s/Power Macintosh/ppc/"` OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" > PCAPPLAY_LIBS="-lpcap" PCAPPLAY="-DPCAPPLAY" sipp > gcc -D__SUNOS -DSVN_VERSION="\"\"" -DPCAPPLAY -I. > -I/usr/local/ssl/include/ -c -o send_packets.o send_packets.c > In file included from send_packets.h:44, > from send_packets.c:60: > prepare_pcap.h:62: error: parse error before "u_int16_t" > prepare_pcap.h:62: warning: no semicolon at end of struct or union > prepare_pcap.h:66: error: parse error before '}' token > prepare_pcap.h:66: warning: data definition has no type or storage class > prepare_pcap.h:71: error: parse error before '*' token > prepare_pcap.h:72: error: parse error before "checksum_carry" > prepare_pcap.h:72: warning: data definition has no type or storage class > prepare_pcap.h:73: error: parse error before "pcap_pkts" > =================== > =================== > > Here is what line 62 of my prepare_pcap.h looks like: > #include <time.h> > #if defined(__HPUX) || defined(__DARWIN) || defined(__CYGWIN) || > defined(__FreeBSD__) > struct iphdr > { > #ifdef _HPUX_LI > unsigned int ihl:4; > unsigned int version:4; > #else > unsigned int version:4; > unsigned int ihl:4; > #endif > u_int8_t tos; > u_int16_t tot_len; > u_int16_t id; > u_int16_t frag_off; > u_int8_t ttl; > u_int8_t protocol; > u_int16_t check; > u_int32_t saddr; > u_int32_t daddr; > /*The options start here. */ > }; > #endif > typedef struct > { > u_char *data; > u_long pktlen; > struct timeval ts; > int partial_check; > } pcap_pkt; > #define PCAP_MAXPACKET 1500 > typedef struct > { > char *file; > u_int16_t base; <---- Line 62 > u_long max_length; > pcap_pkt *max; > pcap_pkt *pkts; > } pcap_pkts; > #ifdef __cplusplus > extern "C" { > #endif > int check(u_int16_t *, int); > u_int16_t checksum_carry(int); > int prepare_pkts(char *, pcap_pkts *); > void free_pkts(pcap_pkts *); > #ifdef __cplusplus > } > #endif > #endif /* PREPARE_PCAP_H */ > > > Thank you for your help. > > Kalpesh Katwala > SVT Testing Group, IMS, AT&T > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Sipp-users mailing list > Sip...@li... > https://lists.sourceforge.net/lists/listinfo/sipp-users > > |