-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add socket-activated systemd service for discovery (#218)
Introduce a system-wide daemon listening on /run/wsdd.socket, which is managed by systemd. When a client first connects to the socket the daemon is started. Multiple clients can connect and safely use the API simultaneously. The service runs in discovery-only mode. Uses a fixed multicast source-port 37020, which is used by the socket-activated discovery daemon. Allow port 37020 in firewall profiles and split configurations for discovery (client) and host roles. Co-authored-by: Steffen Christgau <[email protected]>
- Loading branch information
Showing
10 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<service> | ||
<short>Web Services Dynamic Discovery client</short> | ||
<description>Discovery of other Web Services Dynamic Discovery hosts, using a fixed UDP source port for the client (wsdd)</description> | ||
<port port="37020" protocol="udp"/> | ||
<destination ipv4="239.255.255.250" ipv6="FF02::C"/> | ||
</service> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<service> | ||
<short>Web Services Dynamic Discovery host daemon (HTTP Interface)</short> | ||
<description>wsdd implements a Web Service Discovery host daemon. This enables (Samba) hosts, like your local NAS device, to be found by Web Service Discovery Clients like Windows.</description> | ||
<short>Web Services Dynamic Discovery HTTP Interface</short> | ||
<description>HTTP interface of the Web Service Discovery host daemon, such as wsdd. This service enables the host to be discovered by WSD clients such as Windows.</description> | ||
<port port="5357" protocol="tcp"/> | ||
</service> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=Web Services Dynamic Discovery service | ||
Documentation=man:wsdd(8) | ||
Requires=wsdd-discovery.socket | ||
|
||
[Service] | ||
Type=simple | ||
; Use /etc/default/wsdd for defaults, if it exists | ||
EnvironmentFile=-/etc/default/wsdd | ||
; The service is put into an empty runtime directory chroot, | ||
; i.e. the runtime directory which usually resides under /run | ||
ExecStart=/usr/bin/wsdd --shortlog --chroot=/run/wsdd-discovery --source-port=37020 --no-host --discovery $WSDD_DISCOVERY_PARAMS | ||
DynamicUser=yes | ||
User=wsdd-discovery | ||
Group=wsdd-discovery | ||
RuntimeDirectory=wsdd-discovery | ||
AmbientCapabilities=CAP_SYS_CHROOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Web Services Dynamic Discovery API socket | ||
Documentation=man:wsdd(8) | ||
|
||
[Socket] | ||
ListenStream=%t/wsdd.socket | ||
|
||
[Install] | ||
WantedBy=sockets.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
# Refer to the wsdd(8) man page for details | ||
|
||
WSDD_PARAMS="" | ||
WSDD_DISCOVERY_PARAMS="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[wsd-client] | ||
title=WSD Client | ||
description=Allow discovery of WSD-supporting devices on the local network | ||
ports=37020/udp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[wsdd] | ||
title=WSD Host | ||
description=Make host visible for device discovery | ||
ports=3702/udp|5357/tcp |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters