VintageNet.IP.DhcpdConfig (vintage_net v0.11.3) View Source

This is a helper module for VintageNet.Technology implementations that use a DHCP server.

DHCP server parameters are:

  • :start - Start of the lease block
  • :end - End of the lease block
  • :max_leases - The maximum number of leases
  • :decline_time - The amount of time that an IP will be reserved (leased to nobody)
  • :conflict_time -The amount of time that an IP will be reserved
  • :offer_time - How long an offered address is reserved (seconds)
  • :min_lease - If client asks for lease below this value, it will be rounded up to this value (seconds)
  • :auto_time - The time period at which udhcpd will write out leases file.
  • :static_leases - list of {mac_address, ip_address}
  • :options - a map DHCP response options to set. See below.

DHCP response options are (see RFC 2132 for details):

  • :dns - IP_LIST
  • :domain - STRING - [0x0f] client's domain suffix
  • :hostname - STRING
  • :mtu - NUM
  • :router - IP_LIST
  • :search - STRING_LIST - [0x77] search domains
  • :serverid - IP (defaults to the interface's IP address)
  • :subnet - IP

Options may also be passed in as integers. These are passed directly to the DHCP server and their values are strings that are not interpreted by VintageNet. Use this to support custom DHCP header options.

Link to this section Summary

Functions

Add udhcpd configuration commands for running a DHCP server

Normalize the DHCPD parameters in a configuration.

Link to this section Functions

Link to this function

add_config(raw_config, arg2, opts)

View Source

Specs

Add udhcpd configuration commands for running a DHCP server

Specs

normalize(map()) :: map()

Normalize the DHCPD parameters in a configuration.