I'd suggest the socalles "network byte order". This is well specified, widely used and there is a set of functions in the standard lib covering this issue.o11c wrote: The only question I have remaining is whether I should do it "right" (big endian) or more similar to the way it's currently done (little endian). On the net level, it's no harder for me to do it right, but there may be difficulties during the transition period.
http://beej.us/guide/bgnet/output/html/ ... nsman.html