# 2.11BSD#431 - /usr/src/sys/netns/ns_error.h

##### Variables

    ns_errstat        X

##### Macros

    NS_ERR_BADSUM     X
    NS_ERR_BADSUM_T   X
    NS_ERR_FULLUP     X
    NS_ERR_MAX        X
    NS_ERR_NOSOCK     X
    NS_ERR_TOO_BIG    X
    NS_ERR_TOO_OLD    X
    NS_ERR_UNREACH_HOSTX
    NS_ERR_UNSPEC     X
    NS_ERR_UNSPEC_T   X

##### struct's

    ns_epidp          X
    ns_errp           X
    ns_errstat        X

       1: /*
       2:  * Copyright (c) 1984, 1988  Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms are permitted
       6:  * provided that this notice is preserved and that due credit is given
       7:  * to the University of California at Berkeley. The name of the University
       8:  * may not be used to endorse or promote products derived from this
       9:  * software without specific prior written permission. This software
      10:  * is provided ``as is'' without express or implied warranty.
      11:  *
      12:  *      @(#)ns_error.h	7.3 (Berkeley) 1/28/88
      13:  */
      14:
      15: /*
      16:  * Xerox NS error messages
      17:  */
      18:
      19: struct ns_errp {
      20:     u_short     ns_err_num;     /* Error Number */
      21:     u_short     ns_err_param;       /* Error Parameter */
      22:     struct idp  ns_err_idp;     /* Initial segment of offending
      23: 						   packet */
      24:     u_char      ns_err_lev2[12];    /* at least this much higher
      25: 						   level protocol */
      26: };
      27: struct  ns_epidp {
      28:     struct idp ns_ep_idp;
      29:     struct ns_errp ns_ep_errp;
      30: };
      31:
      32: #define NS_ERR_UNSPEC   0   /* Unspecified Error detected at dest. */
      33: #define NS_ERR_BADSUM   1   /* Bad Checksum detected at dest */
      34: #define NS_ERR_NOSOCK   2   /* Specified socket does not exist at dest*/
      35: #define NS_ERR_FULLUP   3   /* Dest. refuses packet due to resource lim.*/
      36: #define NS_ERR_UNSPEC_T 0x200   /* Unspec. Error occured before reaching dest*/
      37: #define NS_ERR_BADSUM_T 0x201   /* Bad Checksum detected in transit */
      38: #define NS_ERR_UNREACH_HOST 0x202   /* Dest cannot be reached from here*/
      39: #define NS_ERR_TOO_OLD  0x203   /* Packet x'd 15 routers without delivery*/
      40: #define NS_ERR_TOO_BIG  0x204   /* Packet too large to be forwarded through
      41: 				   some intermediate gateway.  The error
      42: 				   parameter field contains the max packet
      43: 				   size that can be accommodated */
      44: #define NS_ERR_MAX 20
      45:
      46: /*
      47:  * Variables related to this implementation
      48:  * of the network systems error message protocol.
      49:  */
      50: struct  ns_errstat {
      51: /* statistics related to ns_err packets generated */
      52:     long    ns_es_error;        /* # of calls to ns_error */
      53:     long    ns_es_oldshort;     /* no error 'cuz old ip too short */
      54:     long    ns_es_oldns_err;    /* no error 'cuz old was ns_err */
      55:     long    ns_es_outhist[NS_ERR_MAX];
      56: /* statistics related to input messages processed */
      57:     long    ns_es_badcode;      /* ns_err_code out of range */
      58:     long    ns_es_tooshort;     /* packet < IDP_MINLEN */
      59:     long    ns_es_checksum;     /* bad checksum */
      60:     long    ns_es_badlen;       /* calculated bound mismatch */
      61:     long    ns_es_reflect;      /* number of responses */
      62:     long    ns_es_inhist[NS_ERR_MAX];
      63:     u_short ns_es_codes[NS_ERR_MAX];/* which error code for outhist
      64: 					   since we might not know all */
      65: };
      66:
      67: #ifdef SUPERVISOR
      68: struct  ns_errstat ns_errstat;
      69: #endif

#### Defined variables

ns_errstat defined in line 68; used 21 times

- in /usr/src/sys/netns/ns_error.c line 45, 98, 105-109(2), 124, 185, 191, 203, 255
- in /usr/src/ucb/netstat/ns.c line 258, 266-293(11)

#### Defined struct's

ns_epidp defined in line 27; used 12 times

- in /usr/src/sys/netns/ns_error.c line 72(2), 121(2), 167(4), 182(2), 188(2)

ns_errp defined in line 19; used 16 times

- in line 29(2)
- in /usr/src/sys/netns/ns_error.c line 166(2)
- in /usr/src/sys/netns/ns_input.c line 237(2), 260(2)
- in /usr/src/sys/netns/spp_usrreq.c line 528(2), 552(2), 601(2), 619(2)

ns_errstat defined in line 50; used 4 times

- in line 68(2)
- in /usr/src/ucb/netstat/ns.c line 258(2)

#### Defined macros

NS_ERR_BADSUM defined in line 33; used 1 times

- in /usr/src/sys/netns/ns_input.c line 150

NS_ERR_BADSUM_T defined in line 37; used 1 times

- in /usr/src/sys/netns/ns_input.c line 152

NS_ERR_FULLUP defined in line 35; used 2 times

- in /usr/src/sys/netns/spp_usrreq.c line 428, 439

NS_ERR_MAX defined in line 44; used 6 times

- in line 55, 62-63(2)
- in /usr/src/sys/netns/ns_error.c line 53
- in /usr/src/ucb/netstat/ns.c line 277, 287

NS_ERR_NOSOCK defined in line 34; used 4 times

- in /usr/src/sys/netns/ns_error.c line 83, 286
- in /usr/src/sys/netns/ns_input.c line 212
- in /usr/src/sys/netns/spp_usrreq.c line 250

NS_ERR_TOO_BIG defined in line 40; used 3 times

- in /usr/src/sys/netns/ns_error.c line 122, 200
- in /usr/src/sys/netns/ns_input.c line 387

NS_ERR_TOO_OLD defined in line 39; used 1 times

- in /usr/src/sys/netns/ns_input.c line 314

NS_ERR_UNREACH_HOST defined in line 38; used 6 times

- in /usr/src/sys/netns/ns_input.c line 246, 309, 324, 353, 383
- in /usr/src/sys/netns/spp_usrreq.c line 535

NS_ERR_UNSPEC defined in line 32; used 1 times

- in /usr/src/sys/netns/ns_error.c line 287

NS_ERR_UNSPEC_T defined in line 36; used 2 times

- in /usr/src/sys/netns/ns_input.c line 375, 392

#### Usage of this include

ns_error.h used 5 times

- in /usr/src/sys/netns/idp_usrreq.c line 33
- in /usr/src/sys/netns/ns_error.c line 29
- in /usr/src/sys/netns/ns_input.c line 36
- in /usr/src/sys/netns/spp_usrreq.c line 33
- in /usr/src/ucb/netstat/ns.c line 36

Last modified: 1988-04-28 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 562 |