VPPAPIGEN: vppapigen replacement in Python PLY.
[vpp.git] / src / plugins / kubeproxy / kp.api
1 /*
2  * Copyright (c) 2017 Intel and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 option version = "1.0.0";
17
18 /** \brief Configure Kube-proxy global parameters
19     @param client_index - opaque cookie to identify the sender
20     @param context - sender context, to match reply w/ request
21     @param sticky_buckets_per_core - Number of buckets *per worker thread* in the
22            established flow table (must be power of 2).
23     @param flow_timeout - Time in seconds after which, if no packet is received
24            for a given flow, the flow is removed from the established flow table.
25 */
26 autoreply define kp_conf
27 {
28   u32 client_index;
29   u32 context;
30   u32 sticky_buckets_per_core;
31   u32 flow_timeout;
32 };
33
34 /** \brief Add a virtual address (or prefix)
35     @param client_index - opaque cookie to identify the sender
36     @param context - sender context, to match reply w/ request
37     @param ip_prefix - IP address (IPv4 in lower order 32 bits).
38     @param prefix_length - IP prefix length (96 + 'IPv4 prefix length' for IPv4).
39     @param is_ipv6 - Is IPv6 addresss.
40     @param port - service port;
41     @param target_port - Pod's port corresponding to specific service.
42     @param node_port - Node's port.
43     @param is_nat4 - DNAT is NAT44 (NAT64 otherwise).
44     @param new_flows_table_length - Size of the new connections flow table used
45            for this VIP (must be power of 2).
46     @param is_del - The VIP should be removed.
47 */
48 autoreply define kp_add_del_vip {
49   u32 client_index;
50   u32 context;
51   u8 ip_prefix[16];
52   u8 prefix_length;
53   u8 is_ipv6;
54   u16 port;
55   u16 target_port;
56   u16 node_port;
57   u8 is_nat4;
58   u32 new_flows_table_length;
59   u8 is_del;
60 };
61
62 /** \brief Add a pod for a given VIP
63     @param client_index - opaque cookie to identify the sender
64     @param context - sender context, to match reply w/ request
65     @param vip_ip_prefix - VIP IP address (IPv4 in lower order 32 bits).
66     @param vip_ip_prefix - VIP IP prefix length (96 + 'IPv4 prefix length' for IPv4).
67     @param vip_is_ipv6 - VIP is IPv6 addresss.
68     @param pod_address - The pod's IP address (IPv4 in lower order 32 bits).
69     @param pod_is_ipv6 - Pod is IPv6 addresss.
70     @param is_del - The Pod should be removed.
71 */
72 autoreply define kp_add_del_pod {
73   u32 client_index;
74   u32 context;
75   u8 vip_ip_prefix[16];
76   u8 vip_prefix_length;
77   u8 vip_is_ipv6;
78   u8 pod_address[16];
79   u8 pod_is_ipv6;
80   u8 is_del;
81 };