summaryrefslogtreecommitdiffstats
path: root/plugins/ila-plugin/ila/ila.h
diff options
context:
space:
mode:
authorPierre Pfister <ppfister@cisco.com>2016-09-15 13:45:31 +0100
committerKeith Burns <alagalah@gmail.com>2016-09-16 16:25:23 +0000
commit9b15f282952b12d1761c03ee48293baecaf32d0c (patch)
tree40903f8b32dac1ab9876b3f1779e0052947d11bc /plugins/ila-plugin/ila/ila.h
parent2dfd08242d66fb79c9a861c6a0c7fee45ef6bc60 (diff)
Add ILA API and API test plugin VPP-412
The ILA plugin could only be configured through CLI. This patch adds API support to ila_interface and ila_add_del_entry functions. The patch also adds a test plugin for vpp_api_test. Change-Id: I35d96c4e56bb32862cd08cc86a9fa25ff56ef583 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Diffstat (limited to 'plugins/ila-plugin/ila/ila.h')
-rw-r--r--plugins/ila-plugin/ila/ila.h32
1 files changed, 25 insertions, 7 deletions
diff --git a/plugins/ila-plugin/ila/ila.h b/plugins/ila-plugin/ila/ila.h
index b800fdd7b7a..29b87fa0c3d 100644
--- a/plugins/ila-plugin/ila/ila.h
+++ b/plugins/ila-plugin/ila/ila.h
@@ -29,7 +29,10 @@
_(VNID6, 3, "vnid-ip6") \
_(VNIDM, 4, "vnid-multicast")
-typedef enum {
+#define ila_type_list "iid,luid,vnid-ip4,vnid-ip6,vnid-multicast"
+
+typedef enum
+{
#define _(i,n,s) ILA_TYPE_##i = n,
ila_foreach_type
#undef _
@@ -40,7 +43,10 @@ _(NO_ACTION, 0, "no-action") \
_(NEUTRAL_MAP, 1, "neutral-map") \
_(ADJUST_TRANSPORT, 2, "adjust-transport")
-typedef enum {
+#define ila_csum_list "no-action,neutral-map,adjust-transport"
+
+typedef enum
+{
#define _(i,n,s) ILA_CSUM_MODE_##i = n,
ila_csum_foreach_type
#undef _
@@ -52,13 +58,17 @@ _(BIDIR, 0, "bidir") \
_(SIR2ILA, 1, "sir2ila") \
_(ILA2SIR, 2, "ila2sir")
-typedef enum {
+#define ila_direction_list "bidir,sir2ila,ila2sir"
+
+typedef enum
+{
#define _(i,n,s) ILA_DIR_##i = n,
ila_foreach_direction
#undef _
} ila_direction_t;
-typedef struct {
+typedef struct
+{
ila_type_t type;
ip6_address_t sir_address;
ip6_address_t ila_address;
@@ -67,11 +77,13 @@ typedef struct {
ila_direction_t dir;
} ila_entry_t;
-typedef struct {
+typedef struct
+{
u32 entry_index;
} ila_adj_data_t;
-typedef struct {
+typedef struct
+{
ila_entry_t *entries; //Pool of ILA entries
u64 lookup_table_nbuckets;
@@ -84,7 +96,8 @@ typedef struct {
} ila_main_t;
-typedef struct {
+typedef struct
+{
ila_type_t type;
ip6_address_t sir_address;
u64 locator;
@@ -98,4 +111,9 @@ typedef struct {
int ila_add_del_entry (ila_add_del_entry_args_t * args);
int ila_interface (u32 sw_if_index, u8 disable);
+u8 *format_half_ip6_address (u8 * s, va_list * va);
+u8 *format_ila_direction (u8 * s, va_list * args);
+u8 *format_ila_csum_mode (u8 * s, va_list * va);
+u8 *format_ila_type (u8 * s, va_list * args);
+
#endif //ILA_H