Radius.Packet (elixir_radius v1.1.0)
Link to this section Summary
Functions
Decode radius packet
Return an iolist of encoded packet
Return the value of a given attribute, if found, or default otherwise.
Verify if the packet signature is valid.
Link to this section Functions
Link to this function
decode(data, secret)
Decode radius packet
Link to this function
encode(packet, options \\ [])
Return an iolist of encoded packet
for request packets, leave packet.auth == nil, then I will generate one from random bytes. for reply packets, set packet.auth = request.auth, I will calc the reply hash with it.
packet.attrs :: [attr]
attr :: {type,value}
type :: String.t | integer | {"Vendor-Specific", vendor}
value :: integer | String.t | ipaddr
vendor :: String.t | integer
ipaddr :: {a,b,c,d} | {a,b,c,d,e,f,g,h}
Link to this function
get_attr(packet, attr_name, default \\ nil)
Return the value of a given attribute, if found, or default otherwise.
Link to this function
verify(packet)
Verify if the packet signature is valid.