Re: Binding to a specific IP address
Re: Binding to a specific IP address
- Subject: Re: Binding to a specific IP address
- From: Christopher Kempke <email@hidden>
- Date: Sun, 17 Dec 2006 14:05:53 -0800
On Sat, 16 Dec 2006, "Justin C. Walker" <email@hidden> wrote:
On Dec 16, 2006, at 14:12 , Christopher Kempke wrote:
[snip]
Everything works until the bind, which returns -1 and an errno of
49 (EADDRNOTAVAIL: can't assign requested address). If I replace
the address with INADDR_ANY, the code works.
Try zeroing out the sockaddr struct before using it. The kernel can
be kind of picky about that.
Justin
Well, that was a lot easier than the things *I* was trying. I didn't
realize I wasn't setting every field of the structure. It works
now, thank you!
--Chris
_______________________________________________
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