miniupnp/minissdpd
Thomas Bernard d13f840a4a =>2017. http => https 2017-07-06 00:03:12 +02:00
..
.gitignore minissdpd: add a notification mode. Bump to version 1.5 2016-01-13 16:14:02 +01:00
Changelog.txt minissdpd: update Change log and 2016 2016-12-16 10:23:25 +01:00
LICENSE 2015 => 2016 2016-10-07 10:56:56 +02:00
Makefile minissdpd: proper CFLAGS for Solaris 11 2016-11-11 08:51:57 -05:00
README =>2017. http => https 2017-07-06 00:03:12 +02:00
README.fr minissdpd: add a notification mode. Bump to version 1.5 2016-01-13 16:14:02 +01:00
VERSION minissdpd: add a notification mode. Bump to version 1.5 2016-01-13 16:14:02 +01:00
asyncsendto.c move SA_LEN() to upnputils.h 2016-11-11 08:51:28 -05:00
asyncsendto.h minissdpd: clean up select(), fix non blocking write 2014-12-05 17:35:34 +01:00
codelength.h DECODELENGTH_READ 2015-07-15 18:11:27 +02:00
config.h minissdpd: Version 1.4 2015-08-06 15:20:39 +02:00
daemonize.c
daemonize.h
getifaddr.c minissdpd/getifaddr.c: fix strncpy() call 2015-07-16 17:15:36 +02:00
getifaddr.h minisspd: check that peer is from a LAN 2014-11-28 17:48:35 +01:00
getroute.c move SA_LEN() to upnputils.h 2016-11-11 08:51:28 -05:00
getroute.h minisspd: check that peer is from a LAN 2014-11-28 17:48:35 +01:00
ifacewatch.c minissdpd: update Change log and 2016 2016-12-16 10:23:25 +01:00
ifacewatch.h minisspd: check that peer is from a LAN 2014-11-28 17:48:35 +01:00
listifaces.c fix realloc failure issues detected thanks to cppcheck 2015-02-08 10:23:22 +01:00
minissdpd.1
minissdpd.c LOG_PERROR does not exist on Solaris 2016-11-11 08:53:12 -05:00
minissdpd.init.d.script Update minissdpd.init.d.script 2015-05-18 15:53:17 -05:00
minissdpdtypes.h minisspd: check that peer is from a LAN 2014-11-28 17:48:35 +01:00
openssdpsocket.c minissdpd: disable multicast loop 2015-08-06 16:07:07 +02:00
openssdpsocket.h minissdpd: set multicast TTL to 2 by default and configurable 2015-07-21 17:40:51 +02:00
printresponse.c improve printresponse() to consume all buffer bytes 2016-01-17 19:36:11 +01:00
printresponse.h minissdpd: add a notification mode. Bump to version 1.5 2016-01-13 16:14:02 +01:00
showminissdpdnotif.c handle SIGTERM as well 2016-01-18 00:19:32 +01:00
testcodelength.c
testminissdpd.c minissdpd: Fix broken overflow test (p+l > buf+n) thanks to Salva Piero 2016-03-01 19:15:11 +01:00
testminissdpd.sh minissdpd/testminissdpd.sh: test under OpenBSD and FreeBSD 2017-04-21 13:59:28 +02:00
testminissdpdnotif.sh use interface lo0 under solaris 2016-11-11 08:53:43 -05:00
upnputils.c minisspd: check that peer is from a LAN 2014-11-28 17:48:35 +01:00
upnputils.h move SA_LEN() to upnputils.h 2016-11-11 08:51:28 -05:00

README

 * MiniSSDPd - SSDP daemon

(c) Thomas Bernard
http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
https://github.com/miniupnp/miniupnp/

MiniSSDPd is a daemon that :
1 - keeps track of all UPnP devices announcing themselves on the network.
its database can be queried by local processes using a protocol based on
a unix socket. That enables local processes to quickly discover UPnP devices
without broadcasting SSDP message and waiting several seconds for a response.
2 - keeps a database of local UPnP devices hosted on the machine and
answering SSDP searchs on their behalf. It enables to run several UPnP devices,
like an IGD and a MediaServer, on the same machine.

to build, use GNU Make.


* protocol :

Connect to the unix socket.
Sent request, get response.
close unix socket connection.

* Request format :
1st byte : request type
           0 - version
           1 - type
           2 - USN (unique id)
           3 - everything
           4 - submit service (see below)
           5 - switch connection to notification mode
n bytes : string length : 1 byte if < 128 else the upper bit indicate that
one additional byte should be read, etc. (see codelength.h)
n bytes = string

Response format :

request type 0 (version) :
n bytes string length
n bytes = version string

request type 1 / 2 / 3 / 5 :
1st byte : number of services/devices, from 0 to 254.
           255 is a special value, see below
For each service/device :
URL :
  n bytes string length
  n bytes = Location string
ST:
  n bytes string length
  n bytes = type string
USN:
  n bytes string length
  n bytes = identifier string

if the 1st byte is 255, the format is as follows :
1st byte = 255
2nd byte = notification type (1=NEW, 2=UPDATE, 3=REMOVE)
3rd byte = number of services/devices, from 0 to 255.


request type 4 = submit service
1st byte  = 4
(k,n) bytes : length and string "ST" (service type)
(k,n) bytes : length and string "USN"
(k,n) bytes : length and string "Server"
(k,n) bytes : length and string "Location"
No answer