|
Description
|
The IP netinfo provider, in functions like ip_getlifaddr(), returns addresses in arrays of sockaddrs'. It sets the sin_addr or sin6_addr portions of the sockaddrs', but leaves the family field uninitialized.
It would be more convenient for consumers if it set the sa_family field to match the address being returned, and the sockaddrs could then be transparently used without modification to pass to other functions.
At present the value of _family is implied by the situation the call is made in (it must be made for only one specific address family) which requires, as the description says, it to be set before the structure can be used.
[ deleted unrelated information ]
For the structure returned by this function call to have full meaning by itself,
it is necessary to set the _family field.
|