The casting in the last code snippet screams confusion to me. I get that inet_ntoa() takes a struct of the type in_addr, but why the * both in front of the cast and inside the parentheses (*(struct in_addr*))?
I read the sockets guide earlier today, but I'm still lost when it comes to the structs. I don't even get if the struct is the data type, or the type of the struct, for example in_addr, is the data type. Can someone clarify this?
Thank you for your help, btw.