plugins

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegisteredPlugins = make(map[string]*Plugin)

RegisteredPlugins maps a plugin name to a Plugin instance.

Functions

func LoadPlugins

func LoadPlugins(conf *config.Config) ([]handler.Handler4, []handler.Handler6, error)

LoadPlugins reads a Config object and loads the plugins as specified in the `plugins` section, in order. For a plugin to be available, it must have been previously registered with plugins.RegisterPlugin. This is normally done at plugin import time. This function returns the list of loaded v6 plugins, the list of loaded v4 plugins, and an error if any.

func RegisterPlugin

func RegisterPlugin(plugin *Plugin) error

RegisterPlugin registers a plugin.

Types

type Plugin

type Plugin struct {
	Name   string
	Setup6 SetupFunc6
	Setup4 SetupFunc4
}

Plugin represents a plugin object. Setup6 and Setup4 are the setup functions for DHCPv6 and DHCPv4 handlers respectively. Both setup functions can be nil.

type SetupFunc4

type SetupFunc4 func(args ...string) (handler.Handler4, error)

SetupFunc4 defines a plugin setup function for DHCPv6

type SetupFunc6

type SetupFunc6 func(args ...string) (handler.Handler6, error)

SetupFunc6 defines a plugin setup function for DHCPv6

Directories

Path Synopsis
Package allocators provides the interface and the algorithm(s) for allocation of ipv6 prefixes of various sizes within a larger prefix.
Package allocators provides the interface and the algorithm(s) for allocation of ipv6 prefixes of various sizes within a larger prefix.
Package file enables static mapping of MAC <--> IP addresses.
Package file enables static mapping of MAC <--> IP addresses.
Package nbp implements handling of an NBP (Network Boot Program) using an URL, e.g.
Package nbp implements handling of an NBP (Network Boot Program) using an URL, e.g.
Package prefix implements a plugin offering prefixes to clients requesting them This plugin attributes prefixes to clients requesting them with IA_PREFIX requests.
Package prefix implements a plugin offering prefixes to clients requesting them This plugin attributes prefixes to clients requesting them with IA_PREFIX requests.

Jump to

Keyboard shortcuts

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