Comments (13)
@JohnDDuncanIII may you explain how do you do it? Thanks
from icmptunnel.
struct iphdr not exists on MacOS, use the define code below
#ifdef APPLE
#define iphdr ip
#endif
from icmptunnel.
@martinorob An alternative ICMP tunnel implementation with a working OS X client is Hans:
http://code.gerade.org/hans/
https://github.com/friedrich/hans
from icmptunnel.
The issue is probably with some header file. Presently it works fine on linux. Will look into it in some time
from icmptunnel.
For what it's worth, I also tried compiling this with gcc47 (sourced from pkg-src and installed on OS X 10.11.2) instead of clang and it still exited with errors
gcc -c -o icmptunnel.o icmptunnel.c -I.
gcc -c -o icmp.o icmp.c -I.
icmp.c:22:47: warning: 'struct icmphdr' declared inside parameter list [enabled by default]
icmp.c:22:47: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
icmp.c:22:47: warning: 'struct iphdr' declared inside parameter list [enabled by default]
icmp.c: In function 'send_icmp_packet':
icmp.c:103:24: error: invalid application of 'sizeof' to incomplete type 'struct iphdr'
icmp.c:103:47: error: invalid application of 'sizeof' to incomplete type 'struct icmphdr'
icmp.c:114:45: error: invalid application of 'sizeof' to incomplete type 'struct iphdr'
icmp.c:115:43: error: invalid application of 'sizeof' to incomplete type 'struct iphdr'
icmp.c:115:66: error: invalid application of 'sizeof' to incomplete type 'struct icmphdr'
icmp.c:117:3: warning: passing argument 1 of 'prepare_headers' from incompatible pointer type [enabled by default]
icmp.c:22:6: note: expected 'struct iphdr *' but argument is of type 'struct iphdr *'
icmp.c:117:3: warning: passing argument 2 of 'prepare_headers' from incompatible pointer type [enabled by default]
icmp.c:22:6: note: expected 'struct icmphdr *' but argument is of type 'struct icmphdr *'
icmp.c:119:5: error: dereferencing pointer to incomplete type
icmp.c:120:5: error: dereferencing pointer to incomplete type
icmp.c:121:5: error: dereferencing pointer to incomplete type
icmp.c:125:7: error: dereferencing pointer to incomplete type
icmp.c:126:7: error: dereferencing pointer to incomplete type
icmp.c:127:7: error: dereferencing pointer to incomplete type
icmp.c:127:60: error: invalid application of 'sizeof' to incomplete type 'struct icmphdr'
icmp.c: In function 'receive_icmp_packet':
icmp.c:165:45: error: invalid application of 'sizeof' to incomplete type 'struct iphdr'
icmp.c:166:43: error: invalid application of 'sizeof' to incomplete type 'struct iphdr'
icmp.c:166:66: error: invalid application of 'sizeof' to incomplete type 'struct icmphdr'
icmp.c:169:26: error: dereferencing pointer to incomplete type
icmp.c:170:26: error: dereferencing pointer to incomplete type
icmp.c:171:30: error: dereferencing pointer to incomplete type
icmp.c:172:55: error: invalid application of 'sizeof' to incomplete type 'struct iphdr'
icmp.c:172:78: error: invalid application of 'sizeof' to incomplete type 'struct icmphdr'
icmp.c: At top level:
icmp.c:220:47: warning: 'struct icmphdr' declared inside parameter list [enabled by default]
icmp.c:220:47: warning: 'struct iphdr' declared inside parameter list [enabled by default]
icmp.c:220:6: error: conflicting types for 'prepare_headers'
icmp.c:22:6: note: previous declaration of 'prepare_headers' was here
icmp.c: In function 'prepare_headers':
icmp.c:222:5: error: dereferencing pointer to incomplete type
icmp.c:223:5: error: dereferencing pointer to incomplete type
icmp.c:224:5: error: dereferencing pointer to incomplete type
icmp.c:225:5: error: dereferencing pointer to incomplete type
icmp.c:226:5: error: dereferencing pointer to incomplete type
icmp.c:227:5: error: dereferencing pointer to incomplete type
icmp.c:228:5: error: dereferencing pointer to incomplete type
icmp.c:230:7: error: dereferencing pointer to incomplete type
icmp.c:231:7: error: dereferencing pointer to incomplete type
icmp.c:232:7: error: dereferencing pointer to incomplete type
icmp.c:233:7: error: dereferencing pointer to incomplete type
make: *** [icmp.o] Error 1
running echo $?
reveals that it exited with code 2. gcc version used is version 4.7.4 built and installed yesterday.
from icmptunnel.
Perhapsstruct iphdr
is defined differently/not defined in OS X. I'll have to define it myself.
I'm still searching for other solutions though.
from icmptunnel.
👍
from icmptunnel.
Yeah, I tried declaring the structs manually in the icmp.c file [struct iphdr{stuff}; , etc], which fixed the 'incomplete type' issues. I do agree that there is probably a more portable solution to the problem though.
from icmptunnel.
Any updates on this?
from icmptunnel.
Not yet.
from icmptunnel.
Got the same issues
from icmptunnel.
Same here
from icmptunnel.
I'm having the same.
from icmptunnel.
Related Issues (20)
- Unable to write to tunnel HOT 2
- Payload size is small. HOT 2
- Tag a release? HOT 1
- [Question] Is the usecase of this software different from `sshuttle` ? HOT 1
- compiling on Cygwin HOT 3
- Encrypt traffic? HOT 1
- i got error
- Client dont have internet HOT 6
- removed HOT 1
- deleted HOT 3
- cant bind tun0 address to create a socks proxy HOT 2
- feature to add client for linphone
- compile error on termux (rooted) HOT 1
- Make Problem HOT 1
- Traffic IP
- Demo
- Can't connect server ip
- error while running tunnel on client
- work On centos 7
- does it support icmpv6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icmptunnel.