diff options
author | Feng Lu <lu.feng@6wind.com> | 2015-05-22 11:39:56 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2015-06-02 06:58:12 +0200 |
commit | 41f44a23e86a65a5cad7e5e8cafd7e935f153232 (patch) | |
tree | 1fcffa568b188ae66e5f18df09f6960522dfe564 /lib/zebra.h | |
parent | 395828eea809e8b2b8c5824d3639cefedd7aa9f0 (diff) | |
download | quagga-41f44a23e86a65a5cad7e5e8cafd7e935f153232.tar.bz2 quagga-41f44a23e86a65a5cad7e5e8cafd7e935f153232.tar.xz |
lib, zebra: move "struct vrf" to be a lib module
Previously "struct vrf" is defined locally in zebra. Now it is moved
to be a lib module.
This is the first step to support multi-VRF in quagga. The
implementation is splitted into small patches for the purpose of
easy review.
* lib:
"struct vrf" with basic members is defined in vrf.c. The member
"void *info" is for user data.
Some basic functions are defined in vrf.c for adding/deleting/
looking up a VRF, scanning the VRF table and initializing the
VRF module.
The type "vrf_id_t" is defined specificly for VRF ID.
* zebra:
The previous "struct vrf" is re-defined as "struct zebra_vrf";
and previous "vrf" variables are renamed to "zvrf".
The previous "struct vrf" related functions are removed from
zbera_rib.c. New functions are defined to maintain the new
"struct zebra_vrf".
The names vrf_xxx are reserved for the functions in VRF module.
So:
- the previous vrf_table() are renamed to zebra_vrf_table();
- the previous vrf_static_table() are renamed to
zebra_vrf_static_table().
The main logic is not changed.
BTW: Add a statement to zebra_snmp.c telling that the SNMP is
running only for the MIBs in the default VRF.
Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/zebra.h')
-rw-r--r-- | lib/zebra.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/zebra.h b/lib/zebra.h index a5ed20e4..e88a6293 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -522,6 +522,9 @@ typedef u_int8_t safi_t; typedef u_int16_t zebra_size_t; typedef u_int16_t zebra_command_t; +/* VRF ID type. */ +typedef u_int16_t vrf_id_t; + /* FIFO -- first in first out structure and macros. */ struct fifo { |