Documentation ¶
Index ¶
- Constants
- Variables
- func AddIngressQdisc(link netlink.Link) error
- func AddRedirectFilter(sourceLink netlink.Link, targetLink netlink.Link) error
- func CreateTap(name string, mtu int, ownerUID, ownerGID int) (netlink.Link, error)
- func GetLink(name string) (netlink.Link, error)
- func GetVethDevice() (string, error)
- func RootFilterHandle() uint32
- type InterfaceInfo
- type LinkNotFoundError
- type UnikernelNetworkInfo
Constants ¶
View Source
const DefaultInterface = "eth0"
FIXME: Add support for more interfaces. See: https://github.com/nubificus/urunc/issues/13 FIXME: Discover the veth endpoint name instead of using default "eth0". See: https://github.com/nubificus/urunc/issues/14
View Source
const DefaultTap = "tap0_urunc"
Variables ¶
View Source
var ErrEth0NotFound = errors.New("eth0 device not found")
Functions ¶
func AddIngressQdisc ¶
func AddRedirectFilter ¶
func GetVethDevice ¶
Find all interfaces available in our netns. We are expecting to find an eth0 interface and a lo interface. The eth0 is the interface we need to use. If there are more interfaces, log all interfaces.
func RootFilterHandle ¶
func RootFilterHandle() uint32
Types ¶
type InterfaceInfo ¶
type LinkNotFoundError ¶
type LinkNotFoundError struct {
// contains filtered or unexported fields
}
func (LinkNotFoundError) Error ¶
func (e LinkNotFoundError) Error() string
type UnikernelNetworkInfo ¶
type UnikernelNetworkInfo struct { TapDevice string EthDevice InterfaceInfo }
func Setup ¶
func Setup() (*UnikernelNetworkInfo, error)
Setup creates a tap device and sets tc rules between veth interface inside the namespace to the tap device.
Click to show internal directories.
Click to hide internal directories.