go.ligato.io/vpp-agent/v3@v3.5.0/proto/ligato/linux/interfaces/interface.proto (about)

     1  syntax = "proto3";
     2  
     3  package ligato.linux.interfaces;
     4  
     5  option go_package = "go.ligato.io/vpp-agent/v3/proto/ligato/linux/interfaces;linux_interfaces";
     6  
     7  import "ligato/linux/namespace/namespace.proto";
     8  import "ligato/annotations.proto";
     9  
    10  message Interface {
    11      enum Type {
    12          UNDEFINED = 0;
    13          VETH = 1;
    14          TAP_TO_VPP = 2; // TAP created by VPP to have the Linux-side further configured
    15  
    16          // LOOPBACK is used to attach configuration to an existing "lo" interface,
    17          // but unlike EXISTING type it is not limited to the default network namespace
    18          // (i.e. loopbacks in other containers can be referenced also).
    19          // To create an additional interface which effectively acts as a loopback,
    20          // use DUMMY interface (see below).
    21          LOOPBACK = 3;
    22  
    23          // Wait for and potentially attach additional network configuration to an interface
    24          // created externally (i.e. not by this agent) in the default network namespace
    25          // (i.e. same as used by the agent).
    26          // Behaviour of the EXISTING interface depends on the values of ip_addresses and
    27          // link_only attributes as follows:
    28          // 1. link_only=false and ip_addresses are empty: agent waits for interface to be created
    29          //    externally and then configures it in the L2-only mode (resync will remove any IP addresses
    30          //    configured from outside of the agent)
    31          // 2. link_only=false and ip_addresses are non-empty: agent waits for interface to be created
    32          //    externally and then attaches the selected IP addresses to it (resync removes any other
    33          //    IPs added externally)
    34          // 3. link_only=true and ip_addresses are empty: agent only waits for the interface
    35          //    to exists (it doesn't wait for or change any IP addresses attached to it)
    36          // 4. link_only=true and ip_addresses are non empty: agent waits for the interface
    37          //    to exists and the selected IP addresses to be assigned (i.e. there will be derived
    38          //    value for each expected IP address in the PENDING state until the address is assigned
    39          //    to the interface externally)
    40          EXISTING = 4;
    41  
    42          // In Linux, VRF is implemented as yet another type of netdevice (i.e. listed with `ip link show`).
    43          // Network interfaces are then assigned to VRF simply by enslaving them to the VRF device.
    44          // For more information, visit: https://www.kernel.org/doc/Documentation/networking/vrf.txt
    45          VRF_DEVICE = 5;
    46  
    47          // Create a dummy Linux interface which effectively behaves just like the loopback.
    48          DUMMY = 6;
    49      };
    50  
    51      // Name is mandatory field representing logical name for the interface.
    52      // It must be unique across all configured interfaces.
    53      string name = 1;
    54  
    55      // Type represents the type of interface and It must match with actual Link.
    56      Type type = 2;
    57  
    58      // Namespace is a reference to a Linux network namespace where the interface
    59      // should be put into.
    60      linux.namespace.NetNamespace namespace = 3;
    61  
    62      // Name of the interface in the host OS. If not set, the host name will be
    63      // the same as the interface logical name.
    64      string host_if_name = 4;
    65  
    66      // Enabled controls if the interface should be UP.
    67      bool enabled = 5;
    68  
    69      // IPAddresses define list of IP addresses for the interface and must be
    70      // defined in the following format: <ipAddress>/<ipPrefix>.
    71      // Interface IP address can be also allocated via netalloc plugin and
    72      // referenced here, see: api/models/netalloc/netalloc.proto
    73      repeated string ip_addresses = 6  [(ligato_options).type = IP_WITH_MASK];
    74  
    75      // PhysAddress represents physical address (MAC) of the interface.
    76      // Random address will be assigned if left empty.
    77      // Not used (and not supported) by VRF devices.
    78      string phys_address = 7;
    79  
    80      // MTU is the maximum transmission unit value.
    81      uint32 mtu = 8   [(ligato_options).int_range = {minimum: 0 maximum: 9216}];
    82  
    83      oneof link {
    84          // VETH-specific configuration
    85          VethLink veth = 20;
    86  
    87          // TAP_TO_VPP-specific configuration
    88          TapLink tap = 21;
    89  
    90          // VRF_DEVICE-specific configuration
    91          VrfDevLink vrf_dev = 22;
    92      };
    93  
    94      // Configure/Resync link only. IP/MAC addresses are expected to be configured
    95      // externally - i.e. by a different agent or manually via CLI.
    96      bool link_only = 9;
    97  
    98      // Reference to the logical name of a VRF_DEVICE interface.
    99      // If defined, this interface will be enslaved to the VRF device and will thus become
   100      // part of the VRF (L3-level separation) that the device represents.
   101      // Interfaces enslaved to the same VRF_DEVICE master interface therefore
   102      // comprise single VRF with a separate routing table.
   103      string vrf_master_interface = 10;
   104  };
   105  
   106  message VethLink {
   107      // Name of the VETH peer, i.e. other end of the linux veth (mandatory for VETH)
   108      string peer_if_name = 1;
   109  
   110      enum ChecksumOffloading {
   111          CHKSM_OFFLOAD_DEFAULT = 0;
   112          CHKSM_OFFLOAD_ENABLED = 1;
   113          CHKSM_OFFLOAD_DISABLED = 2;
   114      }
   115  
   116      // Checksum offloading - Rx side (enabled by default)
   117      ChecksumOffloading rx_checksum_offloading = 2;
   118  
   119      // Checksum offloading - Tx side (enabled by default)
   120      ChecksumOffloading tx_checksum_offloading = 3;
   121  };
   122  
   123  message TapLink {
   124      // Logical name of the VPP TAP interface (mandatory for TAP_TO_VPP)
   125      string vpp_tap_if_name = 1;
   126  };
   127  
   128  
   129  message VrfDevLink {
   130      // Routing table associated with the VRF.
   131      // Table ID is an 8-bit unsigned integer value. Please note that 253, 254 and 255 are reserved values
   132      // for special routing tables (main, default, local).
   133      // Multiple VRFs inside the same network namespace should each use a different routing table.
   134      // For more information, visit: http://linux-ip.net/html/routing-tables.html
   135      uint32 routing_table = 1;
   136  };
   137