From 948e00ff5eded0806fc7f54e8f3943aade2bd14a Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 20 Oct 2016 13:39:34 +0100 Subject: Support IETF routing Yang models (VPP-503). Add support for special routes to send ICMP unreachable or admin prohibited. Change-Id: Ia1ac65b0e5e925c0f9ebc7824141833b4e18f05e Signed-off-by: Neale Ranns --- vpp-api-test/vat/api_format.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'vpp-api-test/vat') diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c index 51beada2..6f110838 100644 --- a/vpp-api-test/vat/api_format.c +++ b/vpp-api-test/vat/api_format.c @@ -5757,6 +5757,7 @@ api_ip_add_del_route (vat_main_t * vam) u8 sw_if_index_set = 0; u8 is_ipv6 = 0; u8 is_local = 0, is_drop = 0; + u8 is_unreach = 0, is_prohibit = 0; u8 create_vrf_if_needed = 0; u8 is_add = 1; u8 next_hop_weight = 1; @@ -5822,6 +5823,14 @@ api_ip_add_del_route (vat_main_t * vam) { is_drop = 1; } + else if (unformat (i, "null-send-unreach")) + { + is_unreach = 1; + } + else if (unformat (i, "null-send-prohibit")) + { + is_prohibit = 1; + } else if (unformat (i, "local")) { is_local = 1; @@ -5871,9 +5880,11 @@ api_ip_add_del_route (vat_main_t * vam) return -99; } - if (!next_hop_set && !is_drop && !is_local && !is_classify) + if (!next_hop_set && !is_drop && !is_local && + !is_classify && !is_unreach && !is_prohibit) { - errmsg ("next hop / local / drop / classify not set\n"); + errmsg + ("next hop / local / drop / unreach / prohibit / classify not set\n"); return -99; } @@ -5936,6 +5947,8 @@ api_ip_add_del_route (vat_main_t * vam) mp->is_add = is_add; mp->is_drop = is_drop; + mp->is_unreach = is_unreach; + mp->is_prohibit = is_prohibit; mp->is_ipv6 = is_ipv6; mp->is_local = is_local; mp->is_classify = is_classify; -- cgit 1.2.3-korg