[ale] Finding your IP address

aesop aesop at negia.net
Sun Aug 17 13:58:34 EDT 1997


Try gethostbyname(3).  The man page gives the details of the structure it
returns.

On Sun, 17 Aug 1997, Zephaniah E. Hull wrote:

> I'm looking for a good way to find the machine's IP address from inside a
> C program, 
> The only thing that comes to mind is that (I think) you can get
> your hostname and then do a DNS lookup on that, But I don't have a clue
> how, 
> Any help would be apprecciated.
> TIA
> Zephaniah E. Hull
> 
> 
> 
> 

Dogbert: Has your electronic mail system made you more efficient?
Dilbert: In a way... Now I'm getting ignored at the speed of light.
						-- Scott Adams






More information about the Ale mailing list