NLnetLabs / ldns

LDNS is a DNS library that facilitates DNS tool programming
https://nlnetlabs.nl/ldns
BSD 3-Clause "New" or "Revised" License
295 stars 99 forks source link

Provide an API to generate wire buffers without compressed domain names #107

Closed elindsey closed 3 years ago

elindsey commented 4 years ago

I'm using ldns in a project, but have a need for some specific requests to be generated without domain name compression. Right now there's no easy way to do that as the compression logic in ldns_pkt2wire is unconditional. Adding an ldns_pkt2buffer_wire_compress function that I can explicitly call with a NULL rbtree seems like the easiest, least invasive way to add this functionality, and fits with the existing API.

What are your thoughts? Is this functionality you'd like to support in ldns, and if so does this approach seem okay?

wtoorop commented 3 years ago

Absolutely @elindsey this is completely in line with the current API, so Thanks!