Re: Macnetworkprog Digest, Vol 1, Issue 74
Re: Macnetworkprog Digest, Vol 1, Issue 74
- Subject: Re: Macnetworkprog Digest, Vol 1, Issue 74
- From: Mike Cohen <email@hidden>
- Date: Thu, 16 Dec 2004 16:16:40 -0500
The usual way is to call gethostbyname, which takes a host name and
returns am address (as part of the returned structure) that you can
pass to connect.
On Dec 16, 2004, at 3:45 PM, Ryan M Joseph wrote:
I unfortunately don't understand much about addresses besides IPs and
even then not much. The problem still remains I don't know enough
about the protocol to fill in the fields properly. For example the IP
128.0.0.0, how can I describe THAT with the sockaddr. Is there a
reference location of this information or a function that could
convert an IP into a sockaddr (like OT maybe)? My real issue I think
is not knowing the low-level interpretation of IPs. Thanks again.
sockaddr is a generic thingy, that allows a single set of function to
calls to work with different types of address (ipv4, ipv6, other
stuff).
Various protocols give different meaning to the bytes that follow the
sin_length and sin_family fields, for ipv4 stuff this is defined by
the sockaddr_in structure.
Fred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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