]> The Tcpdump Group git mirrors - tcpdump/blobdiff - arcnet.h
Fix the pointer tests in the non-ndoified TTEST2() macro as well.
[tcpdump] / arcnet.h
index 144e99b66da605392f8ba553800ac49e204aa8be..3b609566ff81bb26f755f04e2f0df9888bb8bc8f 100644 (file)
--- a/arcnet.h
+++ b/arcnet.h
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * @(#) $Id: arcnet.h,v 1.2 2002-12-11 07:13:50 guy Exp $ (LBL)
+ * @(#) $Id: arcnet.h,v 1.3 2003-01-23 09:05:37 guy Exp $ (LBL)
  *
  * from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp
  */
 
 /*
- * Structure of a 2.5MB/s Arcnet header.
+ * Structure of a 2.5MB/s Arcnet header on the BSDs,
  * as given to interface code.
  */
 struct arc_header {
@@ -77,3 +77,25 @@ struct       arc_header {
 
 #define ARCTYPE_INET6          0xc4    /* IPng */
 #define ARCTYPE_DIAGNOSE       0x80    /* as per ANSI/ATA 878.1 */
+
+/*
+ * Structure of a 2.5MB/s Arcnet header on Linux.  Linux has
+ * an extra "offset" field when given to interface code, and
+ * never presents packets that look like exception frames.
+ */
+struct arc_linux_header {
+       u_int8_t  arc_shost;
+       u_int8_t  arc_dhost;
+       u_int16_t arc_offset;
+       u_int8_t  arc_type;
+       /*
+        * only present for newstyle encoding with LL fragmentation.
+        * Don't use sizeof(anything), use ARC_LINUX_HDR{,NEW}LEN
+        * instead.
+        */
+       u_int8_t  arc_flag;
+       u_int16_t arc_seqid;
+};
+
+#define        ARC_LINUX_HDRLEN        5
+#define        ARC_LINUX_HDRNEWLEN     8