bridge

package
v0.6.7-85-gad4206d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2023 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.

Index

Constants

View Source
const (
	// DefaultMTU is the default MTU for new bridge interfaces.
	DefaultMTU = 1500
)

Variables

This section is empty.

Functions

func AllocateIP

func AllocateIP(ctx context.Context, ipnet *net.IPNet, iface *net.Interface, bridge *netlink.Bridge) (net.IP, error)

For a given IP network, bridge (and its interface), allocate a free IP address.

func BigIntToIP

func BigIntToIP(v *big.Int) net.IP

BigIntToIP converts 128 bit integer into a 4 bytes IP address.

func BridgeIPs

func BridgeIPs(bridge *netlink.Bridge) ([]string, error)

BridgeIPs returns all the IPs attached to the provided bridge

func IPToBigInt

func IPToBigInt(ip net.IP) *big.Int

IpToBigInt converts a 4 bytes IP into a 128 bit integer.

func IncreaseIP

func IncreaseIP(ip net.IP) net.IP

Increases IP address numeric value by 1.

func IsUnicastIP

func IsUnicastIP(ip net.IP, mask net.IPMask) bool

IsUnicastIP returns true if the provided IP address and network mask is a unicast address.

func NewNetworkServiceV1alpha1

func NewNetworkServiceV1alpha1(ctx context.Context, opts ...any) (networkv1alpha1.NetworkService, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL