Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
FIB: encode the label stack in the FIB path during table dump
[vpp.git]
/
src
/
vnet
/
bier
/
bier_fmask_db.h
diff --git
a/src/vnet/bier/bier_fmask_db.h
b/src/vnet/bier/bier_fmask_db.h
index
a7f29c2
..
cf78bda
100644
(file)
--- a/
src/vnet/bier/bier_fmask_db.h
+++ b/
src/vnet/bier/bier_fmask_db.h
@@
-36,23
+36,28
@@
typedef enum bier_hdr_type_t_ {
* BIER header in non-MPLS networks
*/
BIER_HDR_O_OTHER,
* BIER header in non-MPLS networks
*/
BIER_HDR_O_OTHER,
-} bier_hdr_type_t;
+}
__attribute__((packed))
bier_hdr_type_t;
/**
/**
- * A key/ID for a BIER forwarding Mas (FMask).
- * This is a simplified version of a fib_route_path_t.
+ * BIER next-hop type
*/
*/
-typedef
struct bier_fmask_id
_t_ {
+typedef
enum bier_nh_type
_t_ {
/**
/**
- *
Type of BIER header this fmask support
s
+ *
BIER Header in MPLS network
s
*/
*/
- bier_hdr_type_t bfmi_hdr_type;
+ BIER_NH_IP,
/**
/**
- *
The BIER table this fmask is in
+ *
BIER header in non-MPLS networks
*/
*/
- index_t bfmi_bti;
+ BIER_NH_UDP,
+} __attribute__((packed)) bier_nh_type_t;
+/**
+ * A key/ID for a BIER forwarding Mas (FMask).
+ * This is a simplified version of a fib_route_path_t.
+ */
+typedef struct bier_fmask_id_t_ {
union {
/**
* next-hop of the peer
union {
/**
* next-hop of the peer
@@
-64,11
+69,20
@@
typedef struct bier_fmask_id_t_ {
*/
u32 bfmi_id;
};
*/
u32 bfmi_id;
};
+ /**
+ * The BIER table this fmask is in
+ */
+ index_t bfmi_bti;
/**
/**
- *
Software interface index
+ *
Type of BIER header this fmask supports
*/
*/
- u32 bfmi_sw_if_index;
+ bier_hdr_type_t bfmi_hdr_type;
+
+ /**
+ * Union discriminator
+ */
+ bier_nh_type_t bfmi_nh_type;
} __attribute__((packed)) bier_fmask_id_t;
extern index_t
} __attribute__((packed)) bier_fmask_id_t;
extern index_t
@@
-79,5
+93,11
@@
extern index_t bier_fmask_db_find (index_t bti,
extern void bier_fmask_db_remove (const bier_fmask_id_t *fmid);
extern void bier_fmask_db_remove (const bier_fmask_id_t *fmid);
+/**
+ * Walk all the BIER fmasks
+ */
+typedef walk_rc_t (*bier_fmask_walk_fn_t) (index_t bfmi, void *ctx);
+
+extern void bier_fmask_db_walk(bier_fmask_walk_fn_t fn, void *ctx);
#endif
#endif