diff options
Diffstat (limited to 'zebra/zebra_vrf.h')
| -rw-r--r-- | zebra/zebra_vrf.h | 120 | 
1 files changed, 59 insertions, 61 deletions
diff --git a/zebra/zebra_vrf.h b/zebra/zebra_vrf.h index cfe7cde75c..44887643d6 100644 --- a/zebra/zebra_vrf.h +++ b/zebra/zebra_vrf.h @@ -27,91 +27,89 @@  #include <zebra/zebra_pw.h>  /* Routing table instance.  */ -struct zebra_vrf -{ -  /* Back pointer */ -  struct vrf *vrf; +struct zebra_vrf { +	/* Back pointer */ +	struct vrf *vrf; -  /* Description.  */ -  char *desc; +	/* Description.  */ +	char *desc; -  /* FIB identifier.  */ -  u_char fib_id; +	/* FIB identifier.  */ +	u_char fib_id; -  /* Flags. */ -  u_int16_t flags; +	/* Flags. */ +	u_int16_t flags;  #define ZEBRA_VRF_RIB_SCHEDULED   (1 << 0)  #define ZEBRA_VRF_RETAIN          (2 << 0) -  u_int32_t table_id; +	u_int32_t table_id; -  /* Routing table.  */ -  struct route_table *table[AFI_MAX][SAFI_MAX]; +	/* Routing table.  */ +	struct route_table *table[AFI_MAX][SAFI_MAX]; -  /* Static route configuration.  */ -  struct route_table *stable[AFI_MAX][SAFI_MAX]; +	/* Static route configuration.  */ +	struct route_table *stable[AFI_MAX][SAFI_MAX]; -  /* Recursive Nexthop table */ -  struct route_table *rnh_table[AFI_MAX]; +	/* Recursive Nexthop table */ +	struct route_table *rnh_table[AFI_MAX]; -  /* Import check table (used mostly by BGP */ -  struct route_table *import_check_table[AFI_MAX]; +	/* Import check table (used mostly by BGP */ +	struct route_table *import_check_table[AFI_MAX]; -  /* Routing tables off of main table for redistribute table */ -  struct route_table *other_table[AFI_MAX][ZEBRA_KERNEL_TABLE_MAX]; +	/* Routing tables off of main table for redistribute table */ +	struct route_table *other_table[AFI_MAX][ZEBRA_KERNEL_TABLE_MAX]; -  /* 2nd pointer type used primarily to quell a warning on -   * ALL_LIST_ELEMENTS_RO -   */ -  struct list _rid_all_sorted_list; -  struct list _rid_lo_sorted_list; -  struct list *rid_all_sorted_list; -  struct list *rid_lo_sorted_list; -  struct prefix rid_user_assigned; +	/* 2nd pointer type used primarily to quell a warning on +	 * ALL_LIST_ELEMENTS_RO +	 */ +	struct list _rid_all_sorted_list; +	struct list _rid_lo_sorted_list; +	struct list *rid_all_sorted_list; +	struct list *rid_lo_sorted_list; +	struct prefix rid_user_assigned; -  /* -   * Back pointer to the owning namespace. -   */ -  struct zebra_ns *zns; +	/* +	 * Back pointer to the owning namespace. +	 */ +	struct zebra_ns *zns; -  /* MPLS static LSP config table */ -  struct hash *slsp_table; +	/* MPLS static LSP config table */ +	struct hash *slsp_table; -  /* MPLS label forwarding table */ -  struct hash *lsp_table; +	/* MPLS label forwarding table */ +	struct hash *lsp_table; -  /* Pseudowires. */ -  struct zebra_pw_head pseudowires; -  struct zebra_static_pw_head static_pseudowires; +	/* Pseudowires. */ +	struct zebra_pw_head pseudowires; +	struct zebra_static_pw_head static_pseudowires; -  /* MPLS processing flags */ -  u_int16_t mpls_flags; +	/* MPLS processing flags */ +	u_int16_t mpls_flags;  #define MPLS_FLAG_SCHEDULE_LSPS    (1 << 0)  }; -static inline vrf_id_t -zvrf_id (struct zebra_vrf *zvrf) +static inline vrf_id_t zvrf_id(struct zebra_vrf *zvrf)  { -  return zvrf->vrf->vrf_id; +	return zvrf->vrf->vrf_id;  } -static inline const char * -zvrf_name (struct zebra_vrf *zvrf) +static inline const char *zvrf_name(struct zebra_vrf *zvrf)  { -  return zvrf->vrf->name; +	return zvrf->vrf->name;  } -struct route_table * -zebra_vrf_table_with_table_id (afi_t afi, safi_t safi, -                               vrf_id_t vrf_id, u_int32_t table_id); - -extern void zebra_vrf_update_all (struct zserv *client); -extern struct zebra_vrf *zebra_vrf_lookup_by_id (vrf_id_t vrf_id); -extern struct zebra_vrf *zebra_vrf_lookup_by_name (const char *); -extern struct zebra_vrf *zebra_vrf_alloc (void); -extern struct route_table *zebra_vrf_table (afi_t, safi_t, vrf_id_t); -extern struct route_table *zebra_vrf_static_table (afi_t, safi_t, struct zebra_vrf *zvrf); -extern struct route_table *zebra_vrf_other_route_table (afi_t afi, u_int32_t table_id, -							vrf_id_t vrf_id); -extern void zebra_vrf_init (void); +struct route_table *zebra_vrf_table_with_table_id(afi_t afi, safi_t safi, +						  vrf_id_t vrf_id, +						  u_int32_t table_id); + +extern void zebra_vrf_update_all(struct zserv *client); +extern struct zebra_vrf *zebra_vrf_lookup_by_id(vrf_id_t vrf_id); +extern struct zebra_vrf *zebra_vrf_lookup_by_name(const char *); +extern struct zebra_vrf *zebra_vrf_alloc(void); +extern struct route_table *zebra_vrf_table(afi_t, safi_t, vrf_id_t); +extern struct route_table *zebra_vrf_static_table(afi_t, safi_t, +						  struct zebra_vrf *zvrf); +extern struct route_table * +zebra_vrf_other_route_table(afi_t afi, u_int32_t table_id, vrf_id_t vrf_id); +extern void zebra_vrf_init(void);  #endif  | 
