MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.131.85.46
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/net/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/net/zeroconf.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:39 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/net/zeroconf.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'dbus)
#@41 Write messages during service discovery
(defvar zeroconf-debug nil (#$ . 571))
#@39 The D-Bus name used to talk to Avahi.
(defconst zeroconf-service-avahi "org.freedesktop.Avahi" (#$ . 656))
#@51 The D-Bus root object path used to talk to Avahi.
(defconst zeroconf-path-avahi "/" (#$ . 769))
#@71 The D-Bus object path used to talk to the Avahi service type browser.
(defvar zeroconf-path-avahi-service-type-browser nil (#$ . 871))
#@67 The D-Bus object paths used to talk to the Avahi service browser.
(defvar zeroconf-path-avahi-service-browser-hash (make-hash-table :test 'equal) (#$ . 1012))
#@68 The D-Bus object paths used to talk to the Avahi service resolver.
(defvar zeroconf-path-avahi-service-resolver-hash (make-hash-table :test 'equal) (#$ . 1177))
#@52 The D-Bus entry group interface exported by Avahi.
(defconst zeroconf-interface-avahi-entry-group (concat zeroconf-service-avahi ".EntryGroup") (#$ . 1344))
#@47 The D-Bus server interface exported by Avahi.
(defconst zeroconf-interface-avahi-server (concat zeroconf-service-avahi ".Server") (#$ . 1507))
#@61 The D-Bus service type browser interface exported by Avahi.
(defconst zeroconf-interface-avahi-service-type-browser (concat zeroconf-service-avahi ".ServiceTypeBrowser") (#$ . 1656))
#@56 The D-Bus service browser interface exported by Avahi.
(defconst zeroconf-interface-avahi-service-browser (concat zeroconf-service-avahi ".ServiceBrowser") (#$ . 1845))
#@57 The D-Bus service resolver interface exported by Avahi.
(defconst zeroconf-interface-avahi-service-resolver (concat zeroconf-service-avahi ".ServiceResolver") (#$ . 2020))
#@32 Wildcard Avahi interface spec.
(defconst zeroconf-avahi-interface-unspec -1 (#$ . 2198))
#@31 Wildcard Avahi protocol spec.
(defconst zeroconf-avahi-protocol-unspec -1 (#$ . 2293))
#@38 Avahi INET4 address protocol family.
(defconst zeroconf-avahi-protocol-inet4 0 (#$ . 2386))
#@38 Avahi INET6 address protocol family.
(defconst zeroconf-avahi-protocol-inet6 1 (#$ . 2484))
#@21 Empty Avahi domain.
(defconst zeroconf-avahi-domain-unspec "" (#$ . 2582))
#@40 Domain name services are resolved for.
(defvar zeroconf-avahi-current-domain zeroconf-avahi-domain-unspec (#$ . 2663))
#@17 No Avahi flags.
(defconst zeroconf-avahi-flags-unspec 0 (#$ . 2788))
#@1430 Hash table of discovered Avahi services.

The key of an entry is the concatenation of the service name and
service type of a discovered service.  The value is the service
itself.  The format of a service is

  (INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS)

The INTERFACE is a number, which represents the network interface
the service is located at.  The corresponding network interface
name, like "eth0", can be retrieved with the function
`zeroconf-get-interface-name'.

PROTOCOL describes the used network protocol family the service
can be accessed.  `zeroconf-avahi-protocol-inet4' means INET4,
`zeroconf-avahi-protocol-inet6' means INET6.  An unspecified
protocol family is coded with `zeroconf-avahi-protocol-unspec'.

NAME is the string the service is known at Avahi.  A service can
be known under the same name for different service types.

Each TYPE stands for a discovered service type of Avahi.  The
format is described in RFC 2782.  It is of the form

  "_APPLICATION-PROTOCOL._TRANSPORT-PROTOCOL".

TRANSPORT-PROTOCOL must be either "tcp" or "udp".
APPLICATION-PROTOCOL must be a protocol name as specified in URL
`http://www.dns-sd.org/ServiceTypes.html'.  Typical service types
are "_workstation._tcp" or "_printer._tcp".

DOMAIN is the domain name the service is registered in, like "local".

FLAGS, an integer, is used inside Avahi.  When publishing a
service (see `zeroconf-publish-service', the flag 0 is used.
(defvar zeroconf-services-hash (make-hash-table :test 'equal) (#$ . 2865))
#@1120 Hash table of resolved Avahi services.
The key of an entry is the concatenation of the service name and
service type of a resolved service.  The value is the service
itself.  The format of a service is

  (INTERFACE PROTOCOL NAME TYPE DOMAIN HOST APROTOCOL ADDRESS PORT TXT FLAGS)

INTERFACE, PROTOCOL, NAME, TYPE, DOMAIN and FLAGS have the same
meaning as in `zeroconf-services-hash'.

HOST is the host name the service is registered.  It is a fully
qualified name, i.e., it contains DOMAIN.

APROTOCOL stands for the network protocol family ADDRESS is
encoded (`zeroconf-avahi-protocol-inet4' means INET4,
`zeroconf-avahi-protocol-inet6' means INET6).  It can be
different from PROTOCOL, when an address resolution has been
requested for another protocol family but the default one.

ADDRESS is the service address, encoded according to the
APROTOCOL network protocol family.  PORT is the corresponding
port the service can be reached on ADDRESS.

TXT is an array of strings, describing additional attributes of
the service.  Usually, every string is a key=value pair.  The
supported keys depend on the service type.
(defvar zeroconf-resolved-services-hash (make-hash-table :test 'equal) (#$ . 4377))
#@53 Returns all discovered Avahi service names as list.
(defalias 'zeroconf-list-service-names #[nil "\302\303\304	\"\210)\207" [result zeroconf-services-hash nil maphash #[(key value) "\301\302\303!\"\207" [value add-to-list result zeroconf-service-name] 4]] 3 (#$ . 5586)])
#@53 Returns all discovered Avahi service types as list.
(defalias 'zeroconf-list-service-types #[nil "\302\303\304	\"\210)\207" [result zeroconf-services-hash nil maphash #[(key value) "\301\302\303!\"\207" [value add-to-list result zeroconf-service-type] 4]] 3 (#$ . 5867)])
#@261 Returns all discovered Avahi services for a given service type TYPE.
The service type is one of the returned values of
`zeroconf-list-service-types'.  The return value is a list
(SERVICE1 SERVICE2 ...).  See `zeroconf-services-hash' for the
format of SERVICE.
(defalias 'zeroconf-list-services #[(type) "\302\303\304	\"\210)\207" [result zeroconf-services-hash nil maphash #[(key value) "\302	!\232\205\f\303\304	\"\207" [type value zeroconf-service-type add-to-list result] 3]] 3 (#$ . 6149)])
#@86 Hash table of hooks for newly added services.
The key of an entry is a service type.
(defvar zeroconf-service-added-hooks-hash (make-hash-table :test 'equal) (#$ . 6654))
#@82 Hash table of hooks for removed services.
The key of an entry is a service type.
(defvar zeroconf-service-removed-hooks-hash (make-hash-table :test 'equal) (#$ . 6831))
#@741 Add FUNCTION to the hook of service type TYPE.

EVENT must be either :new or :removed, indicating whether
FUNCTION shall be called when a new service has been newly
detected, or removed.

FUNCTION must accept one argument SERVICE, which identifies the
new service.  Initially, when EVENT is :new, FUNCTION is called
for all already detected services of service type TYPE.

The attributes of SERVICE can be retrieved via the functions

  `zeroconf-service-interface'
  `zeroconf-service-protocol'
  `zeroconf-service-name'
  `zeroconf-service-type'
  `zeroconf-service-domain'
  `zeroconf-service-flags'
  `zeroconf-service-host'
  `zeroconf-service-aprotocol'
  `zeroconf-service-address'
  `zeroconf-service-port'
  `zeroconf-service-txt'
(defalias 'zeroconf-service-add-hook #[(type event function) "\306\232\2036\307	\n\310#\311\303\f\"\210\312	\n#\210\313	!\310\211\2054@\f
!\210A\211\204\"\310+\207\314\232\203P\307	\310#\311\303\f\"\210\312	#)\207\315\316!\207" [event type zeroconf-service-added-hooks-hash l-hook function service :new gethash nil add-hook puthash zeroconf-list-services :removed error "EVENT must be either `:new' or `:removed'" --dolist-tail-- zeroconf-service-removed-hooks-hash] 5 (#$ . 7007)])
#@156 Remove FUNCTION from the hook of service type TYPE.

EVENT must be either :new or :removed and has to match the event
type used when registering FUNCTION.
(defalias 'zeroconf-service-remove-hook #[(type event function) "\306\232\203\n	\202\307\232\203\n\202\310\311!\312\f\313#\314\305\"\210
\2030\315\f
#\2024\316\f\"*\207" [event zeroconf-service-added-hooks-hash zeroconf-service-removed-hooks-hash table type l-hook :new :removed error "EVENT must be either `:new' or `:removed'" gethash nil remove-hook puthash remhash function] 4 (#$ . 8261)])
#@40 Returns the local host name as string.
(defalias 'zeroconf-get-host #[nil "\303\304	\n\305%\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server dbus-call-method :system "GetHostName"] 6 (#$ . 8835)])
#@36 Returns the domain name as string.
(defalias 'zeroconf-get-domain #[nil "\303\304	\n\305%\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server dbus-call-method :system "GetDomainName"] 6 (#$ . 9071)])
#@45 Returns the local host name FQDN as string.
(defalias 'zeroconf-get-host-domain #[nil "\303\304	\n\305%\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server dbus-call-method :system "GetHostNameFqdn"] 6 (#$ . 9307)])
#@57 Return the interface name of internal interface NUMBER.
(defalias 'zeroconf-get-interface-name #[(number) "\304\305	\n\306\307&\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server number dbus-call-method :system "GetNetworkInterfaceNameByIndex" :int32] 8 (#$ . 9559)])
#@57 Return the internal interface number of interface NAME.
(defalias 'zeroconf-get-interface-number #[(name) "\304\305	\n\306&\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server name dbus-call-method :system "GetNetworkInterfaceIndexByName"] 7 (#$ . 9866)])
#@205 Return the service description of service NAME as list.
NAME must be a string.  The service must be of service type
TYPE. The resulting list has the format

  (INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS).
(defalias 'zeroconf-get-service #[(name type) "\303\304	Q\n\305#\207" [name type zeroconf-services-hash gethash "/" nil] 4 (#$ . 10161)])
#@228 Return all service attributes SERVICE as list.
NAME must be a string.  The service must be of service type
TYPE. The resulting list has the format

  (INTERFACE PROTOCOL NAME TYPE DOMAIN HOST APROTOCOL ADDRESS PORT TXT FLAGS).
(defalias 'zeroconf-resolve-service #[(service) "\305!\306!	\307\nQ\310\f\311#\206\312\313\314\217+\207" [service name type key zeroconf-resolved-services-hash zeroconf-service-name zeroconf-service-type "/" gethash nil err (byte-code "\306\307	\n\310\f
\f
\f&\f\3118\211\2030\312@!\240\210A\211\204\313#*\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-avahi-interface-unspec zeroconf-avahi-protocol-unspec name dbus-call-method :system "ResolveService" 9 dbus-byte-array-to-string puthash type zeroconf-avahi-current-domain zeroconf-avahi-flags-unspec result elt key zeroconf-resolved-services-hash] 14) ((dbus-error (byte-code "\205\n\302	@	A\"\207" [dbus-debug err signal] 3)))] 4 (#$ . 10511)])
#@50 Return the internal interface number of SERVICE.
(defalias 'zeroconf-service-interface #[(service) "@\207" [service] 1 (#$ . 11525)])
#@40 Return the protocol number of SERVICE.
(defalias 'zeroconf-service-protocol #[(service) "A@\207" [service] 1 (#$ . 11666)])
#@37 Return the service name of SERVICE.
(defalias 'zeroconf-service-name #[(service) "\3018\207" [service 2] 2 (#$ . 11797)])
#@34 Return the type name of SERVICE.
(defalias 'zeroconf-service-type #[(service) "\3018\207" [service 3] 2 (#$ . 11926)])
#@36 Return the domain name of SERVICE.
(defalias 'zeroconf-service-domain #[(service) "\3018\207" [service 4] 2 (#$ . 12052)])
#@30 Return the flags of SERVICE.
(defalias 'zeroconf-service-flags #[(service) "\3018\207" [service 5] 2 (#$ . 12182)])
#@34 Return the host name of SERVICE.
(defalias 'zeroconf-service-host #[(service) "\301\302!8\207" [service 5 zeroconf-resolve-service] 3 (#$ . 12305)])
#@41 Return the aprotocol number of SERVICE.
(defalias 'zeroconf-service-aprotocol #[(service) "\301\302!8\207" [service 6 zeroconf-resolve-service] 3 (#$ . 12461)])
#@35 Return the IP address of SERVICE.
(defalias 'zeroconf-service-address #[(service) "\301\302!8\207" [service 7 zeroconf-resolve-service] 3 (#$ . 12629)])
#@36 Return the port number of SERVICE.
(defalias 'zeroconf-service-port #[(service) "\301\302!8\207" [service 8 zeroconf-resolve-service] 3 (#$ . 12789)])
#@37 Return the text strings of SERVICE.
(defalias 'zeroconf-service-txt #[(service) "\301\302!8\207" [service 9 zeroconf-resolve-service] 3 (#$ . 12947)])
#@159 Instantiate an Avahi service type browser for domain DOMAIN.
DOMAIN is a string, like "dns-sd.org" or "local".  When
DOMAIN is nil, the local domain is used.
(defalias 'zeroconf-init #[(&optional domain) "\203	;\205u\306\307	\"\205u\310\307	\n\311%\205u\312\206!
\313!\210\313!\210\313!\210\313!\210\313!\210\313!\210\314 \315\312\211\203j@\316\307	\317&\210A\211\204O+\316\307	\n\320\317&\207" [domain zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-path-avahi-service-type-browser zeroconf-avahi-domain-unspec dbus-ping :system dbus-call-method "GetVersionString" nil clrhash zeroconf-register-service-type-browser ("ItemNew" "ItemRemove" "Failure") dbus-register-signal zeroconf-service-type-browser-handler "StateChanged" zeroconf-avahi-current-domain zeroconf-path-avahi-service-browser-hash zeroconf-path-avahi-service-resolver-hash zeroconf-services-hash zeroconf-resolved-services-hash zeroconf-service-added-hooks-hash zeroconf-service-removed-hooks-hash object-path member --dolist-tail-- zeroconf-interface-avahi-service-type-browser] 8 (#$ . 13106)])
#@54 Register a service type browser at the Avahi daemon.
(defalias 'zeroconf-register-service-type-browser #[nil "\206\306\307	\n\310\f
	\n&	\211\207" [zeroconf-path-avahi-service-type-browser zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-avahi-interface-unspec zeroconf-avahi-protocol-unspec dbus-call-method :system "ServiceTypeBrowserNew" zeroconf-avahi-current-domain zeroconf-avahi-flags-unspec] 10 (#$ . 14261)])
#@62 Registered service type browser handler at the Avahi daemon.
(defalias 'zeroconf-service-type-browser-handler #[(&rest val) "\203\f\306\307\310	!\n#\210\310	!\311\230\205:\312\313\n8!\314\315\211\2059
@\316\317\f\320&\210
A\211\204\"\315+\207" [zeroconf-debug last-input-event val object-path member --dolist-tail-- message "zeroconf-service-type-browser-handler: %s %S" dbus-event-member-name "ItemNew" zeroconf-register-service-browser 2 ("ItemNew" "ItemRemove" "Failure") nil dbus-register-signal :system zeroconf-service-browser-handler zeroconf-service-avahi zeroconf-interface-avahi-service-browser] 8 (#$ . 14727)])
#@49 Register a service browser at the Avahi daemon.
(defalias 'zeroconf-register-service-browser #[(type) "\306	\307#\206\310\311\312\n\f\313
\f
&\n	#\207" [type zeroconf-path-avahi-service-browser-hash zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-avahi-interface-unspec gethash nil puthash dbus-call-method :system "ServiceBrowserNew" zeroconf-avahi-protocol-unspec zeroconf-avahi-current-domain zeroconf-avahi-flags-unspec] 13 (#$ . 15372)])
#@57 Registered service browser handler at the Avahi daemon.
(defalias 'zeroconf-service-browser-handler #[(&rest val) "\203\f\306\307\310	!\n#\210\311\n!\312\n!\313\fQ\314\f\315#\314\f\315#\310	!\316\230\203?\317
\n#\210\320\321\n\"\202W\310	!\322\230\205W\323
\"\210\323
\"\210\320\324\n\"-\207" [zeroconf-debug last-input-event val name type key message "zeroconf-service-browser-handler: %s %S" dbus-event-member-name zeroconf-service-name zeroconf-service-type "/" gethash nil "ItemNew" puthash run-hook-with-args ahook "ItemRemove" remhash rhook zeroconf-service-added-hooks-hash zeroconf-service-removed-hooks-hash zeroconf-services-hash zeroconf-resolved-services-hash] 4 (#$ . 15867)])
#@50 Register a service resolver at the Avahi daemon.
(defalias 'zeroconf-register-service-resolver #[(name type) "\306	Q\307\n\310#\206'\311\n\312\313\f

\314	&\f#)\207" [name type key zeroconf-path-avahi-service-resolver-hash zeroconf-service-avahi zeroconf-path-avahi "/" gethash nil puthash dbus-call-method :system "ServiceResolverNew" zeroconf-interface-avahi-server zeroconf-avahi-interface-unspec zeroconf-avahi-protocol-unspec zeroconf-avahi-current-domain zeroconf-avahi-flags-unspec zeroconf-resolved-services-hash] 15 (#$ . 16586)])
#@58 Registered service resolver handler at the Avahi daemon.
(defalias 'zeroconf-service-resolver-handler #[(&rest val) "\3058\211\203	\306	@!\240\210	A\211\204)\n\203#\307\310\311!#\210\311!\312\230\2057\313\314!\315\316!Q\f#\207" [val elt zeroconf-debug last-input-event zeroconf-resolved-services-hash 9 dbus-byte-array-to-string message "zeroconf-service-resolver-handler: %s %S" dbus-event-member-name "Found" puthash zeroconf-service-name "/" zeroconf-service-type] 6 (#$ . 17150)])
#@113 Publish a service at the Avahi daemon.
For the description of arguments, see `zeroconf-resolved-services-hash'.
(defalias 'zeroconf-publish-service #[(name type domain host port address txt) "\306G!\203\f\307\310\"\210\306	G!\203\307\311	\"\210\306\nG!\203\"\312 \306G!\203,\313 \f\2042\314\315\316
\317%\320\320\211\203a@\321\322\323!\"\210A\211\204K*\315\316
 \324!\"#	\n\325\f\326\327\"&\210\306$G!\204\232\315\316
 \330!\"#$&\n\210\315\316
 \331%*\207" [name type domain host port zeroconf-service-avahi zerop error "Invalid argument NAME: %s" "Invalid argument TYPE: %s" zeroconf-get-domain zeroconf-get-host-domain 0 dbus-call-method :system "EntryGroupNew" nil add-to-list result dbus-string-to-byte-array "AddService" :uint16 append (:array) "AddAddress" "Commit" zeroconf-path-avahi zeroconf-interface-avahi-server object-path txt elt --dolist-tail-- zeroconf-interface-avahi-entry-group zeroconf-avahi-interface-unspec zeroconf-avahi-protocol-unspec zeroconf-avahi-flags-unspec address] 19 (#$ . 17657)])
(provide 'zeroconf)

MMCT - 2023