DnsClient.NET icon indicating copy to clipboard operation
DnsClient.NET copied to clipboard

Parse DNS with provided array

Open NN--- opened this issue 4 years ago • 2 comments

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

NN--- avatar Jun 02 '20 11:06 NN---

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 ^^

MichaCo avatar Jun 03 '20 23:06 MichaCo

It would be nice to have it exposed.

NN--- avatar Jun 04 '20 08:06 NN---

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.

MichaCo avatar Oct 23 '22 13:10 MichaCo