Does anyone know to detect if a computer is directly connected to the internet or that its using a router etc, gotta be with code to![]()
Does anyone know to detect if a computer is directly connected to the internet or that its using a router etc, gotta be with code to![]()
I'm not going to say absolutely no, because likely there is some protocol by which you could at least indirectly infer that (since your ISP can communicate with your router from outside, and I guess where there's a router, there's a LAN). Investigating this might be your best bet; while you will certainly run afoul of some authority by breaking into a remote router, there may be a legitimate means of querying to see if a router is there and if it can respond to such and such a protocol.
Outside of that, tcp/ip packet headers contain both the IP address (that of the router) and the computer specific MAC address (which allows the router to route correctly). Of course, this alone is indistinguishable from a lone computer...
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
You're ALWAYS connected to a router. What exactly do you mean by "directly connected?"
Code://try //{ if (a) do { f( b); } while(1); else do { f(!b); } while(1); //}