/* Copyright 1984 by the Massachusetts Institute of Technology */

/* Structure definition for EtherNet (10 MBit) packets.
 */

/*
 *------------------------------------------------------------------
 *
 * $Source: /mit/cgw/gw/nets/RCS/ether.h,v $
 * $Revision: 1.2 $
 * $Date: 87/10/12 01:58:03 $
 * $State: Exp $
 * $Author: jon $
 * $Locker: jon $
 *
 * $Log:	ether.h,v $
 * Revision 1.2  87/10/12  01:58:03  jon
 * Adds NIP packet type.
 * 
 * 
 *------------------------------------------------------------------
 */

struct	e10pkts {	unsb	e10_dst[6];
			unsb	e10_src[6];
			unss	e10_type;
/*			unss	e10_data[];	*/
		};

#define	e10pkt	struct e10pkts
#define	mke10pkt(x)	((e10pkt *) (x))

#define mkethadd(x)	(x)[0],(x)[1],(x)[2],(x)[3],(x)[4],mkunsb((x)[5])

#define	EMAX	1500		/* Max pkt hrdwr will take */

/* type field definitions */
#ifdef	BIG_ENDIAN
# define	ET_IN	0x0800	/* internet */
# define	ET_CH	0x0804	/* chaos */
# define	ET_AR	0x0806	/* address resolution protocol */
# define	ET_MD	0x7034	/* LAN-MD protocol */
# define	ET_NIP  0x0801	/* network information protocol */
#endif
#ifdef	LITTLE_ENDIAN
# define	ET_IN	0x0008	/* internet */
# define	ET_CH	0x0408	/* chaos */
# define	ET_AR	0x0608	/* address resolution protocol */
# define	ET_MD	0x3470	/* LAN-MD protocol */
# define	ET_NIP  0x0108  /* network information protocol */
#endif

/* commands to EtherNet board */
#define	CMDXMT	0			/* Load Xmit data and send */
#define	CMDRST	02			/* Reset the device */
#define	CMDSTA	04			/* Report statistics */
#define	CMDLDG	06			/* Load group addresses */
#define	CMDDLG	10			/* Delete group addresses */
#define	CMDRCV	12			/* Supply receive buffer */
#define	CMDSTAT	14			/* Report statistics */
