dhcp.core

DHCP protocol definition.

default-response

(default-response msg-map srv-if)

Takes a msg-map containing a :opt/msg-type and based on the msg-type and network info from srv-if, returns a populated msg-map with default values.

DHCP-DEFAULTS

DHCP-FLAGS

DHCP-HEADER

HEADERS-FIXED

MAX-BUF-SIZE

MSG-TYPE-BCAST-LOOKUP

MSG-TYPE-LIST

MSG-TYPE-LOOKUP

MSG-TYPE-RESP-LOOKUP

OPTS-ETHERBOOT-LIST

OPTS-ETHERBOOT-LOOKUP

OPTS-LIST

OPTS-LOOKUP

OPTS-RELAY-AGENT-LIST

OPTS-RELAY-AGENT-LOOKUP

read-dhcp

(read-dhcp buf & [spec])

Read/decode a DHCP payload from buf

RECV-PORT

SEND-PORT

write-dhcp

(write-dhcp msg-map & [spec])

Write/encode an DHCP payload into an allocated buffer using msg-map. Returns the allocated buffer sliced to the size written.