Commit Graph

5 Commits

Author SHA1 Message Date
snuffy 3b6e6cd01c tests_dns: Make DNS tests older nameser.h compatible
Fix the tests for DNS to use older style nameser.h as
in ASTERISK-26608.

Tested on: OpenBSD 6.0, Debian 8

ASTERISK-26647 #close

Change-Id: I285913c44202537c04b3ed09c015efa6e5f9052d
2016-12-08 07:22:33 +11:00
David M. Lee 40caf0ad9b Replaces clock_gettime() with ast_tsnow()
clock_gettime() is, unfortunately, not portable. But I did like that
over our usual `ts.tv_nsec = tv.tv_usec * 1000` copy/paste code we
usually do when we want a timespec and all we have is ast_tvnow().

This patch adds ast_tsnow(), which mimics ast_tvnow(), but returns a
timespec. If clock_gettime() is available, it will use that. Otherwise
ast_tsnow() falls back to using ast_tvnow().

Change-Id: Ibb1ee67ccf4826b9b76d5a5eb62e90b29b6c456e
2015-08-07 19:35:13 -05:00
Richard Mudgett a0c2d2089d DNS unit tests: Fix extraneous description string commas.
Change-Id: Icf5f13c8e1c2c92a4473bb573ed2dd856ce1b64e
2015-06-24 17:13:17 -05:00
Richard Mudgett ae589da466 DNS: Remove trailing newline from summary and descriptions.
Those trailing newlines mess up test formatting.

Change-Id: I5e3f3a55b82c9d7acb9661201d4993d1958f1185
2015-06-10 18:06:14 -05:00
Joshua Colp abf3e40902 dns: Add core DNS API + unit tests and res_resolver_unbound module + unit tests.
This change adds an abstracted core DNS API which resembles the API described
here[1]. The API provides a pluggable mechanism for resolvers and also a
consistent view for records. Both synchronous and asynchronous queries are
supported.

This change also adds a res_resolver_unbound module which uses the libunbound
library to provide resolution.

Unit tests have also been written for all of the above to confirm the API and
functionality.

ASTERISK-24834 #close
Reported by: Matt Jordan

ASTERISK-24836 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/4474/
Review: https://reviewboard.asterisk.org/r/4512/

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+DNS+API


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-25 12:32:26 +00:00