api: add missing version info
[vpp.git] / src / plugins / lb / lb_types.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2019 Vinci Consulting Corp.  All Rights Reserved.
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 option version = "1.0.0";
17 import "vnet/ip/ip_types.api";
18
19 enum lb_srv_type
20 {
21   LB_API_SRV_TYPE_CLUSTERIP = 0,
22   LB_API_SRV_TYPE_NODEPORT = 1,
23   LB_API_SRV_N_TYPES = 2,
24 };
25
26 enum lb_encap_type
27 {
28   LB_API_ENCAP_TYPE_GRE4 = 0,
29   LB_API_ENCAP_TYPE_GRE6 = 1,
30   LB_API_ENCAP_TYPE_L3DSR = 2,
31   LB_API_ENCAP_TYPE_NAT4 = 3 ,
32   LB_API_ENCAP_TYPE_NAT6 =4,
33   LB_API_ENCAP_N_TYPES =5,
34 };
35
36 /* Lookup types */
37 enum lb_lkp_type_t
38 {
39   LB_API_LKP_SAME_IP_PORT = 0,
40   LB_API_LKP_DIFF_IP_PORT = 1,
41   LB_API_LKP_ALL_PORT_IP =2,
42   LB_API_LKP_N_TYPES =3,
43 };
44
45 enum lb_vip_type
46 {
47   LB_API_VIP_TYPE_IP6_GRE6 = 0,
48   LB_API_VIP_TYPE_IP6_GRE4 = 1,
49   LB_API_VIP_TYPE_IP4_GRE6 = 2,
50   LB_API_VIP_TYPE_IP4_GRE4 = 3,
51   LB_API_VIP_TYPE_IP4_L3DSR = 4,
52   LB_API_VIP_TYPE_IP4_NAT4 = 5,
53   LB_API_VIP_TYPE_IP6_NAT6 = 6,
54   LB_API_VIP_N_TYPES = 7,
55 };
56
57 enum lb_nat_protocol
58 {
59   LB_API_NAT_PROTOCOL_UDP = 0x06,
60   LB_API_NAT_PROTOCOL_TCP = 0x17,
61   LB_API_NAT_PROTOCOL_ANY = 0xffffffff,
62 };
63
64 /** \brief Define connection statistics structure
65     @param pfx - ip prefix and length
66     @param protocol - tcp or udp.
67     @param port - destination port.
68 */
69 typedef lb_vip
70 {
71   vl_api_address_with_prefix_t pfx;
72   vl_api_ip_proto_t protocol;
73   u16 port;
74 };