> Perhaps a little too fast; I forgot that the frame table has to be
> byte-swapped on big-endian machines.
...and perhaps getting up from bed to go fix a bug that you thought of
while falling asleep isn't the best idea in the world, either. (Or
maybe "fixing a bug on big-endian machines isn't a good idea if you
don't actually have a big-endian machine handy on which to test the
fix".)
I've attached a patch to go atop my previous two patches that allows
"netmon.c" to compile on big-endian platforms; the resulting code
appeared to be able to read some NetMon (1.x, but it should work for
2.x files as well) files on a Solaris/SPARC (i.e., big-endian) machine.
Index: netmon.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/wiretap/netmon.c,v
retrieving revision 1.27
diff -c -r1.27 netmon.c
*** netmon.c 2000/03/22 09:52:21 1.27
--- netmon.c 2000/03/22 23:43:01
***************
*** 126,131 ****
--- 126,134 ----
guint32 frame_table_length;
int frame_table_size;
guint32 *frame_table;
+ #ifdef WORDS_BIGENDIAN
+ int i;
+ #endif
/* Read in the string that should be at the start of a Network
* Monitor file */