# 2.11BSD#431 - /usr/include/protocols/routed.h

##### Variables

    ripcmds           X

##### Macros

    EXPIRE_TIME       X
    GARBAGE_TIME      X
    HOPCNT_INFINITY   X
    MAXPACKETSIZE     X
    RIPCMD_MAX        X
    RIPCMD_REQUEST    X
    RIPCMD_RESPONSE   X
    RIPCMD_TRACEOFF   X
    RIPCMD_TRACEON    X
    RIPVERSION        X
    SUPPLY_INTERVAL   X
    TIMER_RATE        X
    rip_nets          X
    rip_tracefile     X

##### struct's

    netinfo           X
    rip               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:  *	@(#)protocol.h	5.1 (Berkeley) 6/4/85
       7:  */
       8:
       9: /*
      10:  * Routing Information Protocol
      11:  *
      12:  * Derived from Xerox NS Routing Information Protocol
      13:  * by changing 32-bit net numbers to sockaddr's and
      14:  * padding stuff to 32-bit boundaries.
      15:  */
      16: #define RIPVERSION  1
      17:
      18: struct netinfo {
      19:     struct  sockaddr rip_dst;   /* destination net/host */
      20:     u_long  rip_metric;     /* cost of route */
      21: };
      22:
      23: struct rip {
      24:     u_char  rip_cmd;        /* request/response */
      25:     u_char  rip_vers;       /* protocol version # */
      26:     u_char  rip_res1[2];        /* pad to 32-bit boundary */
      27:     union {
      28:         struct  netinfo ru_nets[1]; /* variable length... */
      29:         char    ru_tracefile[1];    /* ditto ... */
      30:     } ripun;
      31: #define rip_nets    ripun.ru_nets
      32: #define rip_tracefile   ripun.ru_tracefile
      33: };
      34:
      35: /*
      36:  * Packet types.
      37:  */
      38: #define RIPCMD_REQUEST      1   /* want info */
      39: #define RIPCMD_RESPONSE     2   /* responding to request */
      40: #define RIPCMD_TRACEON      3   /* turn tracing on */
      41: #define RIPCMD_TRACEOFF     4   /* turn it off */
      42:
      43: #define RIPCMD_MAX      5
      44: #ifdef RIPCMDS
      45: char *ripcmds[RIPCMD_MAX] =
      46:   { "#0", "REQUEST", "RESPONSE", "TRACEON", "TRACEOFF" };
      47: #endif
      48:
      49: #define HOPCNT_INFINITY     16L /* per Xerox NS */
      50: #define MAXPACKETSIZE       512 /* max broadcast size */
      51:
      52: /*
      53:  * Timer values used in managing the routing table.
      54:  * Every update forces an entry's timer to be reset.  After
      55:  * EXPIRE_TIME without updates, the entry is marked invalid,
      56:  * but held onto until GARBAGE_TIME so that others may
      57:  * see it "be deleted".
      58:  */
      59: #define TIMER_RATE      30  /* alarm clocks every 30 seconds */
      60:
      61: #define SUPPLY_INTERVAL     30  /* time to supply tables */
      62:
      63: #define EXPIRE_TIME     180 /* time to mark entry invalid */
      64: #define GARBAGE_TIME        240 /* time to garbage collect */

#### Defined variables

ripcmds defined in line 45; used 1 times

- in /usr/src/sbin/routed/trace.c line 231

#### Defined struct's

netinfo defined in line 18; used 30 times

- in line 28(2)
- in /usr/src/sbin/routed/input.c line 25(2), 47-49(4), 81(2), 139-140(4)
- in /usr/src/sbin/routed/output.c line 66(2), 99(2)
- in /usr/src/sbin/routed/tools/query.c line 139(2), 159(2), 221(2)
- in /usr/src/sbin/routed/trace.c line 228(2), 247-248(4)

rip defined in line 23; used 28 times

- in /usr/src/sbin/routed/defs.h line 54(2)
- in /usr/src/sbin/routed/main.c line 33(4)
- in /usr/src/sbin/routed/output.c line 52-53(4)
- in /usr/src/sbin/routed/tools/query.c line 101(4), 126(2), 138(4)
- in /usr/src/sbin/routed/tools/trace.c line 37(4)
- in /usr/src/sbin/routed/trace.c line 227(4)

#### Defined macros

EXPIRE_TIME defined in line 63; used 2 times

- in /usr/src/sbin/routed/input.c line 192
- in /usr/src/sbin/routed/timer.c line 46

GARBAGE_TIME defined in line 64; used 1 times

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

HOPCNT_INFINITY defined in line 49; used 12 times

- in /usr/src/sbin/routed/input.c line 64, 74-75(2), 147, 174, 184
- in /usr/src/sbin/routed/main.c line 131
- in /usr/src/sbin/routed/output.c line 106
- in /usr/src/sbin/routed/timer.c line 47, 64, 94
- in /usr/src/sbin/routed/tools/query.c line 125

MAXPACKETSIZE defined in line 50; used 4 times

- in /usr/src/sbin/routed/defs.h line 53
- in /usr/src/sbin/routed/output.c line 99
- in /usr/src/sbin/routed/tools/query.c line 27
- in /usr/src/sbin/routed/tools/trace.c line 28

RIPCMD_MAX defined in line 43; used 2 times

- in line 45
- in /usr/src/sbin/routed/trace.c line 230

RIPCMD_REQUEST defined in line 38; used 2 times

- in /usr/src/sbin/routed/main.c line 128
- in /usr/src/sbin/routed/tools/query.c line 122

RIPCMD_RESPONSE defined in line 39; used 4 times

- in /usr/src/sbin/routed/input.c line 84
- in /usr/src/sbin/routed/output.c line 73
- in /usr/src/sbin/routed/timer.c line 58
- in /usr/src/sbin/routed/tools/query.c line 145

RIPCMD_TRACEOFF defined in line 41; used 1 times

- in /usr/src/sbin/routed/tools/trace.c line 62

RIPCMD_TRACEON defined in line 40; used 3 times

- in /usr/src/sbin/routed/input.c line 101
- in /usr/src/sbin/routed/tools/trace.c line 62-66(2)

RIPVERSION defined in line 16; used 5 times

- in /usr/src/sbin/routed/main.c line 129
- in /usr/src/sbin/routed/output.c line 74
- in /usr/src/sbin/routed/timer.c line 59
- in /usr/src/sbin/routed/tools/query.c line 123
- in /usr/src/sbin/routed/tools/trace.c line 63

SUPPLY_INTERVAL defined in line 61; used 1 times

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

TIMER_RATE defined in line 59; used 4 times

- in /usr/src/sbin/routed/timer.c line 16, 30, 45, 76

rip_nets defined in line 31; used 15 times

- in /usr/src/sbin/routed/input.c line 45, 138
- in /usr/src/sbin/routed/main.c line 130-131(2)
- in /usr/src/sbin/routed/output.c line 66, 102, 114
- in /usr/src/sbin/routed/timer.c line 60-63(4)
- in /usr/src/sbin/routed/tools/query.c line 124-125(2), 157
- in /usr/src/sbin/routed/trace.c line 246

rip_tracefile defined in line 32; used 3 times

- in /usr/src/sbin/routed/input.c line 102
- in /usr/src/sbin/routed/tools/trace.c line 67
- in /usr/src/sbin/routed/trace.c line 258

#### Usage of this include

routed.h used 3 times

- in /usr/src/sbin/routed/defs.h line 21
- in /usr/src/sbin/routed/tools/query.c line 19
- in /usr/src/sbin/routed/tools/trace.c line 25

Last modified: 1987-06-20 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1157 |