Return to static.h CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / bird / proto / static |
1.1 ! misho 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: #include "nest/route.h" ! 13: #include "nest/bfd.h" ! 14: ! 15: struct static_config { ! 16: struct proto_config c; ! 17: list iface_routes; /* Routes to search on interface events */ ! 18: list other_routes; /* Routes hooked to neighbor cache and reject routes */ ! 19: int check_link; /* Whether iface link state is used */ ! 20: struct rtable_config *igp_table; /* Table used for recursive next hop lookups */ ! 21: }; ! 22: ! 23: ! 24: void static_init_config(struct static_config *); ! 25: ! 26: struct static_route { ! 27: node n; ! 28: struct static_route *chain; /* Next for the same neighbor */ ! 29: ip_addr net; /* Network we route */ ! 30: int masklen; /* Mask length */ ! 31: int dest; /* Destination type (RTD_*) */ ! 32: ip_addr via; /* Destination router */ ! 33: struct iface *via_if; /* Destination iface, for link-local vias */ ! 34: struct neighbor *neigh; ! 35: byte *if_name; /* Name for RTD_DEVICE routes */ ! 36: struct static_route *mp_next; /* Nexthops for RTD_MULTIPATH routes */ ! 37: struct f_inst *cmds; /* List of commands for setting attributes */ ! 38: int installed; /* Installed in rt table, -1 for reinstall */ ! 39: int use_bfd; /* Configured to use BFD */ ! 40: struct bfd_request *bfd_req; /* BFD request, if BFD is used */ ! 41: }; ! 42: ! 43: /* Dummy nodes (parts of multipath route) abuses masklen field for weight ! 44: and if_name field for a ptr to the master (RTD_MULTIPATH) node. */ ! 45: ! 46: ! 47: #define RTDX_RECURSIVE 0x7f /* Phony dest value for recursive routes */ ! 48: ! 49: void static_show(struct proto *); ! 50: ! 51: #endif