X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fvrrp%2Fvrrp_test.c;fp=src%2Fplugins%2Fvrrp%2Fvrrp_test.c;h=199f5417f1ab0d0b0d42be644a06c954eac38cda;hb=78f487e113fb0fbd1a06b90f3681d237f7edc495;hp=eaa0c40ecd025789d092e4f6d70a81d747a5687e;hpb=4df9f737a24be94c2988f18337a4ad845b1b0186;p=vpp.git diff --git a/src/plugins/vrrp/vrrp_test.c b/src/plugins/vrrp/vrrp_test.c index eaa0c40ecd0..199f5417f1a 100644 --- a/src/plugins/vrrp/vrrp_test.c +++ b/src/plugins/vrrp/vrrp_test.c @@ -690,6 +690,38 @@ vl_api_vrrp_vr_peer_details_t_handler (vl_api_vrrp_vr_peer_details_t * mp) fformat (vam->ofp, "\n"); } +static int +api_want_vrrp_vr_events (vat_main_t * vam) +{ + unformat_input_t *i = vam->input; + vl_api_want_vrrp_vr_events_t *mp; + int enable = -1; + int ret; + + while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) + { + if (unformat (i, "enable")) + enable = 1; + else if (unformat (i, "disable")) + enable = 0; + else + break; + } + + if (enable == -1) + { + errmsg ("missing enable|disable"); + return -99; + } + + M (WANT_VRRP_VR_EVENTS, mp); + mp->enable_disable = enable; + S (mp); + W (ret); + + return ret; +} + #include /* * fd.io coding-style-patch-verification: ON