You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. ipv4
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.
i.e. ipv6 netmask
0e 1e 00 00 00 00 00 00 ff ff ff ff ff ff 00 00
The above is /48 netmask that should also be parsed as such.
Confirmed by using `route monitor`.
sources:
https://github.com/apple/darwin-xnu/blob/main/bsd/net/route.hhttps://github.com/apple/darwin-xnu/blob/main/bsd/sys/socket.h#L603
0 commit comments