Skip to main content

parse_opt_value

Function parse_opt_value 

Source
pub fn parse_opt_value(
    key: DnsRrKey,
    opt: u16,
    data: &[u8],
) -> Result<OptValue, OptParseError>
Expand description

Parse a raw option value according to its datatype.

Uses DnsRr::opt_datatype() to determine the wire format, then decodes the byte slice into the corresponding OptValue.