/* RCS Info
 *	$Header: nip.h,v 1.2 87/10/12 01:54:45 jon Locked $
 *	$Locker: jon $
 *
 * for Network Information Protocol
 *
 * $Log:	nip.h,v $
 * Revision 1.2  87/10/12  01:54:45  jon
 * Moves NIPPRI here from nip.c, adds nipflg.
 * 
 */

/* actual packet format */

struct nip_pkt {
  unsb	np_source[6];
  unss	np_checksum;
  ints  np_opcode;
  ints  np_version;
  unsl	np_netaddress;
  unsl	np_netmask;
  unsl	np_broadcast;
  unsl	np_lowest;
  unsl	np_highest;
  unsl	np_recommend;
  unsl	np_gateway;
};

#define mknippkt(x) ((struct nip_pkt *) (x))

/* Opcodes */
#define NIP_REQUEST	1
#define NIP_RESPONSE	2

#define NIP_VERSION_1	1

#define NIPPRI 0250

#ifdef LITTLE_ENDIAN
#define htons swab
long swabl();
#define htonl swabl
#else
#define htons(x) (x)
#define htonl(x) (x)
#endif

/* Definitions for logging */
ext bitf nipflg;
#define MSGFLG nipflg
