Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the bigger issue in regards to networking is ordering, not the (lack of) packing. I don't think the ordering is guaranteed and probably depends on CPU architecture (e.g. big vs little endian), not necessarily compiler.


In practice, little-endian machines have the first bit field in the least-significant bits of the data type they fit into (usually but not always an int), and big-endian machines have the first bit field in the most-significant bits.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: