Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sizeofSockaddrInet is 16, but first byte of sockaddr specifies the size of the address. 16 works for most cases, except with Netmasks addresses, on Darwin where only the significant bits are in the msg. i.e. 06 02 00 00 ff ff The above byte sequence is for a sockaddr that is 6 bytes long representing an ipv4 for address that is 255.255.0.0. Confirmed by using `route monitor`. sources: https://github.com/apple/darwin-xnu/blob/main/bsd/net/route.h https://github.com/apple/darwin-xnu/blob/main/bsd/sys/socket.h#L603
- Loading branch information