# 2.11BSD#431 - /usr/src/sbin/routed/defs.h

##### Variables

    addr              X
    argv0             X
    externalinterfacesX
    install           X
    kmem              X
    lookforinterfaces X
    msg               X
    packet            X
    performnlist      X
    s                 X
    sp                X
    supplier          X
    timeval           X

##### Macros

    CHECK_INTERVAL    X
    equal             X
    min               X

       1: /*
       2:  * Copyright (c) 1983 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:  *	@(#)defs.h	5.3.2 (2.11BSD GTE) 1996/3/22
       7:  */
       8:
       9: /*
      10:  * Internal data structure definitions for
      11:  * user routing process.  Based on Xerox NS
      12:  * protocol specs with mods relevant to more
      13:  * general addressing scheme.
      14:  */
      15: #include <sys/types.h>
      16: #include <sys/socket.h>
      17:
      18: #include <net/route.h>
      19: #include <netinet/in.h>
      20: #include <arpa/inet.h>
      21: #include <protocols/routed.h>
      22:
      23: #include <stdio.h>
      24: #include <netdb.h>
      25:
      26: #include "trace.h"
      27: #include "interface.h"
      28: #include "table.h"
      29: #include "af.h"
      30:
      31: /*
      32:  * When we find any interfaces marked down we rescan the
      33:  * kernel every CHECK_INTERVAL seconds to see if they've
      34:  * come up.
      35:  */
      36: #define CHECK_INTERVAL  (1*60)
      37:
      38: #define equal(a1, a2) \
      39:     (bcmp((caddr_t)(a1), (caddr_t)(a2), sizeof (struct sockaddr)) == 0)
      40: #define min(a,b)    ((a)>(b)?(b):(a))
      41:
      42: struct  sockaddr_in addr;   /* address of daemon's socket */
      43:
      44: int s;          /* source and sink of all data */
      45: int kmem;
      46: int supplier;       /* process should supply updates */
      47: int install;        /* if 1 call kernel */
      48: int lookforinterfaces;  /* if 1 probe kernel for new up interfaces */
      49: int performnlist;       /* if 1 check if /vmunix has changed */
      50: int externalinterfaces; /* # of remote and local interfaces */
      51: long    timeval;        /* local idea of time */
      52:
      53: char    packet[MAXPACKETSIZE+1];
      54: struct  rip *msg;
      55:
      56: char    **argv0;
      57: struct  servent *sp;
      58:
      59: extern  int errno;
      60:
      61: char    *malloc();
      62: int exit();
      63: int sendmsg();
      64: int supply();
      65: int timer();
      66: int cleanup();
      67: time_t  time();

#### Defined variables

addr defined in line 42; used 27 times

- in /usr/src/sbin/routed/if.c line 22-23(2), 32-37(3), 47-48(2), 55, 66-70(3), 81, 93-97(3), 107-115(4)
- in /usr/src/sbin/routed/inet.c line 28, 41-43(4)
- in /usr/src/sbin/routed/main.c line 52-54(3)

argv0 defined in line 56; used 2 times

- in /usr/src/sbin/routed/main.c line 44
- in /usr/src/sbin/routed/startup.c line 152

externalinterfaces defined in line 50; used 4 times

- in /usr/src/sbin/routed/startup.c line 125, 145, 277
- in /usr/src/sbin/routed/timer.c line 28

install defined in line 47; used 3 times

- in /usr/src/sbin/routed/tables.c line 156, 202, 218

kmem defined in line 45; used 1 times

- in /usr/src/sbin/routed/startup.c line 151

lookforinterfaces defined in line 48; used 3 times

- in /usr/src/sbin/routed/startup.c line 51, 66
- in /usr/src/sbin/routed/timer.c line 31

msg defined in line 54; used 33 times

- in /usr/src/sbin/routed/input.c line 37-45(3), 51, 76, 84, 101-102(2), 138-142(2)
- in /usr/src/sbin/routed/main.c line 128-131(4)
- in /usr/src/sbin/routed/output.c line 66, 73-74(2), 102, 114
- in /usr/src/sbin/routed/timer.c line 58-63(6)
- in /usr/src/sbin/routed/trace.c line 227-234(5), 240, 246, 258

packet defined in line 53; used 8 times

- in /usr/src/sbin/routed/af.c line 100
- in /usr/src/sbin/routed/input.c line 100
- in /usr/src/sbin/routed/main.c line 33, 159(2)
- in /usr/src/sbin/routed/output.c line 98, 115
- in /usr/src/sbin/routed/trace.c line 236

performnlist defined in line 49; never used
s defined in line 44; used 36 times

- in /usr/src/sbin/routed/af.c line 89-90(2), 100
- in /usr/src/sbin/routed/input.c line 86
- in /usr/src/sbin/routed/main.c line 54-55(2), 96, 142-147(3), 176-194(7)
- in /usr/src/sbin/routed/output.c line 51, 100, 116
- in /usr/src/sbin/routed/startup.c line 32, 39, 45-47(2), 56, 76, 83, 89-93(2), 147-151(2), 262
- in /usr/src/sbin/routed/tables.c line 157, 203-205(2), 219

sp defined in line 57; used 5 times

- in /usr/src/sbin/routed/af.c line 73, 99
- in /usr/src/sbin/routed/main.c line 47-53(3)

supplier defined in line 46; used 13 times

- in /usr/src/sbin/routed/input.c line 65
- in /usr/src/sbin/routed/main.c line 60-65(2), 126-127(2)
- in /usr/src/sbin/routed/startup.c line 132-133(2), 145-146(2)
- in /usr/src/sbin/routed/timer.c line 33, 44, 56, 89

timeval defined in line 51; used 3 times

- in /usr/src/sbin/routed/timer.c line 30-33(3)

#### Defined macros

CHECK_INTERVAL defined in line 36; used 1 times

- in /usr/src/sbin/routed/timer.c line 31

equal defined in line 38; used 5 times

- in /usr/src/sbin/routed/input.c line 171, 183
- in /usr/src/sbin/routed/tables.c line 51, 88, 175

min defined in line 40; used 3 times

- in /usr/src/sbin/routed/input.c line 75
- in /usr/src/sbin/routed/output.c line 106
- in /usr/src/sbin/routed/timer.c line 64

#### Usage of this include

defs.h used 10 times

- in /usr/src/sbin/routed/af.c line 11
- in /usr/src/sbin/routed/if.c line 14
- in /usr/src/sbin/routed/inet.c line 15
- in /usr/src/sbin/routed/input.c line 14
- in /usr/src/sbin/routed/main.c line 20
- in /usr/src/sbin/routed/output.c line 14
- in /usr/src/sbin/routed/startup.c line 14
- in /usr/src/sbin/routed/tables.c line 14
- in /usr/src/sbin/routed/timer.c line 14
- in /usr/src/sbin/routed/trace.c line 15

Last modified: 1996-03-23 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1301 |