1: /*
   2:  * Copyright (c) 1984, 1985, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)ns_error.h	7.1 (Berkeley) 6/5/86
   7:  */
   8: 
   9: /*
  10:  * Xerox NS error messages
  11:  */
  12: 
  13: struct ns_errp {
  14:     u_short     ns_err_num;     /* Error Number */
  15:     u_short     ns_err_param;       /* Error Parameter */
  16:     struct idp  ns_err_idp;     /* Initial segment of offending
  17: 						   packet */
  18:     u_char      ns_err_lev2[12];    /* at least this much higher
  19: 						   level protocol */
  20: };
  21: struct  ns_epidp {
  22:     struct idp ns_ep_idp;
  23:     struct ns_errp ns_ep_errp;
  24: };
  25: 
  26: #define NS_ERR_UNSPEC   0   /* Unspecified Error detected at dest. */
  27: #define NS_ERR_BADSUM   1   /* Bad Checksum detected at dest */
  28: #define NS_ERR_NOSOCK   2   /* Specified socket does not exist at dest*/
  29: #define NS_ERR_FULLUP   3   /* Dest. refuses packet due to resource lim.*/
  30: #define NS_ERR_UNSPEC_T 0x200   /* Unspec. Error occured before reaching dest*/
  31: #define NS_ERR_BADSUM_T 0x201   /* Bad Checksum detected in transit */
  32: #define NS_ERR_UNREACH_HOST 0x202   /* Dest cannot be reached from here*/
  33: #define NS_ERR_TOO_OLD  0x203   /* Packet x'd 15 routers without delivery*/
  34: #define NS_ERR_TOO_BIG  0x204   /* Packet too large to be forwarded through
  35: 				   some intermediate gateway.  The error
  36: 				   parameter field contains the max packet
  37: 				   size that can be accommodated */
  38: #define NS_ERR_ATHOST   4
  39: #define NS_ERR_ENROUTE  5
  40: #define NS_ERR_MAX (NS_ERR_ATHOST + NS_ERR_ENROUTE + 1)
  41: #define ns_err_x(c) (((c)&0x200) ? ((c) - 0x200 + NS_ERR_ATHOST) : c )
  42: 
  43: /*
  44:  * Variables related to this implementation
  45:  * of the network systems error message protocol.
  46:  */
  47: struct  ns_errstat {
  48: /* statistics related to ns_err packets generated */
  49:     int ns_es_error;        /* # of calls to ns_error */
  50:     int ns_es_oldshort;     /* no error 'cuz old ip too short */
  51:     int ns_es_oldns_err;    /* no error 'cuz old was ns_err */
  52:     int ns_es_outhist[NS_ERR_MAX];
  53: /* statistics related to input messages processed */
  54:     int ns_es_badcode;      /* ns_err_code out of range */
  55:     int ns_es_tooshort;     /* packet < IDP_MINLEN */
  56:     int ns_es_checksum;     /* bad checksum */
  57:     int ns_es_badlen;       /* calculated bound mismatch */
  58:     int ns_es_reflect;      /* number of responses */
  59:     int ns_es_inhist[NS_ERR_MAX];
  60: };
  61: 
  62: #ifdef KERNEL
  63: struct  ns_errstat ns_errstat;
  64: #endif

Defined variables

ns_errstat defined in line 63; used 8 times

Defined struct's

ns_epidp defined in line 21; used 12 times
ns_errp defined in line 13; used 16 times
ns_errstat defined in line 47; used 2 times
  • in line 63(2)

Defined macros

NS_ERR_ATHOST defined in line 38; used 2 times
NS_ERR_BADSUM defined in line 27; used 1 times
NS_ERR_BADSUM_T defined in line 31; used 1 times
NS_ERR_ENROUTE defined in line 39; used 1 times
  • in line 40
NS_ERR_FULLUP defined in line 29; used 1 times
NS_ERR_MAX defined in line 40; used 2 times
NS_ERR_TOO_OLD defined in line 33; used 1 times
NS_ERR_UNSPEC defined in line 26; used 1 times
NS_ERR_UNSPEC_T defined in line 30; used 2 times
ns_err_x defined in line 41; used 3 times

Usage of this include

Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1115
Valid CSS Valid XHTML 1.0 Strict