2015-05-27 09:01:13 +00:00
|
|
|
* MiniSSDPd - SSDP daemon
|
|
|
|
|
|
|
|
(c) Thomas Bernard
|
|
|
|
http://miniupnp.free.fr/ or http://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 :
|
2011-09-28 19:14:08 +00:00
|
|
|
|
2013-08-19 16:48:59 +00:00
|
|
|
Connect to the unix socket.
|
2015-05-27 09:01:13 +00:00
|
|
|
Sent request, get response.
|
2013-08-19 16:48:59 +00:00
|
|
|
close unix socket connection.
|
2011-09-28 19:14:08 +00:00
|
|
|
|
2015-05-27 09:01:13 +00:00
|
|
|
* Request format :
|
2013-08-19 16:48:59 +00:00
|
|
|
1st byte : request type
|
2015-08-06 13:20:30 +00:00
|
|
|
0 - version
|
|
|
|
1 - type
|
|
|
|
2 - USN (unique id)
|
|
|
|
3 - everything
|
|
|
|
4 - submit service (see below)
|
2013-08-19 16:48:59 +00:00
|
|
|
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
|
2011-09-28 19:14:08 +00:00
|
|
|
|
2013-08-19 16:48:59 +00:00
|
|
|
Response format :
|
2015-08-06 13:20:30 +00:00
|
|
|
|
|
|
|
request type 0 (version) :
|
|
|
|
n bytes string length
|
|
|
|
n bytes = version string
|
|
|
|
|
|
|
|
request type 1 / 2 / 3 :
|
2013-08-19 16:48:59 +00:00
|
|
|
1st byte : number of services/devices
|
|
|
|
For each service/device :
|
2011-09-28 19:14:08 +00:00
|
|
|
URL :
|
2013-08-19 16:48:59 +00:00
|
|
|
n bytes string length
|
|
|
|
n bytes = Location string
|
2011-09-28 19:14:08 +00:00
|
|
|
ST:
|
2013-08-19 16:48:59 +00:00
|
|
|
n bytes string length
|
|
|
|
n bytes = type string
|
2011-09-28 19:14:08 +00:00
|
|
|
USN:
|
2013-08-19 16:48:59 +00:00
|
|
|
n bytes string length
|
|
|
|
n bytes = identifier string
|
2011-09-28 19:14:08 +00:00
|
|
|
|
2013-08-19 16:48:59 +00:00
|
|
|
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
|
2011-09-28 19:14:08 +00:00
|
|
|
|