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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.