Before I continue working on my hacked sample script I'd be interested
to know whether such a tool with similar functionality already exists
[in the free Linux world]; I would think this is a common task so that
some usable tool certainly should exists but my own cursory search did
not lead anywhere. So any hints are welcome.
The 'od' tool allows displaying binary data in various formats, but
it works on a whole data stream (not on individual fields).
Are there any tools that support a more flexible inspection of binary
data?
I was thinking of some data specification and a tool to work with that specification and binary data files. My current experimental hack has
a data specification of a form as shown in this example
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
The 'od' tool allows displaying binary data in various formats, but
it works on a whole data stream (not on individual fields).
Are there any tools that support a more flexible inspection of binary
data?
I was thinking of some data specification and a tool to work with that
specification and binary data files. My current experimental hack has
a data specification of a form as shown in this example
If I'm following you, then this sounds like a description of
something like GNU Poke:
http://www.jemarch.net/poke
Not something I've had a use for myself since finding out about it
recently, but it seems like a comprehensive solution to the
problem.
BTW, in the poke docs I saw examples WRT endian'ness, like the spec
little int a;
big int b;
int c;
In the past I've assumed that endian'ness is a machine characteristic
and would not change within a protocol element. The example taken from
the poke docs suggests that there may be different elements. Of course
we can think about different payload data in a single protocol element,
but is that usual?
BTW, in the poke docs I saw examples WRT endian'ness, like the spec
little int a;
big int b;
On 2023-09-02, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
BTW, in the poke docs I saw examples WRT endian'ness, like the spec
little int a;
big int b;
"big endian int" is nonsensical, which detracts from the example.
Endian specifications only make sense on exact sized types like int16,
uint32 or int64.
[...]
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 44:23:12 |
Calls: | 6,910 |
Files: | 12,376 |
Messages: | 5,429,355 |