dns: Add support for SRV record parsing and sorting.
authorJoshua Colp <jcolp@digium.com>
Wed, 1 Apr 2015 16:27:48 +0000 (16:27 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 1 Apr 2015 16:27:48 +0000 (16:27 +0000)
commit39824e3d013287d8860d620454d230278b0fba69
treeff7380c85bde86fe7138f0b79cf4071594bedb18
parentda13d15425e2dfefaf1b656d8aa6462d967b77ad
dns: Add support for SRV record parsing and sorting.

This change adds support for parsing SRV records and consuming their values
in an easy fashion. It also adds automatic sorting of SRV records according
to RFC 2782.

Tests have also been included which cover parsing, sorting, and off-nominal
cases where the record is corrupted.

ASTERISK-24931 #close
Reported by: Joshua Colp

Review: https://reviewboard.asterisk.org/r/4528/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/dns_internal.h
main/dns_core.c
main/dns_srv.c
res/res_resolver_unbound.c
tests/test_dns_srv.c [new file with mode: 0644]