My eth1 : IP adrress is something like a:b:c:d
What i get in server that is router given address (public ip): e:f:g:h
is there any way to find the local ip address of the system in C and must be udp
My eth1 : IP adrress is something like a:b:c:d
What i get in server that is router given address (public ip): e:f:g:h
is there any way to find the local ip address of the system in C and must be udp
If your client is behind a NAT:ing firewall or router, then no, there's no way for the server to directly see the client's LAN IP address. Often, such addresses are "LAN only" (non-routable) e.g. 192.168.x.y or 10.x.y.z.
If using your own custom protocol, then you can of course embed the information in a datagram and send it to the server, but beware that there's a large change the address information is completely useless to the server, for the above-mentioned reason.