/*
 * Copyright (c) 2017 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/** \file

    This file defines vpe control-plane API messages for
    the Linux kernel TAP device driver
*/

option version = "4.0.0";

import "vnet/interface_types.api";
import "vnet/ethernet/ethernet_types.api";
import "vnet/ip/ip_types.api";

enum tap_flags {
        TAP_API_FLAG_GSO = 1, /* enable gso on the interface */
        TAP_API_FLAG_CSUM_OFFLOAD = 2, /* enable checksum offload without gso on the interface */
        TAP_API_FLAG_PERSIST = 4, /* make the interface persistence to exist in linux even vpp crash/restart */
        TAP_API_FLAG_ATTACH = 8,  /* attach to the existing persistence interface after vpp crash/restart */
        TAP_API_FLAG_TUN = 16,  /* create TUN interface instead of tap */
        TAP_API_FLAG_GRO_COALESCE = 32, /* enable packet coalescing on tx side, provided gso enabled */
        TAP_API_FLAG_PACKED = 64 [backwards_compatible], /* enable packed ring support */
        TAP_API_FLAG_IN_ORDER = 128 [backwards_compatible], /* enable in-order desc support */
};

/** \brief Initialize a new tap interface with the given parameters
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param id - interface id, 0xffffffff means auto
    @param use_random_mac - let the system generate a unique mac address
    @param mac_address - mac addr to assign to the interface if use_random not set
    @param num_rx_queues - number of rx queues
    @param num_tx_queues - number of tx queues
    @param tx_ring_sz - the number of entries of TX ring, optional, default is 256 entries, must be power of 2
    @param rx_ring_sz - the number of entries of RX ring, optional, default is 256 entries, must be power of 2
    @param host_mtu_set - host MTU should be set
    @param host_mtu_size - host MTU size
    @param host_mac_addr_set - host side interface mac address should be set
    @param host_mac_addr - host side interface mac address
    @param host_ip4_prefix_set - host IPv4 ip address should be set
    @param host_ip4_prefix - host IPv4 ip address
    @param host_ip6_prefix_set - host IPv6 ip address should be set
    @param host_ip6_prefix - host IPv6 ip address
    @param host_ip4_gw_set - host IPv4 default gateway should be set
    @param host_ip4_gw - host IPv4 default gateway
    @param host_ip6_gw_set - host IPv6 default gateway should be set
    @param host_ip6_gw - host IPv6 default gateway
    @param tap_flags - flags for the TAP interface creation
    @param host_if_name_set - host side interface name should be set
    @param host_if_name - host side interface name
    @param host_namespace_set - host namespace should be set
    @param host_namespace - host namespace to attach interface to
    @param host_bridge_set - host bridge should be set
    @param host_bridge - host bridge to attach interface to
    @param tag - tag
*/
autoendian define tap_create_v3
{
  u32 client_index;
  u32 context;
  u32 id [default=0xffffffff];
  bool use_random_mac [default=true];
  vl_api_mac_address_t mac_address;
  u16 num_rx_queues [default=1];
  u16 num_tx_queues [default=1];
  u16 tx_ring_sz [default=256];
  u16 rx_ring_sz [default=256];
  bool host_mtu_set;
  u32 host_mtu_size;
  bool host_mac_addr_set;
  vl_api_mac_address_t host_mac_addr;
  bool host_ip4_prefix_set;
  vl_api_ip4_address_with_prefix_t host_ip4_prefix;
  bool host_ip6_prefix_set;
  vl_api_ip6_address_with_prefix_t host_ip6_prefix;
  bool host_ip4_gw_set;
  vl_api_ip4_address_t host_ip4_gw;
  bool host_ip6_gw_set;
  vl_api_ip6_address_t host_ip6_gw;
  vl_api_tap_flags_t tap_flags;
  bool host_namespace_set;
  string host_namespace[64];
  bool host_if_name_set;
  string host_if_name[64];
  bool host_bridge_set;
  string host_bridge[64];
  string tag[];
};

/** \brief Reply for tap create reply
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
    @param sw_if_index - software index allocated for the new tap interface
*/
autoendian define tap_create_v3_reply
{
  u32 context;
  i32 retval;
  vl_api_interface_index_t sw_if_index;
};

