| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
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?
struct sockaddr_in {
__uint8_t sin_len;
sa_family_t sin_family;
in_port_t sin_port;
struct in_addr sin_addr;
char sin_zero[8]; /* XXX bwg2001-004 */
};-- Gwynne, daughter of the Code "This whole world is an asylum for the incurable." _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden
| References: | |
| >how should a sockaddr struct be filled in for a normal web address? (From: Ben Dougall <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.