1998-12-07 02:21:23 +08:00
|
|
|
/*
|
|
|
|
* BIRD -- Static Route Generator
|
|
|
|
*
|
2000-01-17 19:52:50 +08:00
|
|
|
* (c) 1998--2000 Martin Mares <mj@ucw.cz>
|
1998-12-07 02:21:23 +08:00
|
|
|
*
|
|
|
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _BIRD_STATIC_H_
|
|
|
|
#define _BIRD_STATIC_H_
|
|
|
|
|
1999-02-06 05:38:22 +08:00
|
|
|
struct static_config {
|
|
|
|
struct proto_config c;
|
2010-11-11 19:24:27 +08:00
|
|
|
list iface_routes; /* Routes to search on interface events */
|
|
|
|
list other_routes; /* Routes hooked to neighbor cache and reject routes */
|
|
|
|
int check; /* Condition for route install */
|
1998-12-07 02:21:23 +08:00
|
|
|
};
|
|
|
|
|
2010-11-11 19:24:27 +08:00
|
|
|
#define STATIC_CHECK_NONE 0
|
|
|
|
#define STATIC_CHECK_LINK 1
|
|
|
|
|
1999-02-06 05:38:22 +08:00
|
|
|
void static_init_config(struct static_config *);
|
1998-12-07 02:21:23 +08:00
|
|
|
|
|
|
|
struct static_route {
|
|
|
|
node n;
|
1998-12-09 02:31:31 +08:00
|
|
|
struct static_route *chain; /* Next for the same neighbor */
|
1998-12-07 07:13:31 +08:00
|
|
|
ip_addr net; /* Network we route */
|
1998-12-07 02:21:23 +08:00
|
|
|
int masklen; /* Mask length */
|
|
|
|
int dest; /* Destination type (RTD_*) */
|
1998-12-07 07:13:31 +08:00
|
|
|
ip_addr via; /* Destination router */
|
1998-12-07 02:21:23 +08:00
|
|
|
struct neighbor *neigh;
|
1998-12-07 07:13:31 +08:00
|
|
|
byte *if_name; /* Name for RTD_DEVICE routes */
|
1999-12-03 19:41:23 +08:00
|
|
|
int installed; /* Installed in master table */
|
1998-12-07 02:21:23 +08:00
|
|
|
};
|
|
|
|
|
1999-12-03 19:41:23 +08:00
|
|
|
void static_show(struct proto *);
|
|
|
|
|
1998-12-07 02:21:23 +08:00
|
|
|
#endif
|