* limitations under the License.
*/
-option version = "0.2.0";
+option version = "1.3.0";
import "vnet/interface_types.api";
import "vnet/ip/ip_types.api";
WIREGUARD_PEER_ESTABLISHED = 0x2,
};
-/** \brief Create new peer
+/** \brief Peer structure
+ @param peer_index - peer pool index
@param public_key - public key (in binary format) of destination peer
@param port - destination port
+ @param persistent_keepalive - keepalive packet timeout
@param table_id - The IP table in which 'endpoint' is reachable
@param endpoint - destination ip
- @param allowed_ip - allowed incoming ip tunnel
- @param tun_sw_if_index - tunnel interface
- @param persistent_keepalive - keepalive packet timeout
+ @param sw_if_index - tunnel SW interface
+ @param flags - peer status flags
+ @param n_allowed_ips - number of prefixes in allowed_ips
+ @param allowed_ips - allowed incoming tunnel prefixes
*/
typedef wireguard_peer
{
+ u32 peer_index;
u8 public_key[32];
u16 port;
u16 persistent_keepalive;
u32 context;
vl_api_wireguard_peer_t peer;
};
+
+/** \brief Create new peer
+ @param context - sender context, to match reply w/ request
+ @param retval - return status
+ @param peer_index - Created or existing peer pool index
+*/
define wireguard_peer_add_reply
{
u32 context;
u32 peer_index;
};
-/** \brief Remove peer by public_key
+/** \brief Remove peer
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
- @param public_key
+ @param peer_index - peer to be removed
*/
autoreply define wireguard_peer_remove
{
u32 peer_index [default=0xFFFFFFFF];
};
-/** \brief Dump peers response
+/** \brief Dump peer details
@param context - sender context, to match reply w/ request
- @param is_dead - is peer valid yet
- @param public_key - peer public_key
- @param ip4_address - ip4 endpoint address
+ @param peer - peer details
*/
define wireguard_peers_details {
u32 context;
/** \brief Wireguard Set Async mode
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
- @param async_enable - wireguard async mode on or off
+ @param async_enable - wireguard async mode on or off, default off
*/
autoreply define wg_set_async_mode {
u32 client_index;
u32 context;
- bool async_enable;
+ bool async_enable [default=false];
};
/*