/** \brief Initialize a new tap interface with the given parameters
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param id - interface id, 0xffffffff means auto
    @param use_random_mac - let the system generate a unique mac address
    @param mac_address - mac addr to assign to the interface if use_random not set
    @param num_rx_queues - number of rx queues
    @param tx_ring_sz - the number of entries of TX ring, optional, default is 256 entries, must be power of 2
    @param rx_ring_sz - the number of entries of RX ring, optional, default is 256 entries, must be power of 2
    @param host_mtu_set - host MTU should be set
    @param host_mtu_size - host MTU size
    @param host_mac_addr_set - host side interface mac address should be set
    @param host_mac_addr - host side interface mac address
    @param host_ip4_prefix_set - host IPv4 ip address should be set
    @param host_ip4_prefix - host IPv4 ip address
    @param host_ip6_prefix_set - host IPv6 ip address should be set
    @param host_ip6_prefix - host IPv6 ip address
    @param host_ip4_gw_set - host IPv4 default gateway should be set
    @param host_ip4_gw - host IPv4 default gateway
    @param host_ip6_gw_set - host IPv6 default gateway should be set
    @param host_ip6_gw - host IPv6 default gateway
    @param tap_flags - flags for the TAP interface creation
    @param host_if_name_set - host side interface name should be set
    @param host_if_name - host side interface name
    @param host_namespace_set - host namespace should be set
    @param host_namespace - host namespace to attach interface to
    @param host_bridge_set - host bridge should be set
    @param host_bridge - host bridge to attach interface to
    @param tag - tag
*/
define tap_create_v2
{
  option deprecated;

  u32 client_index;
  u32 context;
  u32 id [default=0xffffffff];
  bool use_random_mac [default=true];
  vl_api_mac_address_t mac_address;
  u8 num_rx_queues [default=1];
  u16 tx_ring_sz [default=256];
  u16 rx_ring_sz [default=256];
  bool host_mtu_set;
  u32 host_mtu_size;
  bool host_mac_addr_set;
  vl_api_mac_address_t host_mac_addr;
  bool host_ip4_prefix_set;
  vl_api_ip4_address_with_prefix_t host_ip4_prefix;
  bool host_ip6_prefix_set;
  vl_api_ip6_address_with_prefix_t host_ip6_prefix;
  bool host_ip4_gw_set;
  vl_api_ip4_address_t host_ip4_gw;
  bool host_ip6_gw_set;
  vl_api_ip6_address_t host_ip6_gw;
  vl_api_tap_flags_t tap_flags;
  bool host_namespace_set;
  string host_namespace[64];
  bool host_if_name_set;
  string host_if_name[64];
  bool host_bridge_set;
  string host_bridge[64];
  string tag[];
};

/** \brief Reply for tap create reply
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
    @param sw_if_index - software index allocated for the new tap interface
*/
define tap_create_v2_reply
{
  option deprecated;

  u32 context;
  i32 retval;
  vl_api_interface_index_t sw_if_index;
};

/** \brief Delete tap interface
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - interface index of existing tap interface
*/
autoreply define tap_delete_v2
{
  u32 client_index;
  u32 context;
  vl_api_interface_index_t sw_if_index;
};

/** \brief Dump tap interfaces request
    @param sw_if_index - filter by sw_if_index
*/
define sw_interface_tap_v2_dump
{
  u32 client_index;
  u32 context;
  vl_api_interface_index_t sw_if_index [default=0xffffffff];
};

/** \brief Reply for tap dump request
    @param sw_if_index - software index of tap interface
    @param id - interface id
    @param tx_ring_sz - the number of entries of TX ring
    @param rx_ring_sz - the number of entries of RX ring
    @param host_mtu_size - host mtu size
    @param host_mac_addr - mac address assigned to the host side of the interface
    @param host_ip4_prefix - host IPv4 ip address
    @param host_ip6_prefix - host IPv6 ip address
    @param tap_flags - flags for the TAP interface creation
    @param dev_name - Linux tap device name
    @param host_if_name - host side interface name
    @param host_namespace - host namespace the interface is attached into
    @param host_bridge - host bridge the interface is attached into
*/
define sw_interface_tap_v2_details
{
  u32 context;
  u32 sw_if_index;
  u32 id;
  u16 tx_ring_sz;
  u16 rx_ring_sz;
  u32 host_mtu_size;
  vl_api_mac_address_t host_mac_addr;
  vl_api_ip4_address_with_prefix_t host_ip4_prefix;
  vl_api_ip6_address_with_prefix_t host_ip6_prefix;
  vl_api_tap_flags_t tap_flags;
  string dev_name[64];
  string host_if_name[64];
  string host_namespace[64];
  string host_bridge[64];
};

/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */
