According to https://stackoverflow.com/questions/28277079/need-i-push-sin-zero-sockaddr-in, it's my election reserve the space of sin_zero in the stack (sub esp, 8) or not. If I push, ok, I've pushed 16 bytes (sizeof(sockaddr_in)), but if I don't reserve the 8 bytes of sin_zero how kernels know?
struct sockaddr_in {
short sin_family; // e.g. AF_INET, AF_INET6
unsigned short sin_port; // e.g. htons(3490)
struct in_addr sin_addr; // see struct in_addr, below
char sin_zero[8]; // zero this if you want to
};
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…