1 option version = "1.0.0";
2 import "plugins/lb/lb_types.api";
3 import "vnet/interface_types.api";
5 /** \brief Configure Load-Balancer global parameters (unlike the CLI, both ip4_src_address and ip6_src_address need to be specified.
6 @param client_index - opaque cookie to identify the sender
7 @param context - sender context, to match reply w/ request
8 @param ip4_src_address - IPv4 address to be used as source for IPv4 traffic(applicable in GRE4/GRE6/NAT4/NAT6 mode only).
9 @param ip6_src_address - IPv6 address to be used as source for IPv6 traffic(applicable in GRE4/GRE6/NAT4/NAT6 mode only).
10 @param sticky_buckets_per_core - Number of buckets *per worker thread* in the
11 established flow table (must be power of 2).
12 @param flow_timeout - Time in seconds after which, if no packet is received
13 for a given flow, the flow is removed from the established flow table.
15 autoreply manual_print define lb_conf
19 vl_api_ip4_address_t ip4_src_address;
20 vl_api_ip6_address_t ip6_src_address;
21 u32 sticky_buckets_per_core;
25 /** \brief Add a virtual address (or prefix)
26 @param client_index - opaque cookie to identify the sender
27 @param context - sender context, to match reply w/ request
28 @param pfx - ip prefix and length
29 @param protocol - tcp or udp.
30 @param port - destination port. (0) means 'all-port VIP'
31 @param encap - Encap is ip4 GRE(0) or ip6 GRE(1) or L3DSR(2) or NAT4(3) or NAT6(4).
32 @param dscp - DSCP bit corresponding to VIP(applicable in L3DSR mode only).
33 @param type - service type(applicable in NAT4/NAT6 mode only).
34 @param target_port - Pod's port corresponding to specific service(applicable in NAT4/NAT6 mode only).
35 @param node_port - Node's port(applicable in NAT4/NAT6 mode only).
36 @param new_flows_table_length - Size of the new connections flow table used
37 for this VIP (must be power of 2).
38 @param is_del - The VIP should be removed.
40 autoreply manual_print define lb_add_del_vip {
43 vl_api_address_with_prefix_t pfx;
44 u8 protocol [default=255];
46 vl_api_lb_encap_type_t encap;
48 vl_api_lb_srv_type_t type ; /* LB_API_SRV_TYPE_CLUSTERIP */
51 u32 new_flows_table_length [default=1024];
55 /** \brief Add an application server for a given VIP
56 @param client_index - opaque cookie to identify the sender
57 @param context - sender context, to match reply w/ request
58 @param pfx - ip prefix and length
59 @param protocol - tcp or udp.
60 @param port - destination port.
61 @param as_address - The application server address (IPv4 in lower order 32 bits).
62 @param is_del - The AS should be removed.
63 @param is_flush - The sessions related to this AS should be flushed.
65 autoreply manual_print define lb_add_del_as {
68 vl_api_address_with_prefix_t pfx;
69 u8 protocol [default=255];
71 vl_api_address_t as_address;
76 /** \brief Flush a given vip
77 @param client_index - opaque cookie to identify the sender
78 @param context - sender context, to match reply w/ request
79 @param pfx - ip prefix and length
80 @param protocol - tcp or udp.
81 @param port - destination port.
83 autoreply manual_print define lb_flush_vip {
86 vl_api_address_with_prefix_t pfx;
91 /** \brief Dump all vips
92 @param client_index - opaque cookie to identify the sender
93 @param context - sender context, to match reply w/ request
98 vl_api_address_with_prefix_t pfx;
99 vl_api_prefix_matcher_t pfx_matcher;
100 u8 protocol [default=255];
105 /** \brief Reply all configured vip
106 @param context - sender context, to match reply w/ request
107 @param vip - all vip addrs.
109 define lb_vip_details {
112 vl_api_lb_encap_type_t encap;
113 vl_api_ip_dscp_t dscp;
114 vl_api_lb_srv_type_t srv_type;
116 u16 flow_table_length;
119 /** \brief dump AS list per VIP or all ASs for all VIPs
120 @param client_index - opaque cookie to identify the sender
121 @param context - sender context, to match reply w/ request
122 @param pfx - ip prefix and length.
123 @param protocol - tcp or udp.
124 @param port - destination port.
130 vl_api_address_with_prefix_t pfx;
135 /** \brief lb_as_details
136 @param context - sender context, to match reply w/ request
137 @param as - AS detail record
139 define lb_as_details {
142 vl_api_address_t app_srv;
147 /** \brief Enable/disable NAT4 feature on the interface
148 @param client_index - opaque cookie to identify the sender
149 @param context - sender context, to match reply w/ request
150 @param is_add - true if add, false if delete
151 @param sw_if_index - software index of the interface
153 autoreply define lb_add_del_intf_nat4 {
157 vl_api_interface_index_t sw_if_index;
160 /** \brief Enable/disable NAT6 feature on the interface
161 @param client_index - opaque cookie to identify the sender
162 @param context - sender context, to match reply w/ request
163 @param is_add - true if add, false if delete
164 @param sw_if_index - software index of the interface
166 autoreply define lb_add_del_intf_nat6 {
170 vl_api_interface_index_t sw_if_index;