2013-08-19 16:48:59 +00:00
|
|
|
protocol :
|
2011-09-28 19:14:08 +00:00
|
|
|
|
2013-08-19 16:48:59 +00:00
|
|
|
Connect to the unix socket.
|
|
|
|
Sent request, answer response.
|
|
|
|
close unix socket connection.
|
2011-09-28 19:14:08 +00:00
|
|
|
|
2013-08-19 16:48:59 +00:00
|
|
|
Request format :
|
|
|
|
1st byte : request type
|
2011-09-28 19:14:08 +00:00
|
|
|
1 - type
|
2013-08-19 16:48:59 +00:00
|
|
|
2 - USN (unique id)
|
|
|
|
3 - everything
|
|
|
|
4 - submit service (see below)
|
|
|
|
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 :
|
|
|
|
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
|
|
|
|