diff options
author | Neale Ranns <nranns@cisco.com> | 2017-12-05 13:24:04 -0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-12-09 20:55:08 +0000 |
commit | 9128637ee8f7b0d903551f165a1447d427e8dd19 (patch) | |
tree | 244014dd1064643946d64066e352ee1627bf622c /src/vnet/bier/bier_types.h | |
parent | cef87f1a5eb4d69cf11ce1cd3c5506edcfba74c4 (diff) |
BIER in non-MPLS netowrks
as decsribed in section 2.2
ihttps://tools.ietf.org/html/draft-ietf-bier-mpls-encapsulation-10
with BIFT encoding from:
https://tools.ietf.org/html/draft-wijnandsxu-bier-non-mpls-bift-encoding-00
changes:
1 - introduce the new BIFT lookup table. BIER tables that have an associated
MPLS label are added to the MPLS-FIB. Those that don't are added to the
BIER table
2 - BIER routes that have no associated output MPLS label will add a BIFT label.
3 - The BIER FMask has a path-list as a member to resolve via any possible path.
Change-Id: I1fd4d9dbd074f0e855c16e9329b81460ebe1efce
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/bier/bier_types.h')
-rw-r--r-- | src/vnet/bier/bier_types.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/vnet/bier/bier_types.h b/src/vnet/bier/bier_types.h index fa1cd423278..d484ba9ed03 100644 --- a/src/vnet/bier/bier_types.h +++ b/src/vnet/bier/bier_types.h @@ -504,4 +504,32 @@ extern u32 bier_hdr_len_id_to_prefix_len(bier_hdr_len_id_t id); #define BIER_ERR_PANIC 3 typedef int bier_rc; +/** + * The BIER universal 'label' + */ +typedef u32 bier_bift_id_t; + +/** + * An invalid value for the BIFT ID + * all ones implies a BSL that's invalid. + */ +#define BIER_BIFT_ID_INVALID (~0) + +extern u16 bier_bfit_id_get_sub_domain(bier_bift_id_t bift_id); +extern u16 bier_bfit_id_get_set(bier_bift_id_t bift_id); +extern bier_hdr_proto_id_t bier_bift_id_get_bit_string_length(bier_bift_id_t bift_id); + +/** + * Encode a BIFT-ID as per draft-wijnandsxu-bier-non-mpls-bift-encoding-00.txt + */ +extern bier_bift_id_t bier_bift_id_encode(bier_table_set_id_t set, + bier_table_sub_domain_id_t sd, + bier_hdr_len_id_t bsl); +extern void bier_bift_id_decode(bier_bift_id_t id, + bier_table_set_id_t *set, + bier_table_sub_domain_id_t *sd, + bier_hdr_len_id_t *bsl); + +extern u8* format_bier_bift_id(u8 *s, va_list *ap); + #endif /* __BIER_TYPES_H__ */ |