Networking Forums

Networking Forums > Computer Networking > Linux Networking > INADDR_ANY

Reply
 
 
Wenfei
Guest
Posts: n/a

 
      02-15-2006, 04:04 PM
addr_in.sin_addr.s_addr = INADDR_ANY;

fprintf("server address is %s\n", inet_ntoa(addr_in.sin_addr));

When I try to see the address as above, it always show me 0.0.0.0. But
I know the real address which my server uses is not 0.0.0.0. How I can
know the real address of INADDR_ANY which is assigned automatically by
the machine?

Wenfei

 
Reply With Quote
 
 
 
 
Phil Frisbie, Jr.
Guest
Posts: n/a

 
      02-15-2006, 04:36 PM
Wenfei wrote:

> addr_in.sin_addr.s_addr = INADDR_ANY;
>
> fprintf("server address is %s\n", inet_ntoa(addr_in.sin_addr));
>
> When I try to see the address as above, it always show me 0.0.0.0. But
> I know the real address which my server uses is not 0.0.0.0. How I can
> know the real address of INADDR_ANY which is assigned automatically by
> the machine?


I already answered this EXACT question on alt.winsock.programming. Please learn
to properly cross post.

--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Source IP / INADDR_ANY André Hänsel Linux Networking 4 03-07-2007 04:21 AM
Pros and Cons of using INADDR_ANY vs the ip addr of the machine mshetty@mail.com Linux Networking 1 12-08-2005 03:20 AM



1 2 3 4 5 6 7 8 9 10 11