API Reference
Class
DnsWireMessageParser
Provides lightweight, safe parsing helpers for DNS wire-format messages.
Inheritance
- Object
- DnsWireMessageParser
Methods
public static Boolean TryParseEdns(Byte[] data, out DnsWireEdnsInfo edns) #Returns:
BooleanAttempts to locate an EDNS OPT record and extract the advertised UDP payload size.
Parameters
- data System.Byte[]
- Raw DNS message bytes.
- edns DnsClientX.DnsWireEdnsInfo@
- Parsed EDNS info.
Returns
true when parsing succeeded (even if EDNS is not present); otherwise false for malformed messages.
public static Boolean TryParseHeader(Byte[] data, out DnsWireHeaderInfo header) #Returns:
BooleanAttempts to parse the DNS message header (flags and section counts).
Parameters
- data System.Byte[]
- Raw DNS message bytes.
- header DnsClientX.DnsWireHeaderInfo@
- Parsed header fields.
Returns
true when the header was parsed; otherwise false.