Erlang has a special syntax for (de)constructing structured binary data. This is called "the bit syntax".
Here is a code fragment for efficiently parsing the headers out of a IP packet in Erlang:
<<?IP_VERSION:4, HLen:4, SrvcType:8, TotLen:16, ID:16, Flgs:3, FragOff:13, TTL:8, Proto:8, HdrChkSum:16, SrcIP:32, DestIP:32, RestDgram/binary>> = Packet,
Question: Does the erlang bit syntax give any assistance with handling structures that contain pointers? That is, is it possible to take some bits, treat them as an address, and access memory at that address?
Answer: Not without writing an extension to allow you to do that. Accessing an arbitrary memory location is an unsafe process.
Question: Does Erlang assume NFS network order?
Answer: Network order is the default.
Question:Is there a way to override any such default byte ordering in packets?
Answer: Yes, you can specify the byte ordering.
CeeLanguage (and CeePlusPlus, ObjectiveCee) has a rather similar feature (the BitField), which is less widely used then one might expect, for two reasons:
See related paper http://www.erlang.se/workshop/2004/esmb.pdf