Help compiling msl_test.c

Andrew White andywhite at gmail.com
Fri Jun 11 08:52:38 UTC 2010


Hi,

I have tried compiling msl_test.c on Freebsd

 g++ -o msl_test msl_test.c
In file included from msl_test.c:53:
msl_test_bsd.c: In function `void* bpfWalkInit(void*, int*)':
msl_test_bsd.c:45: error: invalid conversion from `void*' to `bpf_hdr*'
msl_test_bsd.c:46: error: pointer of type `void *' used in arithmetic
msl_test_bsd.c:46: error: invalid conversion from `void*' to `char*'
msl_test_bsd.c: In function `void* bpfWalkNext(int*)':
msl_test_bsd.c:61: error: invalid conversion from `void*' to `bpf_hdr*'
msl_test_bsd.c:68: error: pointer of type `void *' used in arithmetic
msl_test_bsd.c:69: error: pointer of type `void *' used in arithmetic
msl_test_bsd.c:73: error: invalid conversion from `void*' to `bpf_hdr*'
msl_test_bsd.c:78: error: pointer of type `void *' used in arithmetic
msl_test_bsd.c:78: error: invalid conversion from `void*' to `char*'
msl_test_bsd.c: In function `void msl_probe(void*, int)':
msl_test_bsd.c:203: error: invalid conversion from `void*' to `char*'
msl_test_bsd.c:203: error: invalid conversion from `void*' to `char*'
msl_test.c: In function `void breakupPacket(void*, ether_header**, ip**,
tcphdr**)':
msl_test.c:166: error: pointer of type `void *' used in arithmetic
msl_test.c:170: error: pointer of type `void *' used in arithmetic
msl_test.c: In function `int createTCPsession(sockaddr_in)':
msl_test.c:225: error: invalid conversion from `int*' to `socklen_t*'
msl_test.c:225: error:   initializing argument 3 of `int getsockname(int,
sockaddr*, socklen_t*)'


and in ubuntu and also debian

g++ -o msl_test msl_test.c
In file included from msl_test.c:51:
msl_test_linux.c: In function ‘int raw_open(char*)’:
msl_test_linux.c:138: error: invalid conversion from ‘unsigned char*’ to
‘char*’
msl_test_linux.c:138: error:   initializing argument 1 of ‘char*
strncpy(char*, const char*, size_t)’
msl_test_linux.c: In function ‘void* find_our_packet(int*)’:
msl_test_linux.c:169: error: invalid conversion from ‘int*’ to ‘socklen_t*’
msl_test_linux.c:169: error:   initializing argument 6 of ‘ssize_t
recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)’
msl_test.c: In function ‘void breakupPacket(void*, ether_header**, ip**,
tcphdr**)’:
msl_test.c:166: warning: pointer of type ‘void *’ used in arithmetic
msl_test.c:170: warning: pointer of type ‘void *’ used in arithmetic
msl_test.c: In function ‘int createTCPsession(sockaddr_in)’:
msl_test.c:225: error: invalid conversion from ‘int*’ to ‘socklen_t*’
msl_test.c:225: error:   initializing argument 3 of ‘int getsockname(int,
sockaddr*, socklen_t*)’


What am I missing, any help appreciated ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.web-polygraph.org/pipermail/users/attachments/20100611/8c9f53fc/attachment.html>


More information about the Users mailing list