Merge branch 'master' of git://factorcode.org/git/factor
commit
f3f1ec8b43
|
@ -2,7 +2,8 @@
|
||||||
USING: kernel sequences combinators accessors locals random
|
USING: kernel sequences combinators accessors locals random
|
||||||
combinators.short-circuit
|
combinators.short-circuit
|
||||||
io.sockets
|
io.sockets
|
||||||
dns dns.util dns.cache.rr dns.cache.nx ;
|
dns dns.util dns.cache.rr dns.cache.nx
|
||||||
|
dns.resolver ;
|
||||||
|
|
||||||
IN: dns.forwarding
|
IN: dns.forwarding
|
||||||
|
|
||||||
|
@ -99,7 +100,9 @@ IN: dns.forwarding
|
||||||
MSG additional-section>> [ cache-add ] each
|
MSG additional-section>> [ cache-add ] each
|
||||||
MSG ;
|
MSG ;
|
||||||
|
|
||||||
: answer-from-server ( msg servers -- msg ) random ask-server cache-message ;
|
! : answer-from-server ( msg servers -- msg ) random ask-server cache-message ;
|
||||||
|
|
||||||
|
: answer-from-server ( msg servers -- msg ) ask-servers cache-message ;
|
||||||
|
|
||||||
:: find-answer ( MSG SERVERS -- msg )
|
:: find-answer ( MSG SERVERS -- msg )
|
||||||
{ [ MSG answer-from-cache ] [ MSG SERVERS answer-from-server ] } 0|| ;
|
{ [ MSG answer-from-cache ] [ MSG SERVERS answer-from-server ] } 0|| ;
|
||||||
|
|
|
@ -60,7 +60,7 @@ IN: dns.resolver
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
: dns-ip ( name -- ips )
|
: dns-ip4 ( name -- ips )
|
||||||
fully-qualified
|
fully-qualified
|
||||||
[let | MSG [ A IN query boa query->message dns-servers ask-servers ] |
|
[let | MSG [ A IN query boa query->message dns-servers ask-servers ] |
|
||||||
MSG rcode>> NO-ERROR =
|
MSG rcode>> NO-ERROR =
|
||||||
|
@ -68,3 +68,5 @@ IN: dns.resolver
|
||||||
[ "dns-ip: rcode = " MSG rcode>> unparse append throw ]
|
[ "dns-ip: rcode = " MSG rcode>> unparse append throw ]
|
||||||
if ] ;
|
if ] ;
|
||||||
|
|
||||||
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue