/*
 * $RCSfile: mac_common.h,v $
 *
 * x-kernel v3.3
 *
 * Copyright (c) 1993 Massachusetts Board of Regents
 *
 * $Log: mac_common.h,v $
 * Revision 1.2  1996/01/30 20:48:51  slm
 * Updated version.
 *
 * Revision 1.1  1995/07/29  02:37:36  slm
 * Initial revision
 *
 * Revision 1.3.1.1.1.1  1994/11/12  19:07:23  hkaram
 * New branch
 *
 * Revision 1.3.1.1  1994/03/16  21:00:45  umass
 * GENERIChost becomes MAC48bithost
 *
 * Revision 1.3  1994/02/05  00:34:30  menze
 *   [ 1994/02/03          menze ]
 *   HalfWord replaced by xk_u_int16
 *
 * Revision 1.2  1993/11/13  00:45:23  menze
 * Original version from UMass
 */

# ifndef mac_common_h
# define mac_common_h

#include "mac.h"

/*
 * Special defintions for Snoop/Drain protocol code.
 */

/* #define  RAWRAW_RECV_PORT        5 */
#define  RAWRAW_SEND_PORT        0   /* must be 0! */
#define  RAWSNOOP_RECV_PORT     (SNOOP_MINPORT)
#define  RAWSNOOP_SEND_PORT     (SNOOP_MINPORT+1)
#define  RAWDRAIN_RECV_PORT      6
/* #define  RAWDRAIN_SEND_PORT      7 */

#define  MAC_ADDRESS_SIZE        6

typedef  enum
{
         NULL_INTERFACE,
         INDIGO_ETHERNET_INTERFACE,
         POWER_SERIES_ETHERNET_INTERFACE,
         CHALLENGE_ETHERNET_INTERFACE,
         INDIGO_FDDI_INTERFACE,
         POWER_SERIES_FDDI_INTERFACE,
         CHALLENGE_FDDI_INTERFACE
} interfaceType;
#define  BAD_INTERFACE_INDEX    (-1)

#define  GLOBAL_SAP             (0xFF)
#define  MIN_FREE_ETHERNET_TYPE (0x2000)
#define  MAX_FREE_ETHERNET_TYPE (0x3FFF)

IMPORT int beRoot _ANSI_ARGS_(( noargs ));
IMPORT PROCEDURE beMeAgain _ANSI_ARGS_(( int ));
IMPORT int openrecv_rs _ANSI_ARGS_(( char *, /* device interface name */
                                     int,    /* RAWPROTO_SNOOP/DRAIN */
                                     int,
                                     ETHtype *,
                                     xk_u_int16,
                                     MAC48bithost * ));
IMPORT int opensend_rs _ANSI_ARGS_(( char *, /* device interface name */
                                     int,    /* RAWPROTO_SNOOP/DRAIN */
                                     xk_u_int16 ));
IMPORT PROCEDURE closerecv_rs _ANSI_ARGS_(( int, int, char * ));
IMPORT PROCEDURE closesend_rs _ANSI_ARGS_(( int, int ));
IMPORT PROCEDURE size_ifbufs _ANSI_ARGS_(( int, int, int ));

# endif /* mac_common_h */

