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

##### Variables

    nspcb             X

##### Macros

    NSP_ALL_PACKETS   X
    NSP_IN_ABORT      X
    NSP_RAWIN         X
    NSP_RAWOUT        X
    NSRCVQ            X
    NSSNDQ            X
    NS_WILDCARD       X
    nsp_fport         X
    nsp_lport         X
    sotonspcb         X

##### struct's

    nspcb             X

       1: /*
       2:  * Copyright (c) 1984, 1985, 1986, 1987 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_pcb.h	7.2 (Berkeley) 1/20/88
      13:  */
      14:
      15: /*
      16:  * Ns protocol interface control block.
      17:  */
      18: struct nspcb {
      19:     struct  nspcb *nsp_next;    /* doubly linked list */
      20:     struct  nspcb *nsp_prev;
      21:     struct  nspcb *nsp_head;
      22:     struct  socket *nsp_socket; /* back pointer to socket */
      23:     struct  ns_addr nsp_faddr;  /* destination address */
      24:     struct  ns_addr nsp_laddr;  /* socket's address */
      25:     caddr_t nsp_pcb;        /* protocol specific stuff */
      26:     struct  route nsp_route;    /* routing information */
      27:     struct  ns_addr nsp_lastdst;    /* validate cached route for dg socks*/
      28:     long    nsp_notify_param;   /* extra info passed via ns_pcbnotify*/
      29:     short   nsp_flags;
      30:     u_char  nsp_dpt;        /* default packet type for idp_output*/
      31:     u_char  nsp_rpt;        /* last received packet type by
      32: 								idp_input() */
      33: };
      34:
      35: /* possible flags */
      36:
      37: #define NSP_IN_ABORT    0x1     /* calling abort through socket */
      38: #define NSP_RAWIN   0x2     /* show headers on input */
      39: #define NSP_RAWOUT  0x4     /* show header on output */
      40: #define NSP_ALL_PACKETS 0x8     /* Turn off higher proto processing */
      41:
      42: #define NS_WILDCARD 1
      43:
      44: #define nsp_lport nsp_laddr.x_port
      45: #define nsp_fport nsp_faddr.x_port
      46:
      47: #define sotonspcb(so)       ((struct nspcb *)((so)->so_pcb))
      48:
      49: /*
      50:  * Nominal space allocated to a ns socket.
      51:  */
      52: #define NSSNDQ      2048
      53: #define NSRCVQ      2048
      54:
      55:
      56: #ifdef SUPERVISOR
      57: struct  nspcb nspcb;            /* head of list */
      58: struct  nspcb *ns_pcblookup();
      59: #endif

#### Defined variables

nspcb defined in line 57; used 28 times

- in /usr/src/sys/netns/idp_usrreq.c line 386
- in /usr/src/sys/netns/ns_input.c line 64(3)
- in /usr/src/sys/netns/ns_pcb.c line 84-86(3), 242(2), 290(2)
- in /usr/src/sys/netns/spp_usrreq.c line 1212, 1551-1553(2), 1579-1584(2)
- in /usr/src/ucb/netstat/ns.c line 80-99(10), 125-126(2)

#### Defined struct's

nspcb defined in line 18; used 110 times

- in line 19-21(6), 57-58(4)
- in /usr/src/sys/netns/idp_usrreq.c line 46(2), 84(2), 95-97(4), 118(2), 253(2), 365(2), 526-527(4)
- in /usr/src/sys/netns/ns_input.c line 49-50(4), 79(2), 236-239(4), 441(2)
- in /usr/src/sys/netns/ns_pcb.c line 34-42(6), 50(2), 99(2), 180(2), 189(2), 202(2), 215(2), 239(2), 266(2), 280-285(4)
- in /usr/src/sys/netns/spp_usrreq.c line 57(2), 111(2), 527-529(4), 585(2), 596(2), 1067(2), 1181(2), 1426(2), 1442(2), 1471(2), 1534(2), 1547(2), 1571(2), 1711(2)
- in /usr/src/ucb/netstat/ns.c line 48(2), 71-72(4), 79-84(8)

#### Defined macros

NSP_ALL_PACKETS defined in line 40; used 3 times

- in /usr/src/sys/netns/idp_usrreq.c line 271, 317
- in /usr/src/sys/netns/ns_input.c line 199

NSP_IN_ABORT defined in line 37; never used
NSP_RAWIN defined in line 38; used 4 times

- in /usr/src/sys/netns/idp_usrreq.c line 70, 275, 321, 545

NSP_RAWOUT defined in line 39; used 4 times

- in /usr/src/sys/netns/idp_usrreq.c line 162, 279, 325, 545

NSRCVQ defined in line 53; never used
NSSNDQ defined in line 52; never used
NS_WILDCARD defined in line 42; used 3 times

- in /usr/src/sys/netns/ns_input.c line 190, 273
- in /usr/src/sys/netns/spp_usrreq.c line 566

nsp_fport defined in line 45; used 5 times

- in /usr/src/sys/netns/ns_pcb.c line 303-304(2)
- in /usr/src/sys/netns/spp_usrreq.c line 188, 215, 1307

nsp_lport defined in line 44; used 10 times

- in /usr/src/sys/netns/ns_pcb.c line 56, 84-88(4), 167-170(2), 291
- in /usr/src/sys/netns/spp_usrreq.c line 1271, 1284

sotonspcb defined in line 47; used 8 times

- in /usr/src/sys/netns/idp_usrreq.c line 253, 365, 526, 543
- in /usr/src/sys/netns/spp_usrreq.c line 1067, 1181, 1218, 1426

#### Usage of this include

ns_pcb.h used 8 times

- in /usr/src/sys/netns/idp_usrreq.c line 29
- in /usr/src/sys/netns/ns_error.c line 27
- in /usr/src/sys/netns/ns_input.c line 33
- in /usr/src/sys/netns/ns_pcb.c line 28
- in /usr/src/sys/netns/spp_debug.c line 29
- in /usr/src/sys/netns/spp_usrreq.c line 30
- in /usr/src/ucb/netstat/ns.c line 33
- in /usr/src/usr.sbin/trsp/trsp.c line 33

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