Re: how should a sockaddr struct be filled in for a normal web address?
Re: how should a sockaddr struct be filled in for a normal web address?
- Subject: Re: how should a sockaddr struct be filled in for a normal web address?
- From: Ben Dougall <email@hidden>
- Date: Sun, 15 Oct 2006 10:30:20 +0100
On Sunday, October 15, 2006, at 01:19 am, Shawn Erickson wrote:
On Oct 14, 2006, at 5:16 PM, Shawn Erickson wrote:
On Oct 14, 2006, at 4:59 PM, Ben Dougall wrote:
I want to call this function:
Boolean SCNetworkCheckReachabilityByAddress (
const struct sockaddr *address,
int addrlen,
SCNetworkConnectionFlags *flags );
A struct sockaddr is:
struct sockaddr {
u_char sa_len; /* total length */
u_char sa_family; /* address family */
char sa_data[14]; /* actually longer; address value */
};
I don't know how the struct should be filled in in order to call the
above function. Can anyone point me to some example code that fills
that struct in for a normal web address e.g. amazon.com?
Why not use SCNetworkReachabilityCreateWithName?
Ah misread which function you are looking at using...
...use SCNetworkCheckReachabilityByName.
Oh yes of course that's what I should use. Silly me.
Thanks, Ben.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden