gitee.com/leisunstar/runtime@v0.0.0-20200521203717-5cef3e7b53f9/virtcontainers/pkg/types/types.go (about) 1 // Copyright 2018 Intel Corporation. 2 // 3 // SPDX-License-Identifier: Apache-2.0 4 // 5 6 package types 7 8 // IPAddress describes an IP address. 9 type IPAddress struct { 10 Family int 11 Address string 12 Mask string 13 } 14 15 // Interface describes a network interface. 16 type Interface struct { 17 Device string 18 Name string 19 IPAddresses []*IPAddress 20 Mtu uint64 21 RawFlags uint32 22 HwAddr string 23 // pciAddr is the PCI address in the format "bridgeAddr/deviceAddr". 24 // Here, bridgeAddr is the address at which the bridge is attached on the root bus, 25 // while deviceAddr is the address at which the network device is attached on the bridge. 26 PciAddr string 27 // LinkType defines the type of interface described by this structure. 28 // The expected values are the one that are defined by the netlink 29 // library, regarding each type of link. Here is a non exhaustive 30 // list: "veth", "macvtap", "vlan", "macvlan", "tap", ... 31 LinkType string 32 } 33 34 // Route describes a network route. 35 type Route struct { 36 Dest string 37 Gateway string 38 Device string 39 Source string 40 Scope uint32 41 }