K
Kazu
Hi.
I am trying to get my own IP address. I know that there is a way to use
gethostname and gethostbyname, but this has a problem.
1. I cannot use this if no DNS is specified.
2. If several IP addresses are given for my domain name and
the ordering is round robin, I cannot tell which one is my real IP address.
Is there any way to get my own IP address in C or C++ without using DNS?
(such as ifconfig)
Kazuh
I am trying to get my own IP address. I know that there is a way to use
gethostname and gethostbyname, but this has a problem.
1. I cannot use this if no DNS is specified.
2. If several IP addresses are given for my domain name and
the ordering is round robin, I cannot tell which one is my real IP address.
Is there any way to get my own IP address in C or C++ without using DNS?
(such as ifconfig)
Kazuh