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

##### Variables

    hosthash          X
    nethash           X

##### Macros

    ROUTEHASHMASK     X
    ROUTEHASHSIZ      X
    RTF_SUBNET        X
    RTS_CHANGED       X
    RTS_EXTERNAL      X
    RTS_INTERFACE     X
    RTS_INTERNAL      X
    RTS_PASSIVE       X
    RTS_REMOTE        X
    RTS_SUBNET        X
    rt_dst            X
    rt_flags          X
    rt_hash           X
    rt_ifp            X
    rt_metric         X
    rt_router         X
    rt_rt             X
    rt_state          X
    rt_timer          X

##### struct's

    rt_entry          X
    rthash            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:  *	@(#)table.h	5.2 (Berkeley) 4/20/86
       7:  */
       8:
       9: /*
      10:  * Routing table management daemon.
      11:  */
      12:
      13: /*
      14:  * Routing table structure; differs a bit from kernel tables.
      15:  *
      16:  * Note: the union below must agree in the first 4 members
      17:  * so the ioctl's will work.
      18:  */
      19: struct rthash {
      20:     struct  rt_entry *rt_forw;
      21:     struct  rt_entry *rt_back;
      22: };
      23:
      24: struct rt_entry {
      25:     struct  rt_entry *rt_forw;
      26:     struct  rt_entry *rt_back;
      27:     union {
      28:         struct  rtentry rtu_rt;
      29:         struct {
      30:             u_int   rtu_hash;
      31:             struct  sockaddr rtu_dst;
      32:             struct  sockaddr rtu_router;
      33:             short   rtu_flags;
      34:             short   rtu_state;
      35:             int rtu_timer;
      36:             int rtu_metric;
      37:             struct  interface *rtu_ifp;
      38:         } rtu_entry;
      39:     } rt_rtu;
      40: };
      41:
      42: #define rt_rt       rt_rtu.rtu_rt           /* pass to ioctl */
      43: #define rt_hash     rt_rtu.rtu_entry.rtu_hash   /* for net or host */
      44: #define rt_dst      rt_rtu.rtu_entry.rtu_dst    /* match value */
      45: #define rt_router   rt_rtu.rtu_entry.rtu_router /* who to forward to */
      46: #define rt_flags    rt_rtu.rtu_entry.rtu_flags  /* kernel flags */
      47: #define rt_timer    rt_rtu.rtu_entry.rtu_timer  /* for invalidation */
      48: #define rt_state    rt_rtu.rtu_entry.rtu_state  /* see below */
      49: #define rt_metric   rt_rtu.rtu_entry.rtu_metric /* cost of route */
      50: #define rt_ifp      rt_rtu.rtu_entry.rtu_ifp    /* interface to take */
      51:
      52: #define ROUTEHASHSIZ    32      /* must be a power of 2 */
      53: #define ROUTEHASHMASK   (ROUTEHASHSIZ - 1)
      54:
      55: /*
      56:  * "State" of routing table entry.
      57:  */
      58: #define RTS_CHANGED 0x1     /* route has been altered recently */
      59: #define RTS_EXTERNAL    0x2     /* extern info, not installed or sent */
      60: #define RTS_INTERNAL    0x4     /* internal route, not installed */
      61: #define RTS_PASSIVE IFF_PASSIVE /* don't time out route */
      62: #define RTS_INTERFACE   IFF_INTERFACE   /* route is for network interface */
      63: #define RTS_REMOTE  IFF_REMOTE  /* route is for ``remote'' entity */
      64: #define RTS_SUBNET  IFF_SUBNET  /* route is for network subnet */
      65:
      66: /*
      67:  * Flags are same as kernel, with this addition for af_rtflags:
      68:  */
      69: #define RTF_SUBNET  0x8000      /* pseudo: route to subnet */
      70:
      71: struct  rthash nethash[ROUTEHASHSIZ];
      72: struct  rthash hosthash[ROUTEHASHSIZ];
      73: struct  rt_entry *rtlookup();
      74: struct  rt_entry *rtfind();

#### Defined variables

hosthash defined in line 72; used 8 times

- in /usr/src/sbin/routed/output.c line 68
- in /usr/src/sbin/routed/tables.c line 46, 81, 129, 246(2)
- in /usr/src/sbin/routed/timer.c line 26, 86

nethash defined in line 71; used 8 times

- in /usr/src/sbin/routed/output.c line 111
- in /usr/src/sbin/routed/tables.c line 57, 99, 132, 244(2)
- in /usr/src/sbin/routed/timer.c line 71, 98

#### Defined struct's

rt_entry defined in line 24; used 56 times

- in line 20-26(6), 73-74(4)
- in /usr/src/sbin/routed/inet.c line 154(2)
- in /usr/src/sbin/routed/input.c line 24(2)
- in /usr/src/sbin/routed/output.c line 65(2), 77(2)
- in /usr/src/sbin/routed/startup.c line 167(2), 224(2)
- in /usr/src/sbin/routed/tables.c line 32-36(4), 48(2), 66-70(4), 84(2), 111(2), 134(2), 168(2), 211(2), 245-247(4)
- in /usr/src/sbin/routed/timer.c line 25(2), 37(2), 85(2), 93(2)
- in /usr/src/sbin/routed/trace.c line 118(2)

rthash defined in line 19; used 24 times

- in line 71-72(4)
- in /usr/src/sbin/routed/output.c line 67-68(4)
- in /usr/src/sbin/routed/tables.c line 37(2), 71(2), 112(2), 242(2)
- in /usr/src/sbin/routed/timer.c line 24-26(4), 84-86(4)

#### Defined macros

ROUTEHASHMASK defined in line 53; used 6 times

- in /usr/src/sbin/routed/tables.c line 46, 57, 81, 99, 129-132(2)

ROUTEHASHSIZ defined in line 52; used 8 times

- in line 53, 71-72(2)
- in /usr/src/sbin/routed/output.c line 76
- in /usr/src/sbin/routed/tables.c line 244-246(2)
- in /usr/src/sbin/routed/timer.c line 35, 91

RTF_SUBNET defined in line 69; used 3 times

- in /usr/src/sbin/routed/inet.c line 138
- in /usr/src/sbin/routed/tables.c line 123-125(2)

RTS_CHANGED defined in line 58; used 6 times

- in /usr/src/sbin/routed/tables.c line 143, 199, 237
- in /usr/src/sbin/routed/timer.c line 53-54(2)
- in /usr/src/sbin/routed/trace.c line 133

RTS_EXTERNAL defined in line 59; used 5 times

- in /usr/src/sbin/routed/output.c line 84
- in /usr/src/sbin/routed/startup.c line 273
- in /usr/src/sbin/routed/tables.c line 156, 218
- in /usr/src/sbin/routed/trace.c line 135

RTS_INTERFACE defined in line 62; used 11 times

- in /usr/src/sbin/routed/input.c line 116, 128, 168-169(2)
- in /usr/src/sbin/routed/startup.c line 179(2)
- in /usr/src/sbin/routed/tables.c line 181-182(2), 214
- in /usr/src/sbin/routed/timer.c line 44
- in /usr/src/sbin/routed/trace.c line 132

RTS_INTERNAL defined in line 60; used 15 times

- in /usr/src/sbin/routed/inet.c line 164-187(6)
- in /usr/src/sbin/routed/input.c line 168-169(2)
- in /usr/src/sbin/routed/startup.c line 179, 194
- in /usr/src/sbin/routed/tables.c line 156, 175, 218, 237
- in /usr/src/sbin/routed/trace.c line 134

RTS_PASSIVE defined in line 61; used 6 times

- in /usr/src/sbin/routed/startup.c line 194, 273
- in /usr/src/sbin/routed/tables.c line 237
- in /usr/src/sbin/routed/timer.c line 43
- in /usr/src/sbin/routed/trace.c line 130, 174

RTS_REMOTE defined in line 63; used 2 times

- in /usr/src/sbin/routed/input.c line 128
- in /usr/src/sbin/routed/trace.c line 131

RTS_SUBNET defined in line 64; used 4 times

- in /usr/src/sbin/routed/output.c line 90
- in /usr/src/sbin/routed/startup.c line 194
- in /usr/src/sbin/routed/tables.c line 124
- in /usr/src/sbin/routed/trace.c line 136

rt_dst defined in line 44; used 11 times

- in /usr/src/sbin/routed/inet.c line 158
- in /usr/src/sbin/routed/output.c line 93, 104
- in /usr/src/sbin/routed/startup.c line 255
- in /usr/src/sbin/routed/tables.c line 51, 88-92(3), 138
- in /usr/src/sbin/routed/timer.c line 60
- in /usr/src/sbin/routed/trace.c line 147

rt_flags defined in line 46; used 8 times

- in /usr/src/sbin/routed/startup.c line 257-261(3)
- in /usr/src/sbin/routed/tables.c line 142, 148, 196-198(2)
- in /usr/src/sbin/routed/trace.c line 154

rt_hash defined in line 43; used 3 times

- in /usr/src/sbin/routed/tables.c line 49, 85, 137

rt_ifp defined in line 50; used 11 times

- in /usr/src/sbin/routed/output.c line 82
- in /usr/src/sbin/routed/tables.c line 144-146(3), 185-192(4), 216
- in /usr/src/sbin/routed/trace.c line 174-175(2)

rt_metric defined in line 49; used 13 times

- in /usr/src/sbin/routed/input.c line 75, 172, 188-193(3)
- in /usr/src/sbin/routed/output.c line 106
- in /usr/src/sbin/routed/tables.c line 140, 177, 194
- in /usr/src/sbin/routed/timer.c line 47, 64, 94
- in /usr/src/sbin/routed/trace.c line 151

rt_router defined in line 45; used 11 times

- in /usr/src/sbin/routed/input.c line 171, 183
- in /usr/src/sbin/routed/startup.c line 256
- in /usr/src/sbin/routed/tables.c line 139-146(3), 175, 189-192(3)
- in /usr/src/sbin/routed/trace.c line 148

rt_rt defined in line 42; used 5 times

- in /usr/src/sbin/routed/startup.c line 262
- in /usr/src/sbin/routed/tables.c line 157, 188, 203, 219

rt_state defined in line 48; used 26 times

- in /usr/src/sbin/routed/inet.c line 164-187(6)
- in /usr/src/sbin/routed/input.c line 116, 128, 168
- in /usr/src/sbin/routed/output.c line 84, 90
- in /usr/src/sbin/routed/startup.c line 179
- in /usr/src/sbin/routed/tables.c line 143, 156, 175, 181-182(2), 199, 214-218(2)
- in /usr/src/sbin/routed/timer.c line 43-44(2), 53-54(2)
- in /usr/src/sbin/routed/trace.c line 165, 174

rt_timer defined in line 47; used 9 times

- in /usr/src/sbin/routed/input.c line 119, 129, 190-195(3)
- in /usr/src/sbin/routed/tables.c line 141
- in /usr/src/sbin/routed/timer.c line 45-48(3)

#### Usage of this include

table.h used 1 times

- in /usr/src/sbin/routed/defs.h line 28

Last modified: 1988-08-31 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1210 |