• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
INADDR_ANY not wokring
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

INADDR_ANY not wokring


  • Subject: INADDR_ANY not wokring
  • From: Kenneth Perry Hough <email@hidden>
  • Date: Tue, 20 May 2008 20:22:58 -0400

Hi,

I am definitely missing something obvious but I just can't figure it out.  I'm sorry if it's a simple answer, and I'm pretty sure it is, but when I use INADDR_ANY to get my local address I get 0.0.0.0 instead of what my ip address is on en0 or en1, depending on the interface I am using.  I'm used to Linux/Unix programming and I'm pretty sure there isn't much of a difference for MacOS X is UNIX based, but I may be missing something.  The following is the snippet of my code:

host.sin_family = AF_INET;
host.sin_port = port;
host.sin_addr.s_addr = INADDR_ANY;
memset(&host.sin_zero , '\0', sizeof(host.sin_zero));

Thanks in advance,
Kenneth
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: INADDR_ANY not wokring
      • From: Jens Alfke <email@hidden>
    • Re: INADDR_ANY not wokring
      • From: Gary Carlson <email@hidden>
  • Prev by Date: Re: More detailed error codes from CFSocket?
  • Next by Date: Re: INADDR_ANY not wokring
  • Previous by thread: Re: More detailed error codes from CFSocket?
  • Next by thread: Re: INADDR_ANY not wokring
  • Index(es):
    • Date
    • Thread