summaryrefslogtreecommitdiffstats
path: root/proto/static/static.h
blob: 40da74c9a2d5dbd83dfdc4fcdf790de18cfd02ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 *	BIRD -- Static Route Generator
 *
 *	(c) 1998--2000 Martin Mares <mj@ucw.cz>
 *
 *	Can be freely distributed and used under the terms of the GNU GPL.
 */

#ifndef _BIRD_STATIC_H_
#define _BIRD_STATIC_H_

struct static_config {
  struct proto_config c;
  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 */
};

#define STATIC_CHECK_NONE 0
#define STATIC_CHECK_LINK 1

void static_init_config(struct static_config *);

struct static_route {
  node n;
  struct static_route *chain;		/* Next for the same neighbor */
  ip_addr net;				/* Network we route */
  int masklen;				/* Mask length */
  int dest;				/* Destination type (RTD_*) */
  ip_addr via;				/* Destination router */
  struct neighbor *neigh;
  byte *if_name;			/* Name for RTD_DEVICE routes */
  int installed;			/* Installed in master table */
};

void static_show(struct proto *);

#endif