spc476/SPCDNS — pull request #1 by megahall (2014-09-09 06:13:54+00:00)
Title: spcdns: expose print / debug functions to client applications

I needed some debugging functions when using `SPCDNS` inside my own up-and-coming open-source application. However I noticed that the debug functions were hidden and couldn't be accessed by other parties. So I moved them to a separate `.o`, exposed them, and updated the README to show how to run the UT's, and include a Contributors section (since this is the standard practice to keep licenses straight).

Proof that everything still works, and the functions appear where you'd expect them to be:

$ nm built/libspcdns.a | fgrep -i print
U sprintf
000000000000025c T dns_print_answer
000000000000008e T dns_print_header
0000000000000169 T dns_print_question
0000000000000000 T dns_print_result
U fprintf
U printf
$ nm built/libspcdns.so | fgrep -i print
0000000000006d1b T dns_print_answer
0000000000006b2b T dns_print_header
0000000000006c18 T dns_print_question
0000000000006a95 T dns_print_result
U fprintf@@GLIBC_2.2.5
U printf@@GLIBC_2.2.5
U sprintf@@GLIBC_2.2.5
$ built/dotest -d -s 8.8.8.8 www.google.com.
OUTGOING:

... MEMORY DUMP ...

INCOMING:

... MEMORY DUMP ...

Bytes used: 680

; Questions = 1
; Answers = 5
; Name Servers = 0
; Additional Records = 0
; Authoritative Result = false
; Truncated Result = false
; Recursion Desired = true
; Recursion Available = true
; Result = No error

;;; QUESTIONS

;www.google.com. IN A

;;; ANSWERS

www.google.com. 206 IN A 74.125.239.148
www.google.com. 206 IN A 74.125.239.145
www.google.com. 206 IN A 74.125.239.144
www.google.com. 206 IN A 74.125.239.147
www.google.com. 206 IN A 74.125.239.146

;;; NAMESERVERS

;;; ADDITIONAL