-
Notifications
You must be signed in to change notification settings - Fork 645
Rework internals to pass around ares_dns_record_t instead of binary data
#730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@oliverwelsh don't know if you want to review any progress, but I'm working on implementing what was discussed as the next step in #719 |
|
Other than missing manpages, I think the code for this is done... |
oliverwelsh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Brad, thank you for following up on this. It's great to see the DNS record object and parser used throughout the codebase as standard!
I have taken a look through of the code and left a couple of review comments. Overall I think this looks great. I especially like ares__search_name_list() - it feels a lot cleaner to calculate the search domains up front, which simplifies the logic when doing multiple searches.
c-ares has historically passed around raw dns packets in binary form. Now that we have a new parser, and messages are already parsed internally, lets pass around that parsed message rather than requiring multiple parse attempts on the same message. Also add a new
ares_send_dnsrec()andares_query_dnsrec()similar toares_search_dnsrec()added with PR #719 that can return the pointer to theares_dns_record_tto the caller enqueuing queries and reworkares_search_dnsrec()to useares_send_dnsrec()internally.