[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to get local IP-Address
hi,
How to get the local ip-address of the PC from within a
program.
The calls gethostname() + gethostbyname() are dependent on
the /etc/hosts file and this file is often not up-to-date.
What is the alternate call to find the local ip-address??
Also are there calls to find UDP and TCP FREE PORTS to be
used for UDP/TCP socket connections[i.e., as the client-port
to connect to a remote socket].
Rgds,
Sriram N.S.
__________________________________
Sign up for your free netster.com
email account today!
http://mail.netster.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/