summaryrefslogtreecommitdiffstats
path: root/src/vnet/bfd/bfd_api.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-02-16 10:53:53 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-02-26 14:20:24 +0000
commit239790fd91b3f62e5eda1042a97f9216fe59856e (patch)
treeee72fc8e39c16f01249c72183f1a26904139fafe /src/vnet/bfd/bfd_api.c
parent263440e789d29e6e6b0038fcfd4e28e1c7160e83 (diff)
BFD: echo function
Change-Id: Ib1e301d62b687d4e42434239e7cd412065c28da0 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vnet/bfd/bfd_api.c')
-rw-r--r--src/vnet/bfd/bfd_api.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/vnet/bfd/bfd_api.c b/src/vnet/bfd/bfd_api.c
index af70f0ec2d5..6632eae4c91 100644
--- a/src/vnet/bfd/bfd_api.c
+++ b/src/vnet/bfd/bfd_api.c
@@ -54,7 +54,9 @@
_ (BFD_AUTH_DEL_KEY, bfd_auth_del_key) \
_ (BFD_AUTH_KEYS_DUMP, bfd_auth_keys_dump) \
_ (BFD_UDP_AUTH_ACTIVATE, bfd_udp_auth_activate) \
- _ (BFD_UDP_AUTH_DEACTIVATE, bfd_udp_auth_deactivate)
+ _ (BFD_UDP_AUTH_DEACTIVATE, bfd_udp_auth_deactivate) \
+ _ (BFD_UDP_SET_ECHO_SOURCE, bfd_udp_set_echo_source) \
+ _ (BFD_UDP_DEL_ECHO_SOURCE, bfd_udp_del_echo_source)
pub_sub_handler (bfd_events, BFD_EVENTS);
@@ -314,6 +316,33 @@ vl_api_bfd_udp_auth_deactivate_t_handler (vl_api_bfd_udp_auth_deactivate_t *
REPLY_MACRO (VL_API_BFD_UDP_AUTH_DEACTIVATE_REPLY);
}
+static void
+vl_api_bfd_udp_set_echo_source_t_handler (vl_api_bfd_udp_set_echo_source_t *
+ mp)
+{
+ vl_api_bfd_udp_set_echo_source_reply_t *rmp;
+ int rv;
+
+ VALIDATE_SW_IF_INDEX (mp);
+
+ rv = bfd_udp_set_echo_source (clib_net_to_host_u32 (mp->sw_if_index));
+
+ BAD_SW_IF_INDEX_LABEL;
+ REPLY_MACRO (VL_API_BFD_UDP_SET_ECHO_SOURCE_REPLY);
+}
+
+static void
+vl_api_bfd_udp_del_echo_source_t_handler (vl_api_bfd_udp_del_echo_source_t *
+ mp)
+{
+ vl_api_bfd_udp_del_echo_source_reply_t *rmp;
+ int rv;
+
+ rv = bfd_udp_del_echo_source ();
+
+ REPLY_MACRO (VL_API_BFD_UDP_DEL_ECHO_SOURCE_REPLY);
+}
+
/*
* bfd_api_hookup
* Add vpe's API message handlers to the table.