… | |
… | |
26 | character encoding) and can be driven either in binary or text mode. |
26 | character encoding) and can be driven either in binary or text mode. |
27 | |
27 | |
28 | Alternatively, the server also listens on the Unix socket |
28 | Alternatively, the server also listens on the Unix socket |
29 | F</tmp/.tawny/.tawnyd> for local connections (where "none" is one of the |
29 | F</tmp/.tawny/.tawnyd> for local connections (where "none" is one of the |
30 | guaranteed auth methods). |
30 | guaranteed auth methods). |
|
|
31 | |
|
|
32 | There are currently no timeouts for the connection itself, but TCP |
|
|
33 | keepalive might be enabled server-side. |
31 | |
34 | |
32 | =head2 PACKAGE ENCAPSULATION LAYER |
35 | =head2 PACKAGE ENCAPSULATION LAYER |
33 | |
36 | |
34 | The protocol is based on sending and receiving JSON arrays encoded as |
37 | The protocol is based on sending and receiving JSON arrays encoded as |
35 | UTF-8. The server expects JSON arrays to be sent back-to-back, without any |
38 | UTF-8. The server expects JSON arrays to be sent back-to-back, without any |
… | |
… | |
288 | notifications before the TLS notification is received. |
291 | notifications before the TLS notification is received. |
289 | |
292 | |
290 | =item "product_id" - return the product id |
293 | =item "product_id" - return the product id |
291 | |
294 | |
292 | > [<id>, "product_id"] |
295 | > [<id>, "product_id"] |
293 | < [<id>, 1, "n", <product-id>] |
296 | < [<id>, 1, <branding>, <product-id>] |
294 | |
297 | |
295 | Example: |
298 | Example: |
296 | |
299 | |
297 | > [1,"product_id"] |
300 | > [1,"product_id"] |
298 | < [1,1,"n","00:1d:60:e8:6e:36"] |
301 | < [1,1,"n","00:1d:60:e8:6e:36"] |
299 | |
302 | |
300 | Returns the license type ("n") and product ID for licencing purposes. |
303 | Returns the branding (e.g. "n" for Porttracker, "i" for PortIQ) and |
|
|
304 | product ID for licencing purposes. |
301 | |
305 | |
302 | =item "set_license" - configure a new licence |
306 | =item "set_license" - configure a new licence |
303 | |
307 | |
304 | > [<id>, "set_license", <license-string<] |
308 | > [<id>, "set_license", <license-string>] |
305 | < [<id>, <status>] |
309 | < [<id>, <status>] |
306 | |
310 | |
307 | Configures the given licence string as new licence for the box. Returns |
311 | Configures the given licence string as new licence for the box. Returns |
308 | successful if the licence is valid, fails otherwise. |
312 | successful if the licence is valid, fails otherwise. |
309 | |
313 | |