X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip.api;h=b37530ef955fed962d51022a69ea38d88ae8d32d;hb=9db6ada77;hp=39d394f709dfad20a75885f6d176dffd45b6215d;hpb=48ae19e9096fab98b14eaddaaa73e1b54bcbda8d;p=vpp.git diff --git a/src/vnet/ip/ip.api b/src/vnet/ip/ip.api index 39d394f709d..b37530ef955 100644 --- a/src/vnet/ip/ip.api +++ b/src/vnet/ip/ip.api @@ -20,87 +20,172 @@ called through a shared memory interface. */ -option version = "2.0.0"; -import "vnet/ip/ip_types.api"; +option version = "3.0.0"; + import "vnet/fib/fib_types.api"; import "vnet/ethernet/ethernet_types.api"; +import "vnet/mfib/mfib_types.api"; -/** \brief Add / del table request - A table can be added multiple times, but need be deleted only once. - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request +/** \brief An IP table @param is_ipv6 - V4 or V6 table @param table_id - table ID associated with the route - This table ID will apply to both the unicats + This table ID will apply to both the unicats and mlticast FIBs @param name - A client provided name/tag for the table. If this is not set by the client, then VPP will generate something meaningfull. */ +typedef ip_table +{ + u32 table_id; + u8 is_ip6; + u8 name[64]; +}; + +/** \brief Add / del table request + A table can be added multiple times, but need be deleted only once. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ autoreply define ip_table_add_del { u32 client_index; u32 context; - u32 table_id; - u8 is_ipv6; u8 is_add; - u8 name[64]; + vl_api_ip_table_t table; +}; + +/** \brief Dump IP all fib tables + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define ip_table_dump +{ + u32 client_index; + u32 context; +}; + +/** \brief IP table replace being + + The use-case is that, for some unspecified reason, the control plane + has a very different set of entries it wants in the table than VPP + currently has. The CP would thus like to 'replace' VPP's current table + only by specifying what the new set of entries shall be, i.e. it is not + going to delete anything that already eixts. + the CP delcartes the start of this procedure with this begin_replace + API Call, and when it has populated all the entries it wants, it calls + the below end_replace API. From this point on it is of coursce free + to add and delete entries as usual. + The underlying mechanism by which VPP implements this replace is + purposefully left unspecified. + + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param table - The table to resync +*/ +autoreply define ip_table_replace_begin +{ + u32 client_index; + u32 context; + vl_api_ip_table_t table; +}; + +/** \brief IP table replace end + + see replace start/ + + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param table - The table that has converged +*/ +autoreply define ip_table_replace_end +{ + u32 client_index; + u32 context; + vl_api_ip_table_t table; }; -/** \brief Dump IP fib table +/** \brief IP table flush + Flush a table of all routes @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param table - The table to flush */ -define ip_fib_dump +autoreply define ip_table_flush { u32 client_index; u32 context; + vl_api_ip_table_t table; }; /** \brief IP FIB table response - @param table_id - IP fib table id - @address_length - mask length - @address - ip4 prefix - @param count - the number of fib_path in path - @param path - array of of fib_path structures + @param context - sender context + @param table - description of the table */ -manual_endian manual_print define ip_fib_details +manual_endian manual_print define ip_table_details { u32 context; + vl_api_ip_table_t table; +}; + +/** \brief An IP route + @param table_id The IP table the route is in + @param stats_index The index of the route in the stats segment + @param prefix the prefix for the route + @param n_paths The number of paths the route has + @param paths The paths of the route +*/ +typedef ip_route +{ u32 table_id; - u8 table_name[64]; - u8 address_length; - u8 address[4]; - u32 count; u32 stats_index; - vl_api_fib_path_t path[count]; + vl_api_prefix_t prefix; + u8 n_paths; + vl_api_fib_path_t paths[n_paths]; }; -/** \brief Dump IP6 fib table +/** \brief Add / del route request @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param is_multipath - Set to 1 if these paths will be added/removed + to/from the existing set, or 0 to replace + the existing set. + is_add=0 & is_multipath=0 implies delete all paths + @param is_add - Are the paths being added or removed */ -define ip6_fib_dump +define ip_route_add_del { u32 client_index; u32 context; + u8 is_add; + u8 is_multipath; + vl_api_ip_route_t route; +}; +define ip_route_add_del_reply +{ + u32 context; + i32 retval; + u32 stats_index; }; -/** \brief IP6 FIB table entry response - @param table_id - IP6 fib table id - @param address_length - mask length - @param address - ip6 prefix - @param count - the number of fib_path in path - @param path - array of of fib_path structures +/** \brief Dump IP routes from a table + @param client_index - opaque cookie to identify the sender + @param table - The table from which to dump routes (ony ID an AF are needed) */ -manual_endian manual_print define ip6_fib_details +define ip_route_dump { + u32 client_index; u32 context; - u32 table_id; - u8 table_name[64]; - u8 address_length; - u8 address[16]; - u32 count; - u32 stats_index; - vl_api_fib_path_t path[count]; + vl_api_ip_table_t table; +}; + +/** \brief IP FIB table entry response + @param route The route entry in the table +*/ +manual_endian manual_print define ip_route_details +{ + u32 context; + vl_api_ip_route_t route; }; /** \brief IP neighbor flags @@ -359,76 +444,33 @@ autoreply define sw_interface_ip6_enable_disable u8 enable; /* set to true if enable */ }; -/** \brief Add / del route request +/** \brief IPv6 set link local address on interface request @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request - @param sw_if_index - software index of the new vlan's parent interface - @param vrf_id - fib table /vrf associated with the route - @param lookup_in_vrf - - @param classify_table_index - - @param is_add - 1 if adding the route, 0 if deleting - @param is_drop - Drop the packet - @param is_unreach - Drop the packet and rate limit send ICMP unreachable - @param is_prohibit - Drop the packet and rate limit send ICMP prohibited - @param is_ipv6 - 0 if an ip4 route, else ip6 - @param is_local - The route will result in packets sent to VPP IP stack - @param is_udp_encap - The path describes a UDP-o-IP encapsulation. - @param is_classify - - @param is_multipath - Set to 1 if this is a multipath route, else 0 - @param is_dvr - Does the route resolve via a DVR interface. - @param is_source_lookup - The the path is a deaggregate path (i.e. a lookup - in another table) is the lookup on the packet's - source address or destination. - @param next_hop_weight - Weight for Unequal cost multi-path - @param next_hop_preference - Path that are up that have the best preference are - are used for forwarding. lower value is better. - @param next_hop_id - Used when the path resolves via an object that has a unique - identifier. - @param dst_address_length - - @param dst_address[16] - - @param next_hop_address[16] - - @param next_hop_n_out_labels - the number of labels in the label stack - @param next_hop_out_label_stack - the next-hop output label stack, outer most first - @param next_hop_via_label - The next-hop is a resolved via a local label + @param sw_if_index - interface to set link local on + @param address[] - the new link local address */ -define ip_add_del_route +autoreply define sw_interface_ip6_set_link_local_address { u32 client_index; u32 context; - u32 next_hop_sw_if_index; - u32 table_id; - u32 classify_table_index; - u32 next_hop_table_id; - u32 next_hop_id; - u8 is_add; - u8 is_drop; - u8 is_unreach; - u8 is_prohibit; - u8 is_ipv6; - u8 is_local; - u8 is_classify; - u8 is_multipath; - u8 is_resolve_host; - u8 is_resolve_attached; - u8 is_dvr; - u8 is_source_lookup; - u8 is_udp_encap; - u8 next_hop_weight; - u8 next_hop_preference; - u8 next_hop_proto; - u8 dst_address_length; - u8 dst_address[16]; - u8 next_hop_address[16]; - u8 next_hop_n_out_labels; - u32 next_hop_via_label; - vl_api_fib_mpls_label_t next_hop_out_label_stack[next_hop_n_out_labels]; + u32 sw_if_index; + u8 address[16]; }; -define ip_add_del_route_reply +/** \brief Dump IP multicast fib table + @param client_index - opaque cookie to identify the sender +*/ +define ip_mtable_dump { + u32 client_index; u32 context; - i32 retval; - u32 stats_index; +}; +define ip_mtable_details +{ + u32 client_index; + u32 context; + vl_api_ip_table_t table; }; /** \brief Add / del route request @@ -459,105 +501,55 @@ define ip_add_del_route_reply FIXME not complete yet */ -define ip_mroute_add_del +typedef ip_mroute { - u32 client_index; - u32 context; - u32 next_hop_sw_if_index; u32 table_id; u32 entry_flags; - u32 itf_flags; u32 rpf_id; - u32 bier_imp; - u16 grp_address_length; - u8 next_hop_afi; - u8 is_add; - u8 is_ipv6; - u8 is_local; - u8 grp_address[16]; - u8 src_address[16]; - u8 nh_address[16]; -}; - -define ip_mroute_add_del_reply -{ - u32 context; - i32 retval; - u32 stats_index; + vl_api_mprefix_t prefix; + u8 n_paths; + vl_api_mfib_path_t paths[n_paths]; }; -/** \brief Dump IP multicast fib table - @param client_index - opaque cookie to identify the sender -*/ -define ip_mfib_dump +define ip_mroute_add_del { u32 client_index; u32 context; + u8 is_add; + u8 is_multipath; + vl_api_ip_mroute_t route; }; - -/** \brief IP Multicast FIB table response - @param table_id - IP fib table id - @address_length - mask length - @grp_address - Group address/prefix - @src_address - Source address - @param count - the number of fib_path in path - @param path - array of of fib_path structures -*/ -typedef mfib_path -{ - vl_api_fib_path_t path; - u32 itf_flags; -}; - -manual_endian manual_print define ip_mfib_details +define ip_mroute_add_del_reply { u32 context; - u32 table_id; - u32 entry_flags; - u32 rpf_id; - u8 address_length; - u8 grp_address[4]; - u8 src_address[4]; - u32 count; + i32 retval; u32 stats_index; - vl_api_mfib_path_t path[count]; }; -/** \brief Dump IP6 multicast fib table - @param client_index - opaque cookie to identify the sender +/** \brief Dump IP multicast fib table + @param table - The table from which to dump routes (ony ID an AF are needed) */ -define ip6_mfib_dump +define ip_mroute_dump { u32 client_index; u32 context; + vl_api_ip_table_t table; }; -/** \brief IP6 Multicast FIB table response - @param table_id - IP fib table id - @address_length - mask length - @grp_address - Group address/prefix - @src_address - Source address - @param count - the number of fib_path in path - @param path - array of of fib_path structures +/** \brief IP Multicast Route Details + @param route - Details of the route */ -manual_endian manual_print define ip6_mfib_details +manual_endian manual_print define ip_mroute_details { u32 context; - u32 table_id; - u8 address_length; - u8 grp_address[16]; - u8 src_address[16]; - u32 count; - vl_api_mfib_path_t path[count]; + vl_api_ip_mroute_t route; }; define ip_address_details { u32 context; - u8 ip[16]; - u8 prefix_length; u32 sw_if_index; - u8 is_ipv6; + vl_api_address_with_prefix_t prefix; }; define ip_address_dump @@ -614,9 +606,7 @@ define mfib_signal_details u32 context; u32 sw_if_index; u32 table_id; - u16 grp_address_len; - u8 grp_address[16]; - u8 src_address[16]; + vl_api_mprefix_t prefix; u16 ip_packet_len; u8 ip_packet_data[256]; }; @@ -645,7 +635,7 @@ autoreply define ip_punt_police @param nh - the next-hop to redirect the traffic to. @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 */ -typeonly define punt_redirect +typedef punt_redirect { u32 rx_sw_if_index; u32 tx_sw_if_index; @@ -904,7 +894,7 @@ autoreply define want_ip6_ra_events @param valid_time - RA prefix info valid time @param preferred_time - RA prefix info preferred time */ -typeonly define ip6_ra_prefix_info +typedef ip6_ra_prefix_info { vl_api_prefix_t prefix; u8 flags; @@ -950,7 +940,7 @@ service { @param low - Low address of the Proxy ARP range @param hi - High address of the Proxy ARP range */ -typeonly define proxy_arp +typedef proxy_arp { u32 table_id; vl_api_ip4_address_t low; @@ -1020,20 +1010,6 @@ define proxy_arp_intfc_details u32 sw_if_index; }; -/** \brief Reset fib table request - @param client_index - opaque cookie to identify the sender - @param context - sender context, to match reply w/ request - @param vrf_id - vrf/table id of the fib table to reset - @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4 -*/ -autoreply define reset_fib -{ - u32 client_index; - u32 context; - u32 vrf_id; - u8 is_ipv6; -}; - /** \brief Set max allowed ARP or ip6 neighbor entries request @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @@ -1079,14 +1055,22 @@ autoreply define ioam_disable u16 id; }; +enum ip_reass_type +{ + IP_REASS_TYPE_FULL = 0, + IP_REASS_TYPE_SHALLOW_VIRTUAL = 0x1, +}; + autoreply define ip_reassembly_set { u32 client_index; u32 context; u32 timeout_ms; u32 max_reassemblies; + u32 max_reassembly_length; u32 expire_walk_interval_ms; u8 is_ip6; + vl_api_ip_reass_type_t type; }; define ip_reassembly_get @@ -1094,6 +1078,7 @@ define ip_reassembly_get u32 client_index; u32 context; u8 is_ip6; + vl_api_ip_reass_type_t type; }; define ip_reassembly_get_reply @@ -1102,6 +1087,7 @@ define ip_reassembly_get_reply i32 retval; u32 timeout_ms; u32 max_reassemblies; + u32 max_reassembly_length; u32 expire_walk_interval_ms; u8 is_ip6; }; @@ -1120,6 +1106,7 @@ autoreply define ip_reassembly_enable_disable u32 sw_if_index; u8 enable_ip4; u8 enable_ip6; + vl_api_ip_reass_type_t type; }; /*