This comes from Berkeley, back when LSD was still legal. So very obvious in their naming choices :/
All kidding aside, this dates back to very early K&R C where structure members didn't have their own namespace. Which required you to come up with distinct names for the structure members that wouldn't collide with identifiers in the global namespace. Painful. Prefixing the names with an abbreviation of the structure name was the common approach.
Thus "sockaddr_in" becomes "sin".
Note how enums still have this problem today, not untypically solved the same way.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…