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: Sebastian Hagedorn <email@hidden>
- Date: Sun, 15 Oct 2006 02:13:44 +0200
--On 15. Oktober 2006 00:59:33 +0100 Ben Dougall <email@hidden> wrote:
I want to call this function:
No, you don't :-)
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?
Check out
<http://developer.apple.com/documentation/Networking/Reference/SysConfig/SCNetwork/CompositePage.html>
You actually want to call SCNetworkCheckReachabilityByName.
--
.:.Sebastian Hagedorn - RZKR-R1 (Gebäude 52), Zimmer 18.:.
Zentrum für angewandte Informatik - Universitätsweiter Service RRZK
.:.Universität zu Köln / Cologne University - Tel. +49-221-478-5587.:.
.:.:.:.Skype: shagedorn.:.:.:.
Attachment:
pgpXgWJ5Ala6c.pgp
Description: PGP signature
_______________________________________________
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