Hello Roman,

Your router has a public and local IP. So, i guess your local machine
has only a local IP. Then, your local machine need to pass through your
router to access remote server. Your router has NAT rules to know which
local machine to route the content from the remote server.
I don't really understand what exactly you are looking for, but here
some possible answer (on linux) :

to get your ip address (local)
$ ip addr
to get the IP address (local) of the router :
$ ip route
to get the public address of the router :
$ curl -s http://whatismyip.akamai.com/
or
$ netcat -w 5 4.ifcfg.me 23
or
$ nc -w 5 4.ifcfg.me 23

There is also other command lines (ifconfig (instead of ip addr), route
-n (instead ip route), etc.).
++

Jack



Le 16/12/2017 à 17:35, Roman Haefeli a écrit :
> Hey all
> 
> Is there a simple cross-platform way for a patch to know the main IP
> address of the local machine? Assume the patch is connected to a remote
> server and is able to request its public IP address. What I like to
> find out is if the local patch is communicating through NAT or directly
> to the remote server. 
> 
> An incoming IP packet from the remote server would contain that
> information in the destination IP address field of the IP header, but
> the network objects I'm using ([tcpclient] and [udpclient]) don't
> expose that information. 
> 
> Maybe there are other ways?
> 
> Roman
> 
> 
> 
> _______________________________________________
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list
> 


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to