Ethereal-dev: [Ethereal-dev] Patch for packet-eth.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Graeme Hewson <ghewson@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 10 May 2003 11:29:15 +0100
The Ethernet source and destination addresses are the wrong way round in eth_hdr. This doesn't currently matter because packet-eth.c copies the addresses *into* the buffer described by the stucture from the tvbuff using hard-coded offsets. The member names are wrong, but the compiler doesn't care. packet-eth.c and tap-iousers.c should both be compiled with the updated structure.

It matters to me, though, because I'm using the structure to describe data read from a capture file. If anyone's interested, I'm working on splitcap, discussed a few times in the past, which does the opposite job to mergecap.


Graeme Hewson
--- packet-eth.h.orig	Wed Jan 22 01:18:03 2003
+++ packet-eth.h	Sat May 10 10:45:47 2003
@@ -25,8 +25,8 @@
 #define __PACKET_ETH_H__
 
 typedef struct _eth_hdr {
-	gchar src[6];
 	gchar dst[6];
+	gchar src[6];
 	guint16 type;
 } eth_hdr;