aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciek Konstantynowicz <mkonstan@cisco.com>2017-04-26 21:43:00 +0100
committerMaciek Konstantynowicz <mkonstan@cisco.com>2017-04-26 21:51:09 +0100
commit43c34a7ba751495f2bc5f9d6eb9740dedd689f2b (patch)
treea697f0e9469fd1f73535af21d97c27e05e1e61be
parentc778fedabb02e6d56f5265ac861c86a4daed6e94 (diff)
update to csti rls1704 report: vpp_unittest_results.rst
Change-Id: I3af10e3caeaa4150b35a118899e233e33877c673 Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
-rw-r--r--docs/report/detailed_test_results/vpp_unittest_results/vpp_unittest_results.rst342
1 files changed, 291 insertions, 51 deletions
diff --git a/docs/report/detailed_test_results/vpp_unittest_results/vpp_unittest_results.rst b/docs/report/detailed_test_results/vpp_unittest_results/vpp_unittest_results.rst
index 4a56b07d5e..63bcb1ec2c 100644
--- a/docs/report/detailed_test_results/vpp_unittest_results/vpp_unittest_results.rst
+++ b/docs/report/detailed_test_results/vpp_unittest_results/vpp_unittest_results.rst
@@ -27,8 +27,8 @@ DHCP
DHCPv6 Proxy OK
DHCPv4 Proxy OK
-IP4 VRF Multi-instance
-``````````````````````
+IPv4 VRF Multi-instance
+```````````````````````
::
==============================================================================
@@ -51,22 +51,14 @@ Load Balancer
Load Balancer IP6 GRE4 OK
Load Balancer IP6 GRE6 OK
-BFD IPv4
-````````
-
+FIB Tests
+`````````
::
==============================================================================
- Bidirectional Forwarding Detection (BFD)
+ FIB Test Case
==============================================================================
- verify session goes down after inactivity OK
- hold BFD session up OK
- immediately honor remote min rx reduction OK
- large remote RequiredMinRxInterval OK
- bring BFD session down OK
- bring BFD session up OK
- verify slow periodic control frames while session down OK
- no packets when zero BFD RemoteMinRxInterval OK
+ FIB Unit Tests OK
BFD IPv6
````````
@@ -75,57 +67,113 @@ BFD IPv6
==============================================================================
Bidirectional Forwarding Detection (BFD) (IPv6)
==============================================================================
- hold BFD session up OK
- bring BFD session up OK
+ echo function used SKIP
+ echo packets looped back SKIP
+ hold BFD session up SKIP
+ bring BFD session up SKIP
+ bring BFD session up - first frame looked up by address pair SKIP
-BFD API tests
-`````````````
+BFD authentication
+``````````````````
::
==============================================================================
- Bidirectional Forwarding Detection (BFD) - API
+ Bidirectional Forwarding Detection (BFD) (SHA1 auth)
==============================================================================
- activate SHA1 authentication OK
- create BFD session using non-existent SHA1 (negative case) OK
- create a BFD session OK
- create IPv6 BFD session OK
- create a BFD session (SHA1) OK
- add SHA1 keys OK
- test_change_key (test_bfd.BFDAPITestCase) OK
- deactivate SHA1 authentication OK
- create the same BFD session twice (negative case) OK
- create the same BFD session twice (negative case) (SHA1) OK
- share single SHA1 key between multiple BFD sessions OK
+ hold BFD session up SKIP
+ hold BFD session up - meticulous auth SKIP
+ session is not brought down by unauthenticated msg SKIP
+ session is not brought down by msg with non-existent key-id SKIP
+ session is not brought down by msg with wrong auth type SKIP
+ simulate remote peer restart and resynchronization SKIP
+ session is not kept alive by msgs with bad sequence numbers SKIP
+ bring BFD session up SKIP
-BFD authorization
-`````````````````
+BFD CLI
+````````
+::
+
+ ==============================================================================
+ Bidirectional Forwarding Detection (BFD) (CLI)
+ ==============================================================================
+ create/modify/delete IPv4 BFD UDP session SKIP
+ create/modify/delete IPv6 BFD UDP session SKIP
+ create/modify/delete IPv6 BFD UDP session (authenticated) SKIP
+ create/modify/delete IPv4 BFD UDP session (authenticated) SKIP
+ put session admin-up and admin-down SKIP
+ turn authentication on and off SKIP
+ turn authentication on and off (delayed) SKIP
+ set/delete meticulous SHA1 auth key SKIP
+ set/delete SHA1 auth key SKIP
+ set/del udp echo source SKIP
+ show commands SKIP
+
+BFD API
+````````
+::
+
+ ==============================================================================
+ Bidirectional Forwarding Detection (BFD) - API
+ ==============================================================================
+ activate SHA1 authentication SKIP
+ create BFD session using non-existent SHA1 (negative case) SKIP
+ create a BFD session SKIP
+ create IPv6 BFD session SKIP
+ create a BFD session (SHA1) SKIP
+ add SHA1 keys SKIP
+ change SHA1 key SKIP
+ deactivate SHA1 authentication SKIP
+ create the same BFD session twice (negative case) SKIP
+ create the same BFD session twice (negative case) (SHA1) SKIP
+ modify BFD session parameters SKIP
+ share single SHA1 key between multiple BFD sessions SKIP
+
+BFD authentication change
+`````````````````````````
::
==============================================================================
Bidirectional Forwarding Detection (BFD) (changing auth)
==============================================================================
- change auth key without disturbing session state (delayed) OK
- change auth key without disturbing session state (immediate) OK
- turn auth off without disturbing session state (delayed) OK
- turn auth off without disturbing session state (immediate) OK
- turn auth on without disturbing session state (delayed) OK
- turn auth on without disturbing session state (immediate) OK
+ change auth key without disturbing session state (delayed) SKIP
+ change auth key without disturbing session state (immediate) SKIP
+ turn auth off without disturbing session state (delayed) SKIP
+ turn auth off without disturbing session state (immediate) SKIP
+ turn auth on without disturbing session state (delayed) SKIP
+ turn auth on without disturbing session state (immediate) SKIP
+
+BFD IPv4
+````````
-BFD authentication
-``````````````````
::
==============================================================================
- Bidirectional Forwarding Detection (BFD) (SHA1 auth)
+ Bidirectional Forwarding Detection (BFD)
==============================================================================
- hold BFD session up OK
- hold BFD session up - meticulous auth OK
- session is not brought down by unauthenticated msg OK
- session is not brought down by msg with non-existent key-id OK
- session is not brought down by msg with wrong auth type OK
- simulate remote peer restart and resynchronization OK
- session is not kept alive by msgs with bad seq numbers OK
- bring BFD session up OK
+ put session admin-up and admin-down SKIP
+ configuration change while peer in demand mode SKIP
+ verify session goes down after inactivity SKIP
+ echo function SKIP
+ session goes down if echo function fails SKIP
+ echo packets looped back SKIP
+ echo function stops if echo source is removed SKIP
+ echo function stops if peer sets required min echo rx zero SKIP
+ hold BFD session up SKIP
+ immediately honor remote required min rx reduction SKIP
+ echo packets with invalid checksum don't keep a session up SKIP
+ large remote required min rx interval SKIP
+ modify detect multiplier SKIP
+ modify session - double required min rx SKIP
+ modify session - halve required min rx SKIP
+ no periodic frames outside poll sequence if remote demand set SKIP
+ test correct response to control frame with poll bit set SKIP
+ test poll sequence queueing SKIP
+ bring BFD session down SKIP
+ bring BFD session up SKIP
+ bring BFD session up - first frame looked up by address pair SKIP
+ verify slow periodic control frames while session down SKIP
+ stale echo packets don't keep a session up SKIP
+ no packets when zero remote required min rx interval SKIP
IPv6 Tests
``````````
@@ -137,6 +185,19 @@ IPv6 Tests
IPv6 FIB test OK
IPv6 Neighbour Solicitation Exceptions OK
IPv6 Router Solicitation Exceptions OK
+ ==============================================================================
+ IPv6 disabled
+ ==============================================================================
+ IP Disabled OK
+ IPv6 ND Proxy
+ ==============================================================================
+ IPv6 ND ProxyTest Case
+ ==============================================================================
+ IPv6 Proxy ND OK
+ ==============================================================================
+ IPv6 routes via NULL
+ ==============================================================================
+ IP NULL route OK
SPAN Test
`````````
@@ -158,14 +219,49 @@ GRE Tests
GRE tunnel L2 Tests OK
GRE tunnel VRF Tests OK
-SNAT Test Cases
-```````````````
+L2BD Multi-instance
+```````````````````
+::
+
+ ==============================================================================
+ L2BD Multi-instance Test Case
+ ==============================================================================
+ L2BD Multi-instance test 1 - create 5 BDs SKIP
+ L2BD Multi-instance test 2 - update data of 5 BDs SKIP
+ L2BD Multi-instance 3 - delete 2 BDs SKIP
+ L2BD Multi-instance test 4 - add 2 BDs SKIP
+ L2BD Multi-instance 5 - delete 5 BDs SKIP
+
+MAP Tests
+`````````
+::
+
+ ==============================================================================
+ MAP Test Case
+ ==============================================================================
+ MAP-E OK
+
+LISP tests
+``````````
+::
+
+ ==============================================================================
+ Basic LISP test
+ ==============================================================================
+ Test case for basic encapsulation OK
+
+NAT Test Cases
+``````````````
::
==============================================================================
SNAT Test Cases
==============================================================================
SNAT dynamic translation test OK
+ SNAT handling of client packets with TTL=1 OK
+ SNAT handling of error responses to client packets with TTL=2 OK
+ SNAT handling of server packets with TTL=1 OK
+ SNAT handling of error responses to server packets with TTL=2 OK
SNAT hairpinning OK
SNAT multiple inside interfaces with overlapping address space OK
Acquire SNAT addresses from interface OK
@@ -174,12 +270,20 @@ SNAT Test Cases
S-NAT IPFIX logging NAT44 session created/delted OK
MAX translations per user - recycle the least recently used OK
SNAT multiple inside interfaces (non-overlapping address space) OK
+ Ping internal host from outside network OK
+ Ping SNAT out interface from outside network OK
S-NAT add pool addresses to FIB OK
SNAT 1:1 NAT initialized from inside network OK
SNAT 1:1 NAT initialized from outside network OK
SNAT 1:1 NAT VRF awareness OK
SNAT 1:1 NAT with port initialized from inside network OK
SNAT 1:1 NAT with port initialized from outside network OK
+ S-NAT tenant VRF independent address pool mode OK
+ S-NAT tenant VRF aware address pool mode OK
+ ==============================================================================
+ Deterministic NAT Test Cases
+ ==============================================================================
+ S-NAT run deterministic mode OK
L2XC Multi-instance
```````````````````
@@ -201,6 +305,14 @@ IPv4 Tests
IPv4 Test Case
==============================================================================
IPv4 FIB test OK
+ ==============================================================================
+ IPv4 routes via NULL
+ ==============================================================================
+ IP NULL route OK
+ ==============================================================================
+ IPv4 disabled
+ ==============================================================================
+ IP Disabled OK
IPv4 FIB CRUD
`````````````
@@ -224,6 +336,36 @@ IRB Tests
IPv4 IRB test 1 OK
IPv4 IRB test 2 OK
+ACL Security Groups
+```````````````````
+::
+
+ ==============================================================================
+ ACL plugin Test Case
+ ==============================================================================
+ ACL plugin version check; learn MACs OK
+ ACL create test OK
+ permit ACL apply test OK
+ deny ACL apply test OK
+ VPP_624 permit ICMPv4 OK
+ VPP_624 permit ICMPv6 OK
+ VPP_624 deny ICMPv4 OK
+ VPP_624 deny ICMPv6 OK
+ permit TCPv4 OK
+ permit TCPv6 OK
+ permit UDPv4 OK
+ permit UDPv6 OK
+ deny TCPv4/v6 OK
+ deny UDPv4/v6 OK
+ verify add/dump acls OK
+ permit single TCPv4 OK
+ permit single UDPv4 OK
+ permit single TCPv6 OK
+ permit single UPPv6 OK
+ deny single TCPv4/v6 OK
+ deny single UDPv4/v6 OK
+ deny single UDPv4/v6, permit ip any, verify non-initial fragment blocked OK
+
MPLS Tests
``````````
::
@@ -238,6 +380,22 @@ MPLS Tests
MPLS Tunnel Tests OK
MPLS V4 Explicit NULL test OK
MPLS V6 Explicit NULL test OK
+ ==============================================================================
+ MPLS disabled
+ ==============================================================================
+ MPLS Disabled OK
+
+IPv6 VRF Multi-instance
+```````````````````````
+::
+
+ ==============================================================================
+ IP6 VRF Multi-instance Test Case
+ ==============================================================================
+ IP6 VRF Multi-instance test 1 - create 4 VRFs OK
+ IP6 VRF Multi-instance test 2 - reset 2 VRFs OK
+ IP6 VRF Multi-instance 3 - add 2 VRFs OK
+ IP6 VRF Multi-instance test 4 - reset 4 VRFs OK
L2XC Tests
``````````
@@ -249,6 +407,27 @@ L2XC Tests
L2XC dual-loop test OK
L2XC single-loop test OK
+MFIB Tests
+``````````
+::
+
+ ==============================================================================
+ MFIB Test Case
+ ==============================================================================
+ MFIB Unit Tests OK
+
+IP Multicast Tests
+``````````````````
+::
+
+ ==============================================================================
+ IP Multicast Test Case
+ ==============================================================================
+ IPv6 Multicast Replication OK
+ IP Multicast Replication OK
+ IP Multicast Connected Source check OK
+ IP Multicast Signal OK
+
Classifier
``````````
::
@@ -260,6 +439,56 @@ Classifier
MAC ACL test OK
IP PBR test OK
+IRB Tests
+`````````
+::
+
+ ==============================================================================
+ IRB Test Case
+ ==============================================================================
+ ACL plugin prepare OK
+ ACL IPv6 routed -> bridged, L2 ACL deny OK
+ ACL IPv6 routed -> bridged, L3 ACL deny OK
+ ACL IPv4 routed -> bridged, L2 ACL deny OK
+ ACL IPv4 routed -> bridged, L3 ACL deny OK
+ ACL IPv6 bridged -> routed, L2 ACL deny OK
+ ACL IPv6 bridged -> routed, L3 ACL deny OK
+ ACL IPv4 bridged -> routed, L2 ACL deny OK
+ ACL IPv4 bridged -> routed, L3 ACL deny OK
+ ACL IPv6 routed -> bridged, L2 ACL permit+reflect OK
+ ACL IPv6 bridged -> routed, L2 ACL permit+reflect OK
+ ACL IPv4 routed -> bridged, L2 ACL permit+reflect OK
+ ACL IPv4 bridged -> routed, L2 ACL permit+reflect OK
+ ACL IPv6 routed -> bridged, L3 ACL permit+reflect OK
+ ACL IPv6 bridged -> routed, L3 ACL permit+reflect OK
+ ACL IPv4 routed -> bridged, L3 ACL permit+reflect OK
+ ACL IPv4 bridged -> routed, L3 ACL permit+reflect OK
+ ACL IPv6+EH routed -> bridged, L2 ACL deny OK
+ ACL IPv6+EH routed -> bridged, L3 ACL deny OK
+ ACL IPv6+EH bridged -> routed, L2 ACL deny OK
+ ACL IPv6+EH bridged -> routed, L3 ACL deny OK
+ ACL IPv6+EH routed -> bridged, L2 ACL permit+reflect OK
+ ACL IPv6+EH bridged -> routed, L2 ACL permit+reflect OK
+ ACL IPv6+EH routed -> bridged, L3 ACL permit+reflect OK
+ ACL IPv6+EH bridged -> routed, L3 ACL permit+reflect OK
+ ACL IPv4+MF routed -> bridged, L2 ACL deny OK
+ ACL IPv4+MF routed -> bridged, L3 ACL deny OK
+ ACL IPv4+MF bridged -> routed, L2 ACL deny OK
+ ACL IPv4+MF bridged -> routed, L3 ACL deny OK
+ ACL IPv4+MF routed -> bridged, L2 ACL permit+reflect OK
+ ACL IPv4+MF bridged -> routed, L2 ACL permit+reflect OK
+ ACL IPv4+MF routed -> bridged, L3 ACL permit+reflect OK
+ ACL IPv4+MF bridged -> routed, L3 ACL permit+reflect OK
+ ACL plugin set old L2 datapath OK
+ ACL IPv6 routed -> bridged, L2 ACL deny OK
+ ACL IPv6 routed -> bridged, L3 ACL deny OK
+ ACL IPv4 routed -> bridged, L2 ACL deny OK
+ ACL IPv4 routed -> bridged, L3 ACL deny OK
+ ACL IPv6 bridged -> routed, L2 ACL deny OK
+ ACL IPv6 bridged -> routed, L3 ACL deny OK
+ ACL IPv4 bridged -> routed, L2 ACL deny OK
+ ACL IPv4 bridged -> routed, L3 ACL deny OK
+
VXLAN Tests
```````````
::
@@ -285,6 +514,17 @@ L2 FIB CRUD
L2 FIB test 3 - program new 100 MAC addresses OK
L2 FIB test 4 - delete 160 MAC entries OK
+ARP Tests
+`````````
+::
+
+ ==============================================================================
+ ARP Test Case
+ ==============================================================================
+ ARP OK
+ MPLS OK
+ Proxy ARP OK
+
L2BD Tests
``````````
::
p">("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } M (IKEV2_PROFILE_ADD_DEL, mp); clib_memcpy (mp->name, name, vec_len (name)); mp->is_add = is_add; vec_free (name); S (mp); W (ret); return ret; } static int api_ikev2_profile_set_auth (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_profile_set_auth_t *mp; u8 *name = 0; u8 *data = 0; u32 auth_method = 0; u8 is_hex = 0; int ret; const char *valid_chars = "a-zA-Z0-9_"; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "name %U", unformat_token, valid_chars, &name)) vec_add1 (name, 0); else if (unformat (i, "auth_method %U", unformat_ikev2_auth_method, &auth_method)) ; else if (unformat (i, "auth_data 0x%U", unformat_hex_string, &data)) is_hex = 1; else if (unformat (i, "auth_data %v", &data)) ; else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } if (!vec_len (data)) { errmsg ("auth_data must be specified"); return -99; } if (!auth_method) { errmsg ("auth_method must be specified"); return -99; } M (IKEV2_PROFILE_SET_AUTH, mp); mp->is_hex = is_hex; mp->auth_method = (u8) auth_method; mp->data_len = vec_len (data); clib_memcpy (mp->name, name, vec_len (name)); clib_memcpy (mp->data, data, vec_len (data)); vec_free (name); vec_free (data); S (mp); W (ret); return ret; } static int api_ikev2_profile_set_id (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_profile_set_id_t *mp; u8 *name = 0; u8 *data = 0; u8 is_local = 0; u32 id_type = 0; ip4_address_t ip4; int ret; const char *valid_chars = "a-zA-Z0-9_"; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "name %U", unformat_token, valid_chars, &name)) vec_add1 (name, 0); else if (unformat (i, "id_type %U", unformat_ikev2_id_type, &id_type)) ; else if (unformat (i, "id_data %U", unformat_ip4_address, &ip4)) { data = vec_new (u8, 4); clib_memcpy (data, ip4.as_u8, 4); } else if (unformat (i, "id_data 0x%U", unformat_hex_string, &data)) ; else if (unformat (i, "id_data %v", &data)) ; else if (unformat (i, "local")) is_local = 1; else if (unformat (i, "remote")) is_local = 0; else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } if (!vec_len (data)) { errmsg ("id_data must be specified"); return -99; } if (!id_type) { errmsg ("id_type must be specified"); return -99; } M (IKEV2_PROFILE_SET_ID, mp); mp->is_local = is_local; mp->id_type = (u8) id_type; mp->data_len = vec_len (data); clib_memcpy (mp->name, name, vec_len (name)); clib_memcpy (mp->data, data, vec_len (data)); vec_free (name); vec_free (data); S (mp); W (ret); return ret; } static int api_ikev2_profile_set_ts (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_profile_set_ts_t *mp; u8 *name = 0; u8 is_local = 0; u32 proto = 0, start_port = 0, end_port = (u32) ~ 0; ip4_address_t start_addr, end_addr; const char *valid_chars = "a-zA-Z0-9_"; int ret; start_addr.as_u32 = 0; end_addr.as_u32 = (u32) ~ 0; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "name %U", unformat_token, valid_chars, &name)) vec_add1 (name, 0); else if (unformat (i, "protocol %d", &proto)) ; else if (unformat (i, "start_port %d", &start_port)) ; else if (unformat (i, "end_port %d", &end_port)) ; else if (unformat (i, "start_addr %U", unformat_ip4_address, &start_addr)) ; else if (unformat (i, "end_addr %U", unformat_ip4_address, &end_addr)) ; else if (unformat (i, "local")) is_local = 1; else if (unformat (i, "remote")) is_local = 0; else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } M (IKEV2_PROFILE_SET_TS, mp); mp->is_local = is_local; mp->proto = (u8) proto; mp->start_port = (u16) start_port; mp->end_port = (u16) end_port; mp->start_addr = start_addr.as_u32; mp->end_addr = end_addr.as_u32; clib_memcpy (mp->name, name, vec_len (name)); vec_free (name); S (mp); W (ret); return ret; } static int api_ikev2_set_local_key (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_set_local_key_t *mp; u8 *file = 0; int ret; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "file %v", &file)) vec_add1 (file, 0); else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (file)) { errmsg ("RSA key file must be specified"); return -99; } if (vec_len (file) > 256) { errmsg ("file name too long"); return -99; } M (IKEV2_SET_LOCAL_KEY, mp); clib_memcpy (mp->key_file, file, vec_len (file)); vec_free (file); S (mp); W (ret); return ret; } static int api_ikev2_profile_set_udp_encap (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_set_responder_t *mp; int ret; u8 *name = 0; const char *valid_chars = "a-zA-Z0-9_"; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "%U udp-encap", unformat_token, valid_chars, &name)) vec_add1 (name, 0); else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } M (IKEV2_PROFILE_SET_UDP_ENCAP, mp); clib_memcpy (mp->name, name, vec_len (name)); vec_free (name); S (mp); W (ret); return ret; } static int api_ikev2_set_tunnel_interface (vat_main_t * vam) { return (0); } static int api_ikev2_set_responder (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_set_responder_t *mp; int ret; u8 *name = 0; u32 sw_if_index = ~0; ip4_address_t address; const char *valid_chars = "a-zA-Z0-9_"; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "%U interface %d address %U", unformat_token, valid_chars, &name, &sw_if_index, unformat_ip4_address, &address)) vec_add1 (name, 0); else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } M (IKEV2_SET_RESPONDER, mp); clib_memcpy (mp->name, name, vec_len (name)); vec_free (name); mp->sw_if_index = sw_if_index; clib_memcpy (mp->address, &address, sizeof (address)); S (mp); W (ret); return ret; } static int api_ikev2_set_ike_transforms (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_set_ike_transforms_t *mp; int ret; u8 *name = 0; u32 crypto_alg, crypto_key_size, integ_alg, dh_group; const char *valid_chars = "a-zA-Z0-9_"; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "%U %d %d %d %d", unformat_token, valid_chars, &name, &crypto_alg, &crypto_key_size, &integ_alg, &dh_group)) vec_add1 (name, 0); else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } M (IKEV2_SET_IKE_TRANSFORMS, mp); clib_memcpy (mp->name, name, vec_len (name)); vec_free (name); mp->crypto_alg = crypto_alg; mp->crypto_key_size = crypto_key_size; mp->integ_alg = integ_alg; mp->dh_group = dh_group; S (mp); W (ret); return ret; } static int api_ikev2_set_esp_transforms (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_set_esp_transforms_t *mp; int ret; u8 *name = 0; u32 crypto_alg, crypto_key_size, integ_alg, dh_group; const char *valid_chars = "a-zA-Z0-9_"; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "%U %d %d %d %d", unformat_token, valid_chars, &name, &crypto_alg, &crypto_key_size, &integ_alg, &dh_group)) vec_add1 (name, 0); else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } M (IKEV2_SET_ESP_TRANSFORMS, mp); clib_memcpy (mp->name, name, vec_len (name)); vec_free (name); mp->crypto_alg = crypto_alg; mp->crypto_key_size = crypto_key_size; mp->integ_alg = integ_alg; mp->dh_group = dh_group; S (mp); W (ret); return ret; } static int api_ikev2_set_sa_lifetime (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_set_sa_lifetime_t *mp; int ret; u8 *name = 0; u64 lifetime, lifetime_maxdata; u32 lifetime_jitter, handover; const char *valid_chars = "a-zA-Z0-9_"; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "%U %lu %u %u %lu", unformat_token, valid_chars, &name, &lifetime, &lifetime_jitter, &handover, &lifetime_maxdata)) vec_add1 (name, 0); else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } M (IKEV2_SET_SA_LIFETIME, mp); clib_memcpy (mp->name, name, vec_len (name)); vec_free (name); mp->lifetime = lifetime; mp->lifetime_jitter = lifetime_jitter; mp->handover = handover; mp->lifetime_maxdata = lifetime_maxdata; S (mp); W (ret); return ret; } static int api_ikev2_initiate_sa_init (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_initiate_sa_init_t *mp; int ret; u8 *name = 0; const char *valid_chars = "a-zA-Z0-9_"; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "%U", unformat_token, valid_chars, &name)) vec_add1 (name, 0); else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } if (!vec_len (name)) { errmsg ("profile name must be specified"); return -99; } if (vec_len (name) > 64) { errmsg ("profile name too long"); return -99; } M (IKEV2_INITIATE_SA_INIT, mp); clib_memcpy (mp->name, name, vec_len (name)); vec_free (name); S (mp); W (ret); return ret; } static int api_ikev2_initiate_del_ike_sa (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_initiate_del_ike_sa_t *mp; int ret; u64 ispi; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "%lx", &ispi)) ; else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } M (IKEV2_INITIATE_DEL_IKE_SA, mp); mp->ispi = ispi; S (mp); W (ret); return ret; } static int api_ikev2_initiate_del_child_sa (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_initiate_del_child_sa_t *mp; int ret; u32 ispi; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "%x", &ispi)) ; else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } M (IKEV2_INITIATE_DEL_CHILD_SA, mp); mp->ispi = ispi; S (mp); W (ret); return ret; } static int api_ikev2_initiate_rekey_child_sa (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_ikev2_initiate_rekey_child_sa_t *mp; int ret; u32 ispi; while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "%x", &ispi)) ; else { errmsg ("parse error '%U'", format_unformat_error, i); return -99; } } M (IKEV2_INITIATE_REKEY_CHILD_SA, mp); mp->ispi = ispi; S (mp); W (ret); return ret; } #include <ikev2/ikev2.api_test.c> /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */