1

Topic: sockaddr_in For OS X

Paid attention that in implementation for mac the structure sockaddr_in looks as follows: 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];}; I.e. in difference from vindovo/linuksovoj implementations, here still there is a field sin_len. What , for what it and on how many its critical filling?

2

Re: sockaddr_in For OS X

Hello, dosik, you wrote: D> I.e. in difference from vindovo/linuksovoj implementations, here still there is a field sin_len. What , for what it and on how many its critical filling? It in all BSD. If 0 is accepted by default according to value sin_family. It is put not in 0 for structures of the variable size (such, as sockaddr_un). Before any usage any of structures sockaddr* should through bzero/memset be flooded in zero bytes, in certain cases not only sin_len, but also sin_zero gives interesting consequences.

3

Re: sockaddr_in For OS X

Hello, netch80, you wrote: N> Before any usage any of structures sockaddr* should through bzero/memset be flooded in zero bytes, in certain cases not only sin_len, but also sin_zero gives interesting consequences. And here about  heard, but did not give value. That reminded thanks.

4

Re: sockaddr_in For OS X

Hello, netch80, you wrote: N> Hello, dosik, you wrote: D>> I.e. in difference from vindovo/linuksovoj implementations, here still there is a field sin_len. What , for what it and on how many its critical filling? N> it in all BSD. N> If 0 is accepted by default according to value sin_family. N> it is put not in 0 for structures of the variable size (such, as sockaddr_un). N> Before any usage any of structures sockaddr* should through bzero/memset be flooded in zero bytes, in certain cases not only sin_len, but also sin_zero gives interesting consequences. Old Windows versions flooded sin_zero in zero independently that sometimes led to interesting consequences, if storage read-only http://windowsasusual.blogspot.ru/2013/ … 10014.html