BinFormat.FieldType.IpAddr
:inet style IP address field type for defformat.
Summary
Macros
Add an IP address field to the format structure in defformat
Macros
Add an IP address field to the format structure in defformat.
This field type decodes IP addresses represented as 32 bit integers in
binaries directly into the tuple format used by the networking modules in the
Erlang standard library. For example, it will transform the binary value
<< 192, 168, 1, 1 >>
into {192, 168, 1, 1}
and vice versa.
By default the binary value will be treated as big endian. To use a little
endian encoding add the atom :little
to the list of options.