ikev2: refactor and test profile dump API
[vpp.git] / src / plugins / ikev2 / ikev2_types.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2015-2016 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 import "vnet/ip/ip_types.api";
19 import "vnet/interface_types.api";
20
21 typedef ikev2_id
22 {
23   u8 type;
24   u8 data_len;
25   string data[64];
26 };
27
28 typedef ikev2_ts
29 {
30   bool is_local;
31   u8 protocol_id;
32   u16 start_port;
33   u16 end_port;
34   vl_api_ip4_address_t start_addr;
35   vl_api_ip4_address_t end_addr;
36 };
37
38 typedef ikev2_auth
39 {
40   u8 method;
41   u8 hex;                       /* hex encoding of the shared secret */
42   u32 data_len;
43   u8 data[data_len];
44 };
45
46 typedef ikev2_responder
47 {
48   vl_api_interface_index_t sw_if_index;
49   vl_api_ip4_address_t ip4;
50 };
51
52 typedef ikev2_ike_transforms
53 {
54   u8 crypto_alg;
55   u32 crypto_key_size;
56   u8 integ_alg;
57   u8 dh_group;
58 };
59
60 typedef ikev2_esp_transforms
61 {
62   u8 crypto_alg;
63   u32 crypto_key_size;
64   u8 integ_alg;
65 };
66
67 typedef ikev2_profile
68 {
69   string name[64];
70   vl_api_ikev2_id_t loc_id;
71   vl_api_ikev2_id_t rem_id;
72   vl_api_ikev2_ts_t loc_ts;
73   vl_api_ikev2_ts_t rem_ts;
74   vl_api_ikev2_responder_t responder;
75   vl_api_ikev2_ike_transforms_t ike_ts;
76   vl_api_ikev2_esp_transforms_t esp_ts;
77   u64 lifetime;
78   u64 lifetime_maxdata;
79   u32 lifetime_jitter;
80   u32 handover;
81   u16 ipsec_over_udp_port;
82   u32 tun_itf;
83   bool udp_encap;
84   vl_api_ikev2_auth_t auth;
85 };