mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-01 06:21:56 -09:00
package/ssdp-responder: new package
Small (35k), and stand-alone, SSDP responder with built-in web server
(on port 1901) for serving description.xml when Windows scans for any
network devices on the LAN. Also includes ssdp-scan (31k), similar to
the mdns-scan tool, to probe for SSDP capable devices.
Although it does not use fork(), it still fails to build on noMMU: lots
of missing function declarations, and lots of multicast-related structs
definitions, causing warnings like:
ssdp-scan.c:57:12: warning: implicit declaration of function ‘strdup’; did you mean ‘strcmp’? [-Wimplicit-function-declaration]
ssdp-scan.c:57:10: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
and errors like:
ssdp.c:357:17: error: storage size of ‘imr’ isn’t known
struct ip_mreq imr;
^~~
Finding the root cause why those get not defined in MMU on uClibc is
quite a head-scratching, so let's just disablessdp-responder for noMMU
architectures.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
[yann.morin.1998@free.fr: extend commit log to explain noMMU state]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
3c4fa30f7a
commit
6d9fdc0984
@@ -1280,6 +1280,7 @@ F: configs/globalscale_espressobin_defconfig
|
|||||||
F: board/globalscale/espressobin/
|
F: board/globalscale/espressobin/
|
||||||
F: package/mg/
|
F: package/mg/
|
||||||
F: package/netcalc/
|
F: package/netcalc/
|
||||||
|
F: package/ssdp-responder/
|
||||||
|
|
||||||
N: Joao Pinto <jpinto@synopsys.com>
|
N: Joao Pinto <jpinto@synopsys.com>
|
||||||
F: board/synopsys/vdk/
|
F: board/synopsys/vdk/
|
||||||
|
|||||||
@@ -2268,6 +2268,7 @@ endif
|
|||||||
source "package/spice/Config.in"
|
source "package/spice/Config.in"
|
||||||
source "package/spice-protocol/Config.in"
|
source "package/spice-protocol/Config.in"
|
||||||
source "package/squid/Config.in"
|
source "package/squid/Config.in"
|
||||||
|
source "package/ssdp-responder/Config.in"
|
||||||
source "package/sshguard/Config.in"
|
source "package/sshguard/Config.in"
|
||||||
source "package/sshpass/Config.in"
|
source "package/sshpass/Config.in"
|
||||||
source "package/sslh/Config.in"
|
source "package/sslh/Config.in"
|
||||||
|
|||||||
20
package/ssdp-responder/Config.in
Normal file
20
package/ssdp-responder/Config.in
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
config BR2_PACKAGE_SSDP_RESPONDER
|
||||||
|
bool "ssdp-responder"
|
||||||
|
depends on BR2_USE_MMU
|
||||||
|
help
|
||||||
|
Simple Service Discovery Protocol daemon (SSDP) for networked
|
||||||
|
Linux and UNIX devices. Useful in any setup, big or small, but
|
||||||
|
targeted more at embedded systems that need to announce
|
||||||
|
themselves to Windows systems.
|
||||||
|
|
||||||
|
ssdpd is a stand-alone UNIX, no external dependencies but the
|
||||||
|
standard C library. It has a built-in web server for serving
|
||||||
|
the UPnP XML description which Windows use to present the
|
||||||
|
icon, by default an InternetGatewayDevice is announced.
|
||||||
|
|
||||||
|
Also included is ssdp-scan, a tool similar to mdns-scan, which
|
||||||
|
continuously scans for SSDP capable hosts on the network.
|
||||||
|
Take care only to use for debugging since it scans the network
|
||||||
|
quite aggressively.
|
||||||
|
|
||||||
|
https://github.com/troglobit/ssdp-responder/
|
||||||
42
package/ssdp-responder/S50ssdpd
Executable file
42
package/ssdp-responder/S50ssdpd
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
NAME=ssdpd
|
||||||
|
PIDFILE=/var/run/$NAME.pid
|
||||||
|
DAEMON=/usr/sbin/$NAME
|
||||||
|
CFGFILE=/etc/default/$NAME
|
||||||
|
|
||||||
|
DAEMON_ARGS=""
|
||||||
|
|
||||||
|
# Read configuration variable file if it is present
|
||||||
|
[ -f $CFGFILE ] && . $CFGFILE
|
||||||
|
|
||||||
|
start() {
|
||||||
|
printf 'Starting %s: ' "$NAME"
|
||||||
|
start-stop-daemon -S -q -p $PIDFILE -x $DAEMON -- $DAEMON_ARGS
|
||||||
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
printf 'Stopping %s: ' "$NAME"
|
||||||
|
start-stop-daemon -K -q -p $PIDFILE -x $DAEMON
|
||||||
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start|stop|restart)
|
||||||
|
"$1"
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart|reload}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $?
|
||||||
3
package/ssdp-responder/ssdp-responder.hash
Normal file
3
package/ssdp-responder/ssdp-responder.hash
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Locally calculated
|
||||||
|
sha256 7ae49229e7c7a55fed9e36598b12e2173eecef0fffe0a386b6a10fad30f3c79f ssdp-responder-1.8.tar.gz
|
||||||
|
sha256 e17dc0bc91bf499d8cca5e016c22c6d2a4770e3cc1a43756a7973375a83ddb90 LICENSE
|
||||||
31
package/ssdp-responder/ssdp-responder.mk
Normal file
31
package/ssdp-responder/ssdp-responder.mk
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# ssdp-responder
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
SSDP_RESPONDER_VERSION = 1.8
|
||||||
|
SSDP_RESPONDER_SITE = https://github.com/troglobit/ssdp-responder/releases/download/v$(SSDP_RESPONDER_VERSION)
|
||||||
|
SSDP_RESPONDER_LICENSE = ISC
|
||||||
|
SSDP_RESPONDER_LICENSE_FILES = LICENSE
|
||||||
|
SSDP_RESPONDER_CPE_ID_VENDOR = troglobit
|
||||||
|
SSDP_RESPONDER_DEPENDENCIES = host-pkgconf
|
||||||
|
|
||||||
|
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||||
|
SSDP_RESPONDER_DEPENDENCIES += systemd
|
||||||
|
SSDP_RESPONDER_CONF_OPTS += --with-systemd
|
||||||
|
else
|
||||||
|
SSDP_RESPONDER_CONF_OPTS += --without-systemd
|
||||||
|
endif
|
||||||
|
|
||||||
|
define SSDP_RESPONDER_INSTALL_INIT_SYSV
|
||||||
|
$(INSTALL) -D -m 0755 package/ssdp-responder/S50ssdpd \
|
||||||
|
$(TARGET_DIR)/etc/init.d/S50ssdpd
|
||||||
|
endef
|
||||||
|
|
||||||
|
define SSDP-RESPONDER_INSTALL_INIT_SYSTEMD
|
||||||
|
$(INSTALL) -D -m 644 $(@D)/ssdp-responder.service \
|
||||||
|
$(TARGET_DIR)/usr/lib/systemd/system/ssdp-responder.service
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(autotools-package))
|
||||||
Reference in New Issue
Block a user