| ▲ | j16sdiz 4 hours ago | ||||||||||||||||
If you comes to low level network protocol (e.g. writing a TCP stack), the "network byte order" is always big-endian. | |||||||||||||||||
| ▲ | edflsafoiewq 2 hours ago | parent | next [-] | ||||||||||||||||
That's a serialization format. | |||||||||||||||||
| ▲ | 7jjjjjjj 2 hours ago | parent | prev | next [-] | ||||||||||||||||
It goes without saying that all binary network protocols should document their byte order, and that if you're implementing a protocol documented as big endian you should use ntohl and friends to ensure correctness. However if designing a new network protocol, choosing big endian is insanity. Use little endian, skip the macros, and just add
Or the like to a header somewhere. | |||||||||||||||||
| |||||||||||||||||
| ▲ | whizzter 2 hours ago | parent | prev | next [-] | ||||||||||||||||
And honestly at this point it's mostly a historical artifact, if we write that kind of stuff then sure we need to care but to produce modern stuff is a honestly massive waste of time at this point. FWIW I doing hobby-stuff for Amiga's (68k big-endian) but that's just that, hobby stuff. | |||||||||||||||||
| ▲ | skrtskrt 4 hours ago | parent | prev [-] | ||||||||||||||||
Prometheus index format is also a big-endian binary file - haven’t found any reference to why it was chosen. | |||||||||||||||||