Statistics
| Branch: | Revision:

iof-bird-daemon / proto / static / static.h @ 4116db18

History | View | Annotate | Download (1.3 KB)

1
/*
2
 *        BIRD -- Static Route Generator
3
 *
4
 *        (c) 1998--2000 Martin Mares <mj@ucw.cz>
5
 *
6
 *        Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

    
9
#ifndef _BIRD_STATIC_H_
10
#define _BIRD_STATIC_H_
11

    
12
struct static_config {
13
  struct proto_config c;
14
  list iface_routes;                /* Routes to search on interface events */
15
  list other_routes;                /* Routes hooked to neighbor cache and reject routes */
16
  int check_link;                        /* Whether iface link state is used */
17
  struct rtable_config *igp_table;        /* Table used for recursive next hop lookups */
18
};
19

    
20

    
21
void static_init_config(struct static_config *);
22

    
23
struct static_route {
24
  node n;
25
  struct static_route *chain;                /* Next for the same neighbor */
26
  ip_addr net;                                /* Network we route */
27
  int masklen;                                /* Mask length */
28
  int dest;                                /* Destination type (RTD_*) */
29
  ip_addr via;                                /* Destination router */
30
  struct neighbor *neigh;
31
  byte *if_name;                        /* Name for RTD_DEVICE routes */
32
  struct static_route *mp_next;                /* Nexthops for RTD_MULTIPATH routes */
33
  int installed;                        /* Installed in master table */
34
};
35

    
36
/* Dummy nodes (parts of multipath route) abuses masklen field for weight
37
   and if_name field for a ptr to the master (RTD_MULTIPATH) node. */
38

    
39

    
40
#define RTDX_RECURSIVE 0x7f                /* Phony dest value for recursive routes */
41

    
42
void static_show(struct proto *);
43

    
44
#endif