Hi,
I'm trying to compile SIPpv3.1 on Solaris platform for PCAP and I'm
seeing the following error. Anyone has any suggestions?
Thx,
Kalpesh Katwala
r...@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 prepare_pcap.o prepare_pcap.c
prepare_pcap.c: In function `prepare_pkts':
prepare_pcap.c:121: error: dereferencing pointer to incomplete type
prepare_pcap.c:132: error: dereferencing pointer to incomplete type
prepare_pcap.c: At top level:
prepare_pcap.c:171: error: parse error before '->' token
prepare_pcap.c:174: error: parse error before '(' token
prepare_pcap.c:174: warning: conflicting types for built-in function
`fprintf'
prepare_pcap.c:175: warning: parameter names (without types) in function
declaration
prepare_pcap.c:175: error: conflicting types for `pcap_close'
work-3.1/libpcap-0.9.5/pcap.h:225: error: previous declaration of
`pcap_close'
prepare_pcap.c:175: warning: data definition has no type or storage
class
prepare_pcap.c:177: error: parse error before "return"
*** Error code 1
make: Fatal error: Command failed for target `prepare_pcap.o'
My prepare_pcap.c file (around line 121 is:)
#endif
ethhdr = (ether_hdr *)pktdata;
if (ntohs(ethhdr->ether_type) != 0x0800 /* IPv4 */
&& ntohs(ethhdr->ether_type) != 0x86dd) /* IPv6 */ {
fprintf(stderr, "Ignoring non IP{4,6} packet!\n");
continue;
}
iphdr = (struct iphdr *)((char *)ethhdr + sizeof(*ethhdr));
//ipv4
if (iphdr->protocol != "17") {
fprintf(stderr, "prepare_pcap.c: Ignoring non UDP packet!\n");
continue;
}
#if defined(__DARWIN) || defined(__CYGWIN) || defined(__FreeBSD__)
udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2) + 4);
pktlen = (u_long)(ntohs(udphdr->uh_ulen));
#elif defined ( __HPUX)
udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2));
pktlen = (u_long) pkthdr->len - sizeof(*ethhdr) - sizeof(*iphdr);
#else
udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2));
pktlen = (u_long)(ntohs(udphdr->uh_ulen));
#endif
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users