tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: getnameinfo extra len checking

> What is the purpose of sa_len?

I don't know, since I didn't create it.  But to me, it's nice to make
the data self-describing.  I've recently had occasion to try to port
some of my code to Linux, which (as mentioned upthread) does not have
sa_len, and I find it is a significant inconvenience.

> The value is a function of sa_family, is it not?

Only partially.  For some address families, it also depends on the
particular address.  AF_LOCAL is an example; my memory is fuzzy, but I
*think* AF_DECnet would be another if we implemented it - IIRC their
analog of UDP/TCP port numbers is variable-length strings.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index