wsdd(8)
okay bestie, this is wsdd(8) from the System Managerβs Manual β the Web Service Discovery host + client daemon page, rewritten so it actually hits π
πΈ NAME πΈ
wsdd β a Web Service Discovery host and client daemon. Thatβs the whole vibe: it handles WSD hosting and WSD client/discovery duties π
β¨ SYNOPSIS β¨
wsdd [options]
π DESCRIPTION π
wsdd implements both a Web Service Discovery (WSD) host and a WSD client daemon. The host side lets (Samba) hosts β like your local NAS device β be found by Web Service Discovery clients like Windows. The client mode lets you search for other WSD hosts on the local network π«Ά
The default mode of operation is host mode. The client or discovery mode must be enabled explicitly. Unless configured otherwise, host mode is always active. Both modes can be used at the same time, no cap β¨
π OPTIONS π
okay, option dump time. every flag is here, nobody is getting skipped π
π General options π
-4,--ipv4onlyβ the manpage literally says βSee below.β π check the-6bullet for the address-family tea.-6,--ipv6onlyβ restrict to the given address family. If both this and-4/--ipv4onlyare specified, no addresses will be available andwsddwill exit. π-A,--no-autostartβ do not start networking activities automatically when the program is started. The API interface (see below) can be used to start and stop the networking activities while the application is running ποΈ-c DIRECTORY,--chroot DIRECTORYβ chroot into the given DIRECTORY after initialization has been performed and right before the handling of incoming messages starts. The new root directory can be empty. Consider using the-uoption as well π§-h,--helpβ show help and exit. classic.-H HOPLIMIT,--hoplimit HOPLIMITβ set the hop limit for multicast packets. The default is1, which should prevent packets from leaving the local network segment π-i INTERFACE/ADDRESS,--interface INTERFACE/ADDRESSβ specify which interfaceswsddwill be listening on. If no interfaces are specified, all interfaces are used. Loop-back interfaces are never used, even when explicitly specified. For interfaces with IPv6 addresses, only link-local addresses will be used for announcing the host on the network. This option can be provided multiple times to restrict traffic to more than one interface. This option also accepts IP addresses that the service should bind to. For IPv6, only link local addresses are actually considered as noted above π--metadata-timeout TIMEOUTβ set the timeout for HTTP-based metadata exchange. Default is2.0seconds β±οΈ--source-port ORTβ set the source port for outgoing multicast messages, so that replies will use this as the destination port. This is useful for firewalls that do not detect incoming unicast replies to a multicast as part of the flow, so the port needs to be fixed in order to be allowed manually π₯-s,--shortlogβ use a shorter logging format that only includes the level and message. This is useful in cases where the logging mechanism, like systemd on Linux, automatically prepends a date and process name plus ID to the log message πͺ΅-u USER[:GROUP],--user USER[:GROUP]β change user (and group) when running before handling network packets. Together with-c, this option can be used to increase security if the execution environment, like the init system, cannot ensure this in another way π-U UUID,--uuid UUIDβ the WSD specification requires a device to have a unique address that is stable across reboots or changes in networks. In the context of the standard, it is assumed that this is something like a serial number.wsddattempts to read the machine ID from/etc/machine-idand/etc/hostid(in that order) before potentially chrooting in another environment. If reading the machine ID fails,wsddfalls back to a version 5 UUID with the DNS namespace and the host name of the local machine as inputs. Thus, the host name should be stable and not be modified, e.g. by DHCP. However, if you wantwsddto use a specific UUID you can use this option π-v,--verboseβ additively increase verbosity of the log output. A single occurrence of-v/--verbosesets the log level toINFO. More-voptions set the log level toDEBUGπ£οΈ-V,--versionβ show the version number and exit π
π Host Mode Options π
-d DOMAIN,--domain DOMAINβ assume that the host runningwsddjoined an ADS domain. This will makewsddreport the host being a domain member. It disables workgroup membership reporting. The (provided) hostname is automatically converted to lower case. Use the-poption to change this behavior π°-n HOSTNAME,--hostname HOSTNAMEβ override the host namewsdduses during discovery. By default the machineβs host name is used (look athostname(1)). Only the host name part of a possible FQDN will be used in the default case π·οΈ-o,--no-hostβ disable host operation mode. If this option is provided, the host cannot be discovered by other (Windows) hosts. It can be useful when client/discovery mode is used and no announcement of the host that runswsddshould be made π-p,--preserve-caseβ preserve the hostname as it is. Without this option, the hostname is converted as follows. For workgroup environments (see-w) the hostname is made upper case by default. Vice versa it is made lower case for usage in domains (see-d) π-t,--no-httpβ do not service HTTP requests of the WSD protocol. This option is intended for debugging purposes where another process may handle the Get messages π§ͺ-w WORKGROUP,--workgroup WORKGROUPβ by defaultwsddreports the host is a member of a workgroup rather than a domain (use the-d/--domainoption to override this). With-w/--workgroupthe default workgroup name can be changed. The default work group name isWORKGROUP. The (provided) hostname is automatically converted to upper case. Use the-poption to change this behavior π―
π¦ Client/Discovery Mode Options π¦
-D,--discoveryβ enable discovery mode to search for other WSD hosts/servers. Found hosts are logged withINFOpriority. The server interface (see below) can be used for a programmatic interface. Refer to the man page for details of the server interface π-l PATH/PORT,--listen PATH/PORTβ specify the location of the socket for the server programming interface. If the option value is numeric, it is interpreted as numeric port for a TCP server port. Then, the server socket is bound to the localhost only. If the option value is non-numeric, it is assumed to be a path to UNIX domain socket to which a client can connect to π§¦
π EXAMPLE USAGE π
π Handle traffic on eth0 and eth2 only, but only with IPv6 addresses π
wsdd -i eth0 -i eth2 -6
or
wsdd --interface eth0 --interface eth2 --ipv6only
π Set the Workgroup according to smb.conf, be verbose, run with dropped privileges, and change the root directory to an (empty) directory π
SMB_GROUP=$(grep -i '^\s*workgroup\s*=' smb.conf | cut -f2 -d= | tr
-d '[:blank:]')
wsdd -v -w $SMB_GROUP -u daemon:daemon -c /var/run/wsdd/chroot
π₯ FIREWALL SETUP π₯
Traffic for the following ports, directions and addresses must be allowed:
- Incoming and outgoing traffic to
udp/3702with multicast destination:239.255.255.250for IPv4 andff02::cfor IPv6 - Outgoing unicast traffic from
udp/3702 - Incoming traffic to
tcp/5357
You should further restrict the traffic to the (link-)local subnet, e.g. by using the fe80::/10 address space for IPv6. Please note that IGMP traffic must be enabled in order to get IPv4 multicast traffic working π¨
π» API INTERFACE π»
okay bestie, so wsdd has this text-based, line-oriented API interface that lets you query info and trigger actions, and it's giving very direct, very "talk to me" energy. You can use it over TCP and UNIX domain sockets (peep the -l/--listen option), but heads up: the TCP socket is bound to the local host only. No random internet gremlins invited. π«Ά
The following commands can be issued:
π§Ή clear - Clear list of discovered devices π§Ή
Clears the list of all discovered devices. Use the probe command to search for devices again. This command does not return any data and is only available in discover mode.
π list [TYPE] - List discovered devices π
Returns a tab-separated list of discovered devices of the provided TYPE (e.g. "pub:Computer") with the following information. If no type is provided, all discovered devices are listed. The possibly empty list of detected hosts is always terminated with a single dot ('.') in an otherwise empty line. This command is only available in discover mode.
URIβ URI of the discovered device. Note that a multi-homed device should appear only once but with multiple addresses (see below).nameβ the name reported by the device. For discovered Windows hosts, it is the configured computer name that is reported here.associationβ specifies the domain or workgroup to which the discovered host belongs to. The type of the association (workgroup or domain) is separated from its value by a colon.last_seenβ the date and time the device was last seen as a consequence of Probe/Hello messages provided in ISO8601 with seconds.addressesβ list of all transport addresses that were collected during the discovery process delimited by commas. Addresses are provided along with the interface (separated by%) on which they were discovered. IPv6 addresses are reported in square brackets. Note that the reported addresses may not match the actual device on which the device may be reached.typesβ types of the detected device, delimited by commas.
π‘ probe [INTERFACE] - Search for devices π‘
Triggers a Probe message on the provided INTERFACE (eth0, e.g.) to search for WSD hosts. If no interface is provided, all interfaces wsdd listens on are probed. A Probe message initiates the discovery message flow. It may take some time for hosts to be actually discovered. This command does not return any data and is only available in discovery mode.
βΆοΈ start - Start networking activities βΆοΈ
This command starts the networking activities of wsdd if they haven't been started yet. "Hello" messages are emitted and the host is announced on the network(s) when the host mode is active. If the discovery mode is enabled a probe process is also started.
βΉοΈ stop - Stop networking activities βΉοΈ
This is the reverse operation to start. When this command is received, "Bye" messages are sent in order to notify hosts in the network about the host's disappearance. All networking sockets used for the WSD protocol are closed as well. Activities can be restarted with the start operation.
π SECURITY π
wsdd does not implement any security feature, e.g. by using TLS for the http service. This is because wsdd's intended usage is within private, i.e. home, LANs. The Hello message contains the host's transport address, i.e. the IP address which speeds up discovery (avoids Resolve message). π
π KNOWN ISSUES π
π§ Using only IPv6 on FreeBSD π§
If wsdd is running on FreeBSD using IPv6 only, the host running wsdd may not be reliably discovered. The reason appears to be that Windows is not always able to connect to the HTTP service for unknown reasons. As a workaround, run wsdd with IPv4 only.
π Tunnel/Bridge Interface π
If tunnel/bridge interfaces like those created by OpenVPN or Docker exist, they may interfere with wsdd if executed without providing an interface that it should bind to (so it binds to all). In such cases, the wsdd host appears after wsdd has been started but it disappears when an update of the Network view in Windows Explorer is forced, either by refreshing the view or by a reboot of the Windows machine. To solve this issue, the interface that is connected to the network on which the host should be announced needs to be specified with the -i/--interface option. This prevents the usage of the tunnel/bridge interfaces.
Background: Tunnel/bridge interfaces may cause Resolve requests from Windows hosts to be delivered to wsdd multiple times, i.e. duplicates of such request are created. If wsdd receives such a request first from a tunnel/bridge it uses the transport address (IP address) of that interface and sends the response via unicast. Further duplicates are not processed due to the duplicate message detection which is based on message UUIDs. The Windows host which receives the response appears to detect a mismatch between the transport address in the ResolveMatch message (which is the tunnel/bridge address) and the IP of the sending host/interface (LAN IP, e.g.). Subsequently, the wsdd host is ignored by Windows. π
okay that's the whole page, bestie β the footer tea is wsdd(8) with its source/version and date doing their iconic little thing at the bottom, and you are now officially caught up. go announce yourself to the LAN like the main character you are π
β¨
π¦ where this page comes from
- arch rolling: wsdd 0.9-2 Β· MIT
- nixpkgs unstable: wsdd 0.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms