DnsClient.NET
DnsClient.NET copied to clipboard
Parse DNS with provided array
Is there an option to parse a provided packet manually like DNS library can do ?
var r = Response.FromArray(array);
https://github.com/kapetan/dns/blob/master/DNS/Protocol/Response.cs#L29
The parsing is currently internal. So, no, you cannot parse just data right now.
That being said, my plan was to add an extensibility API to version 2 sometime in the future. I'm not really happy with how that API would look like with the current implementation, that's mostly why all that is internal right now which allows me to easily do changes without making breaking changes ^^
It would be nice to have it exposed.
I will make DnsDatagramReader
public in version 1.7.
I'm not going to guarantee the same stability for that class as for the rest of the library though, so you might see breaking changes at some point. But I hope that helps.