;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'dns) #@400 Perform SRV lookup of TARGET and return list of connection candidiates. TARGET is a string of the form "_Service._Proto.Name". Returns a list with elements of the form (HOST . PORT), where HOST is a hostname and PORT is a numeric port. The caller is supposed to make connection attempts in the order given, starting from the beginning of the list. The list is empty if no SRV records were found. (defalias 'srv-lookup #[(target) "\306!\307\310\302 \236A@\"\311\211\n?\206%\nG\312=\205%\300\n@\236A@\313\230?\205 \n\311\211\203h@\314 \236A@\211\f \236\211\203V\211 AB\241\210)\202^\f CB B*A\211\2042*\315 \316\"\211\311\211\203@\317\311A\311\211\203\255@\320 \236A@\\\211 BBA\211\204\216*\237\203\375\321T!\3222\352\311\211\205\350@\211@Y\203\336\323\322 \"\210A\211\204\315\311*0\211A\fB\324\"*\202\263*A\211\204x*\307\325\f\237\",\207" [target result answers answers-by-priority weighted-result a srv--dns-query mapcar #[(a) "\301\236A@\207" [a data] 2] nil 1 "." priority sort #[(a b) "@ @W\207" [a b] 2] 0 weight random --cl-block-nil-- throw delq #[(a) "\301\236A@\302\236A@B\207" [a target port] 3] --dolist-tail-- entry #1=#:v p weight-order weight-acc r next-entry] 5 (#$ . 103)]) #@105 Perform DNS query for TARGET. On Windows, call `srv--nslookup'; on all other systems, call `dns-query'. (defalias 'srv--dns-query #[(target) "\301\302\303\"\203 \304\305\306#\207\307!\207" [target featurep make-network-process (:type datagram) dns-query SRV t srv--nslookup] 4 (#$ . 1419)]) #@62 Call the `nslookup' program to make an SRV query for TARGET. (defalias 'srv--nslookup #[(target) "\303\304\305\"rq\210\306\216\307\310\311\305\311\312 &\210eb\210\311\313\314\311\305#\203F\315\316\317\320\321!!D\322\317\320\323!!D\324\317\320\325!!D\301\320\326!DFDC\nB\202\327\n,DC\207" [#1=#:temp-buffer target results generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] call-process "nslookup" nil "-type=srv" search-forward-regexp "[ ]*priority += \\(.*\\) ?\n[ ]*weight += \\(.*\\) ?\n[ ]*port += \\(.*\\) ?\n[ ]*svr hostname += \\(.*\\) ?\n" data priority string-to-number match-string 1 weight 2 port 3 4 answers] 7 (#$ . 1719)]) (provide 'srv)