X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsrv6%2Fsr.api;h=1d696b0c8972994799135a16afaba2a06f4c93d5;hb=eeb5fb3a5;hp=9e9007418b5d7b2b2957dc8b18b425cafa838238;hpb=5d73eecd63018db69b10bf56adeec9cc5cf92790;p=vpp.git diff --git a/src/vnet/srv6/sr.api b/src/vnet/srv6/sr.api index 9e9007418b5..1d696b0c897 100644 --- a/src/vnet/srv6/sr.api +++ b/src/vnet/srv6/sr.api @@ -1,3 +1,4 @@ +/* Hey Emacs use -*- mode: C -*- */ /* * Copyright (c) 2015-2016 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,6 +14,22 @@ * limitations under the License. */ +option version = "1.2.0"; + +/** \brief SRv6 SID +*/ +typedef srv6_sid +{ + u8 addr[16]; +}; + +typedef srv6_sid_list +{ + u8 num_sids; + u32 weight; + vl_api_srv6_sid_t sids[16]; +}; + /** \brief IPv6 SR LocalSID add/del request @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @@ -20,23 +37,31 @@ @param localsid_addr IPv6 address of the localsid @param end_psp Boolean of whether decapsulation is allowed in this function @param behavior Type of behavior (function) for this localsid - @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the fib_table. + @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the + fib_table. @param vlan_index Only for L2 xconnect. Outgoing VLAN tag. @param fib_table FIB table in which we should install the localsid entry - @param nh_addr Next Hop IPv4/IPv6 address. Only for L2/L3 xconnect. + @param nh_addr6 Next Hop IPv6 address. Only for L2/L3 xconnect. + @param nh_addr4 Next Hop IPv4 address. Only for L2/L3 xconnect. */ autoreply define sr_localsid_add_del { u32 client_index; u32 context; u8 is_del; - u8 localsid_addr[16]; + vl_api_srv6_sid_t localsid; u8 end_psp; u8 behavior; u32 sw_if_index; u32 vlan_index; u32 fib_table; - u8 nh_addr[16]; + u8 nh_addr6[16]; + u8 nh_addr4[4]; +}; + +typedef sr_ip6_address +{ + u8 data[16]; }; /** \brief IPv6 SR policy add @@ -47,7 +72,7 @@ autoreply define sr_localsid_add_del @param is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation) @param type is the type of the SR policy. (0.Default // 1.Spray) @param fib_table is the VRF where to install the FIB entry for the BSID - @param segments is a vector of IPv6 address composing the segment list + @param sids is a srv6_sid_list object */ autoreply define sr_policy_add { @@ -58,8 +83,7 @@ autoreply define sr_policy_add u8 is_encap; u8 type; u32 fib_table; - u8 n_segments; - u8 segments[0]; + vl_api_srv6_sid_list_t sids; }; /** \brief IPv6 SR policy modification @@ -69,10 +93,9 @@ autoreply define sr_policy_add @param sr_policy_index is the index of the SR policy @param fib_table is the VRF where to install the FIB entry for the BSID @param operation is the operation to perform (among the top ones) - @param segments is a vector of IPv6 address composing the segment list @param sl_index is the index of the Segment List to modify/delete @param weight is the weight of the sid list. optional. - @param is_encap Mode. Encapsulation or SRH insertion. + @param sids is a srv6_sid_list object */ autoreply define sr_policy_mod { @@ -84,8 +107,7 @@ autoreply define sr_policy_mod u8 operation; u32 sl_index; u32 weight; - u8 n_segments; - u8 segments[0]; + vl_api_srv6_sid_list_t sids; }; /** \brief IPv6 SR policy deletion @@ -98,10 +120,35 @@ autoreply define sr_policy_del { u32 client_index; u32 context; - u8 bsid_addr[16]; + vl_api_srv6_sid_t bsid_addr; u32 sr_policy_index; }; +/** \brief IPv6 SR Set SRv6 encapsulation source + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param bsid is the bindingSID of the SR Policy + @param index is the index of the SR policy +*/ +autoreply define sr_set_encap_source +{ + u32 client_index; + u32 context; + u8 encaps_source[16]; +}; + +/** \brief IPv6 SR Set SRv6 encapsulation hop-limit + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param hop_limit is the hop-limit value to set +*/ +autoreply define sr_set_encap_hop_limit +{ + u32 client_index; + u32 context; + u8 hop_limit; +}; + /** \brief IPv6 SR steering add/del @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @@ -132,36 +179,69 @@ autoreply define sr_steering_add_del @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request */ -/**define sr_localsids_dump +define sr_localsids_dump { u32 client_index; u32 context; -};*/ +}; -/** \brief Details about a single SR LocalSID - @param context - returned sender context, to match reply w/ request - @param localsid_addr IPv6 address of the localsid - @param behavior Type of behavior (function) for this localsid - @param end_psp Boolean of whether decapsulation is allowed in this function - @param sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the fib_table. - @param vlan_index Only for L2 xconnect. Outgoing VLAN tag. - @param fib_table FIB table in which we should install the localsid entry - @param nh_addr Next Hop IPv4/IPv6 address. Only for L2/L3 xconnect. -*/ -/**manual_endian define sr_localsid_details +define sr_localsids_details { u32 context; - u8 localsid_addr[16]; - u8 behavior; + vl_api_srv6_sid_t addr; u8 end_psp; - u32 sw_if_index; + u16 behavior; + u32 fib_table; u32 vlan_index; + u8 xconnect_nh_addr6[16]; + u8 xconnect_nh_addr4[4]; + u32 xconnect_iface_or_vrf_table; +}; + +/** \brief Dump the list of SR policies + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define sr_policies_dump +{ + u32 client_index; + u32 context; +}; + +define sr_policies_details +{ + u32 context; + vl_api_srv6_sid_t bsid; + u8 type; + u8 is_encap; u32 fib_table; - u8 nh_addr[16]; -};*/ + u8 num_sid_lists; + vl_api_srv6_sid_list_t sid_lists[num_sid_lists]; +}; + +/** \brief Dump the steering policies + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define sr_steering_pol_dump +{ + u32 client_index; + u32 context; +}; + +define sr_steering_pol_details +{ + u32 context; + u8 traffic_type; + u32 fib_table; + u8 prefix_addr[16]; + u32 mask_width; + u32 sw_if_index; + vl_api_srv6_sid_t bsid; +}; /* - * fd.io coding-style-patch-verification: ON + * fd.io coding-style-patch-verification: OFF * Local Variables: * eval: (c-set-style "gnu") * End: