Open
Description
ETH_P_*
constants (and probably more I haven't stumbled across) should be defined as c_ushort
on linux x86-64 rather than c_int
for 2 related reasons:
- To improve ease of use with the various
sockaddr_*
structs where they most often get used. - Because when they are converted to big endian network ordering for use in those structs,
(0x00000003).to_be() != (0x0003).to_be()
, which is a really irritating gotcha.
I'm happy to do a find-and-replace to get those (and any others which people think should be changed) if you think it's a sane change.