How to get my own IP address without DNS
From: Kazu (nospam-kazuhhh_at_infoseek.jp)
Date: 05/31/05
- Next message: Alex Bell: "Kernel IP Routing Table"
- Previous message: beyens.pieter_at_gmail.com: "1pc, 2 network devices in same network -> ping problem"
- Next in thread: Jacques Labuschagne: "Re: How to get my own IP address without DNS"
- Reply: Jacques Labuschagne: "Re: How to get my own IP address without DNS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 31 May 2005 19:25:06 +0900
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
- Next message: Alex Bell: "Kernel IP Routing Table"
- Previous message: beyens.pieter_at_gmail.com: "1pc, 2 network devices in same network -> ping problem"
- Next in thread: Jacques Labuschagne: "Re: How to get my own IP address without DNS"
- Reply: Jacques Labuschagne: "Re: How to get my own IP address without DNS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]