/*!**************************************************************************
*!                                                            
*! FILE NAME  : globs.h
*!
*! DESCRIPTION: Global definitions for network products.
*!
*! FUNCTIONS  : 
*! (EXPORTED)
*!
*!---------------------------------------------------------------------------
*! HISTORY
*!
*! DATE         NAME              CHANGES
*! ----         ----              -------
*! Aug 15 1990  Patrik Lindgren   Creation.
*! Feb 02 1995  Willy Sagefalk    Added node_addr.
*! Feb 15 1995  Jens Johansson    Added NODE_COMP, NODE_COPY and addresses.
*! Mar 26 1995  Jens Johansson    Removed global node address variables.
*! Apr 12 1995  Hans-Peter Nilsson Added NODE_ADDR_LEN, made it
*!                                 multiple includable by adding the
*!                                 _Globs_h check.
*! Mar 14 1996  Fredrik Norrman   Added include of compiler.h
*!
*!---------------------------------------------------------------------------
*!
*! (C) Copyright 1995, Axis Communications AB, LUND, SWEDEN
*!
*!**************************************************************************/
/* @(#) globs.h 1.9 03/14/96 */

/* Don't do this more than once. */
#ifndef _Globs_h
#define _Globs_h

#include "compiler.h"

/********************** INCLUDE FILES SECTION ******************************/

/********************** CONSTANT AND MACRO SECTION *************************/
#define ETHER_ADDR_LEN   6
#define IP_ADDR_LEN      4                            /* Shall be removed. */

#define ETHER_COPY(a, b) { *((udword *)(a)) = *((udword *)(b)); \
   ((uword *)(a))[2] = ((uword *)(b))[2]; }

#define ETHER_COMP(a, b) ( ((uword *)(a))[2]==((uword *)(b))[2] && \
   *((udword *)(a))==*((udword *)(b)) )

#define NODE_COPY ETHER_COPY      /* New macro names. Forbidden to use old */
#define NODE_COMP ETHER_COMP                                  /* any more. */

/********************** TYPE DEFINITION SECTION ****************************/
typedef byte IP_addr[IP_ADDR_LEN];         /* Types for network addresses. */
typedef byte ether_addr[ETHER_ADDR_LEN];

#define node_addr ether_addr
#define NODE_ADDR_LEN ETHER_ADDR_LEN

/********************** VARIABLE DECLARATION SECTION ***********************/

/********************** EXPORTED FUNCTION DECLARATION SECTION **************/

/* Dont add (or delete) anything after this line! */
#endif /* _Globs_h */
/********************** END OF FILE globs.h ********************************/

