149268Sbostic /*- 2*63222Sbostic * Copyright (c) 1991, 1993 3*63222Sbostic * The Regents of the University of California. All rights reserved. 449268Sbostic * 549268Sbostic * %sccs.include.redist.c% 649268Sbostic * 7*63222Sbostic * @(#)esis.h 8.1 (Berkeley) 06/10/93 849268Sbostic */ 949268Sbostic 1036380Ssklower /*********************************************************** 1136380Ssklower Copyright IBM Corporation 1987 1236380Ssklower 1336380Ssklower All Rights Reserved 1436380Ssklower 1536380Ssklower Permission to use, copy, modify, and distribute this software and its 1636380Ssklower documentation for any purpose and without fee is hereby granted, 1736380Ssklower provided that the above copyright notice appear in all copies and that 1836380Ssklower both that copyright notice and this permission notice appear in 1936380Ssklower supporting documentation, and that the name of IBM not be 2036380Ssklower used in advertising or publicity pertaining to distribution of the 2136380Ssklower software without specific, written prior permission. 2236380Ssklower 2336380Ssklower IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 2436380Ssklower ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 2536380Ssklower IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 2636380Ssklower ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 2736380Ssklower WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 2836380Ssklower ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 2936380Ssklower SOFTWARE. 3036380Ssklower 3136380Ssklower ******************************************************************/ 3236380Ssklower 3336380Ssklower /* 3436380Ssklower * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison 3536380Ssklower */ 3636380Ssklower /* 3736380Ssklower * $Header: esis.h,v 4.7 88/09/15 11:24:18 hagens Exp $ 3836380Ssklower * $Source: /usr/argo/sys/netiso/RCS/esis.h,v $ 3936380Ssklower */ 4036380Ssklower 4136380Ssklower #ifndef BYTE_ORDER 4236380Ssklower /* 4336380Ssklower * Definitions for byte order, 4436380Ssklower * according to byte significance from low address to high. 4536380Ssklower */ 4636380Ssklower #define LITTLE_ENDIAN 1234 /* least-significant byte first (vax) */ 4736380Ssklower #define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */ 4836380Ssklower #define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */ 4936380Ssklower 5036380Ssklower #ifdef vax 5136380Ssklower #define BYTE_ORDER LITTLE_ENDIAN 5236380Ssklower #else 5336380Ssklower #define BYTE_ORDER BIG_ENDIAN /* mc68000, tahoe, most others */ 5436380Ssklower #endif 5560359Sbostic #endif /* BYTE_ORDER */ 5636380Ssklower 5736380Ssklower #define SNPAC_AGE 60 /* seconds */ 5836380Ssklower #define ESIS_CONFIG 60 /* seconds */ 5936380Ssklower #define ESIS_HT (ESIS_CONFIG * 2) 6036380Ssklower 6136380Ssklower /* 6236380Ssklower * Fixed part of an ESIS header 6336380Ssklower */ 6436380Ssklower struct esis_fixed { 6536380Ssklower u_char esis_proto_id; /* network layer protocol identifier */ 6636380Ssklower u_char esis_hdr_len; /* length indicator (octets) */ 6736380Ssklower u_char esis_vers; /* version/protocol identifier extension */ 6836380Ssklower u_char esis_res1; /* reserved */ 6937469Ssklower u_char esis_type; /* type code */ 7037469Ssklower /* technically, type should be &='d 0x1f */ 7136380Ssklower #define ESIS_ESH 0x02 /* End System Hello */ 7236380Ssklower #define ESIS_ISH 0x04 /* Intermediate System Hello */ 7336380Ssklower #define ESIS_RD 0x06 /* Redirect */ 7436380Ssklower u_char esis_ht_msb; /* holding time (seconds) high byte */ 7536380Ssklower u_char esis_ht_lsb; /* holding time (seconds) low byte */ 7636380Ssklower u_char esis_cksum_msb; /* checksum high byte */ 7736380Ssklower u_char esis_cksum_lsb; /* checksum low byte */ 7836380Ssklower }; 7937469Ssklower /* 8037469Ssklower * Values for ESIS datagram options 8137469Ssklower */ 8237469Ssklower #define ESISOVAL_NETMASK 0xe1 /* address mask option, RD PDU only */ 8337469Ssklower #define ESISOVAL_SNPAMASK 0xe2 /* snpa mask option, RD PDU only */ 8437469Ssklower #define ESISOVAL_ESCT 0xc6 /* end system conf. timer, ISH PDU only */ 8536380Ssklower 8637469Ssklower 8736380Ssklower #define ESIS_CKSUM_OFF 0x07 8836380Ssklower #define ESIS_CKSUM_REQUIRED(pdu)\ 8936380Ssklower ((pdu->esis_cksum_msb != 0) || (pdu->esis_cksum_lsb != 0)) 9036380Ssklower 9136380Ssklower #define ESIS_VERSION 1 9236380Ssklower 9336380Ssklower struct esis_stat { 9436380Ssklower u_short es_nomem; /* insufficient memory to send hello */ 9536380Ssklower u_short es_badcsum; /* incorrect checksum */ 9636380Ssklower u_short es_badvers; /* incorrect version number */ 9736380Ssklower u_short es_badtype; /* unknown pdu type field */ 9836380Ssklower u_short es_toosmall; /* packet too small */ 9936380Ssklower u_short es_eshsent; /* ESH sent */ 10036380Ssklower u_short es_eshrcvd; /* ESH rcvd */ 10136380Ssklower u_short es_ishsent; /* ISH sent */ 10236380Ssklower u_short es_ishrcvd; /* ISH rcvd */ 10336380Ssklower u_short es_rdsent; /* RD sent */ 10436380Ssklower u_short es_rdrcvd; /* RD rcvd */ 10536380Ssklower }; 10636380Ssklower 10736380Ssklower #ifdef KERNEL 10836380Ssklower struct esis_stat esis_stat; 10960359Sbostic #endif /* KERNEL */ 110