callback

package
v0.0.0-...-8d377ce Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package callback contains minimal callbacks for configuring the kernel with options received over DHCP.

These directly configure the relevant kernel subsytems and need to own certain parts of them as documented on a per- callback basis to make sure that they can recover from restarts and crashes of the DHCP client. The callbacks in here are not suitable for use in advanced network scenarios like running multiple DHCP clients per interface via ClientIdentifier or when running an external FIB manager. In these cases it's advised to extract the necessary information from the lease in your own callback and communicate it directly to the responsible entity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compose

func Compose(callbacks ...dhcp4c.LeaseCallback) dhcp4c.LeaseCallback

Compose can be used to chain multiple callbacks

func ManageIP

func ManageIP(iface netlink.Link) dhcp4c.LeaseCallback

ManageIP sets up and tears down the assigned IP address. It takes exclusive ownership of all IPv4 addresses on the given interface which do not have IFA_F_PERMANENT set, so it's not possible to run multiple dynamic addressing clients on a single interface.

func ManageRoutes

func ManageRoutes(iface netlink.Link) dhcp4c.LeaseCallback

ManageRoutes installs and removes routes according to the current DHCP lease, including the default route (if any). It takes ownership of all RTPROTO_DHCP routes on the given interface, so it's not possible to run multiple DHCP clients on the given interface.

Types

This section is empty.

Jump to

Keyboard shortcuts

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