one_dhcpd v0.1.0 OneDHCPD.Message

DHCP Message

See RFC2131 and associated docs for details. This implementation is only intended to be complete enough to support the OneDHCPD use case.

Link to this section Summary

Functions

Decode the contents of a UDP packet

Encode a message so that it can be put in a UDP packet

Create a response to a request with some fields filled in

Link to this section Types

Link to this type t()
t() :: %OneDHCPD.Message{
  broadcast_flag: integer(),
  chaddr: [byte()],
  ciaddr: :inet.ip4_address(),
  giaddr: :inet.ip4_address(),
  hops: integer(),
  htype: integer(),
  op: integer(),
  options: Keyword.t(),
  secs: integer(),
  siaddr: :inet.ip4_address(),
  xid: integer(),
  yiaddr: :inet.ip4_address()
}

Link to this section Functions

Link to this function decode(arg1)
decode(binary()) :: {:error, any()} | t()

Decode the contents of a UDP packet

Link to this function encode(message)
encode(t()) :: binary()

Encode a message so that it can be put in a UDP packet

Link to this function response(request)
response(t()) :: t()

Create a response to a request with some fields filled in.