I am new to UNIX socket programming and I am wondering what is "sin" in sin_addr, sin_family etc, short for? And what does "in" mean or is short for in struct socketaddr_in?
Thank you!
I am new to UNIX socket programming and I am wondering what is "sin" in sin_addr, sin_family etc, short for? And what does "in" mean or is short for in struct socketaddr_in?
Thank you!
I think it is shorthand for the name of the struct (sockaddr_in
) that the member-variables are a part of.
Similarly, the variables inside sockaddr_in6
all start with the prefix sin6_
, and the variables inside sockaddr
start with the prefix sa_
, and so on.
in
is presumably shorthand for "internet".