• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

c-ares / c-ares / #718
92%

Build:
DEFAULT BRANCH: main
Ran 20 Mar 2024 12:30AM UTC
Jobs 1
Files 151
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Mar 2024 12:25AM UTC coverage: 80.72% (+0.01%) from 80.71%
#718

push

travis-ci

web-flow
Add function ares_search_dnrec() to search for records using the new DNS record parser (#719)

This PR adds a new function `ares_search_dnsrec()` to search for records
using the new DNS record parser.

The function takes an arbitrary DNS record object to search (that must
represent a query for a single name). The function takes a new callback
type, `ares_callback_dnsrec`, that is invoked with a parsed DNS record
object rather than the raw buffer(+length).

The original motivation for this change is to provide support for
[draft-kaplan-enum-sip-routing-04](https://datatracker.ietf.org/doc/html/draft-kaplan-enum-sip-routing-04);
when routing phone calls using an ENUM server, it can be useful to
include identifying source information in an OPT RR options value, to
help select the appropriate route for the call. The new function allows
for more customisable searches like this.

**Summary of code changes**

A new function `ares_search_dnsrec()` has been added and exposed.
Moreover, the entire `ares_search_int()` internal code flow has been
refactored to use parsed DNS record objects and the new DNS record
parser. The DNS record object is passed through the `search_query`
structure by encoding/decoding to/from a buffer (if multiple search
domains are used). A helper function `ares_dns_write_query_altname()` is
used to re-write the DNS record object with a new query name (used to
append search domains).

`ares_search()` is now a wrapper around the new internal code, where the
DNS record object is created based on the name, class and type
parameters.

The new function uses a new callback type, `ares_callback_dnsrec`. This
is invoked with a parsed DNS record object. For now, we convert from
`ares_callback` to this new type using `ares__dnsrec_convert_cb()`.

Some functions that are common to both `ares_query()` and
`ares_search()` have been refactored using the new DNS record parser.
See `ares_dns_record_create_query()` and... (continued)

158 of 183 new or added lines in 6 files covered. (86.34%)

9 existing lines in 2 files now uncovered.

8336 of 10327 relevant lines covered (80.72%)

4000.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #718.1 20 Mar 2024 12:30AM UTC 0
80.72
Source Files on build #718
Detailed source file information is not available for this build.
  • Back to Repo
  • fab65aca on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc