X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Flb%2Flb.api;h=190e32011b32323fa95714b142b2a3f6c2ef8bb1;hb=f7f13347bc8bc941a2d9aa847ddd88a758d65f71;hp=a9f05f253c53f6d9cf977cc50d4e94ce1fc5619b;hpb=d92a0b553fd2872b4fcda25994aaa8852d254824;p=vpp.git diff --git a/src/plugins/lb/lb.api b/src/plugins/lb/lb.api index a9f05f253c5..190e32011b3 100644 --- a/src/plugins/lb/lb.api +++ b/src/plugins/lb/lb.api @@ -1,6 +1,7 @@ option version = "1.0.0"; +import "vnet/ip/ip_types.api"; -/** \brief Configure Load-Balancer global parameters +/** \brief Configure Load-Balancer global parameters (unlike the CLI, both ip4_src_address and ip6_src_address need to be specified. @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @param ip4_src_address - IPv4 address to be used as source for IPv4 traffic(applicable in GRE4/GRE6/NAT4/NAT6 mode only). @@ -14,8 +15,8 @@ autoreply define lb_conf { u32 client_index; u32 context; - u32 ip4_src_address; - u8 ip6_src_address[16]; + vl_api_ip4_address_t ip4_src_address; + vl_api_ip6_address_t ip6_src_address; u32 sticky_buckets_per_core; u32 flow_timeout; }; @@ -25,10 +26,11 @@ autoreply define lb_conf @param context - sender context, to match reply w/ request @param ip_prefix - IP address (IPv4 in lower order 32 bits). @param prefix_length - IP prefix length (96 + 'IPv4 prefix length' for IPv4). + @param protocol - tcp or udp. + @param port - destination port. (0) means 'all-port VIP' @param encap - Encap is ip4 GRE(0) or ip6 GRE(1) or L3DSR(2) or NAT4(3) or NAT6(4). @param dscp - DSCP bit corresponding to VIP(applicable in L3DSR mode only). @param type - service type(applicable in NAT4/NAT6 mode only). - @param port - service port(applicable in NAT4/NAT6 mode only). @param target_port - Pod's port corresponding to specific service(applicable in NAT4/NAT6 mode only). @param node_port - Node's port(applicable in NAT4/NAT6 mode only). @param new_flows_table_length - Size of the new connections flow table used @@ -40,10 +42,11 @@ autoreply define lb_add_del_vip { u32 context; u8 ip_prefix[16]; u8 prefix_length; + u8 protocol; + u16 port; u8 encap; u8 dscp; u8 type; - u16 port; u16 target_port; u16 node_port; u32 new_flows_table_length; @@ -54,15 +57,38 @@ autoreply define lb_add_del_vip { @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @param vip_ip_prefix - VIP IP address (IPv4 in lower order 32 bits). - @param vip_ip_prefix - VIP IP prefix length (96 + 'IPv4 prefix length' for IPv4). + @param vip_prefix_length - VIP IP prefix length (96 + 'IPv4 prefix length' for IPv4). + @param protocol - tcp or udp. + @param port - destination port. @param as_address - The application server address (IPv4 in lower order 32 bits). @param is_del - The AS should be removed. + @param is_flush - The sessions related to this AS should be flushed. */ autoreply define lb_add_del_as { u32 client_index; u32 context; u8 vip_ip_prefix[16]; u8 vip_prefix_length; + u8 protocol; + u16 port; u8 as_address[16]; u8 is_del; + u8 is_flush; +}; + +/** \brief Flush a given vip + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param ip_prefix - IP address (IPv4 in lower order 32 bits). + @param prefix_length - IP prefix length (96 + 'IPv4 prefix length' for IPv4). + @param protocol - tcp or udp. + @param port - destination port. +*/ +autoreply define lb_flush_vip { + u32 client_index; + u32 context; + u8 ip_prefix[16]; + u8 prefix_length; + u8 protocol; + u16 port; };