summaryrefslogtreecommitdiff
path: root/src/rpc/PROTOCOL
blob: bd9ee6458564e4470196d5e7f73a9056ca7c8277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
 Protocol between a client - using skabus_rpc_*() - and skabus-rpcd.

 Registering (1st connection) (client -> server)

 'S' : 1
 pmid : 4
 idlen : 1
 relen : 4
 idstr : idlen
 '\0' : 1
 re : relen
 '\0' : 1

 Sending a query (qclient -> server)

 'Q' : 1
 deadline : TAIN_PACK (12)
   contains sec(8), nano(4)
 iflen : 1
 ifname : iflen
 '\0' : 1
 msg : msglen
 A PM is the same as a query, except the ifname starts with a 0xff char
and contains an idstr instead of an ifname. 

 Sending a query (server -> rclient)

 'Q' : 1
 ifid : 4
 rinfo: SKABUS_RPC_RINFO_PACK
   contains serial(8), deadline(12), timestamp(12), uid(sizeof(uid_t)), gid(sizeof(gid_t)), idstr(SKABUS_RPC_IDSTR_SIZE), '\0'(1)
 msg : msglen

 Sending a reply (rclient -> server)

 'R' : 1
 serial : 8
 result : 1
 msg : msglen


 Sending a reply (server -> qclient)

 'R' : 1
 serial : 8
 status : 1. If not '\0', the rest is ignored.
 result : 1
 msg : msglen


 Cancelling a query (qclient -> server)

 'C' : 1
 serial : 8


 Cancelling a query (server -> rclient)

 'C' : 1
 ifid : 4
 serial : 8
 reason : 1


 Registering an interface (client -> server)

 'I' : 1
 ifid : 4
 iflen : 1
 relen : 4
 ifname : iflen
 '\0' : 1
 re : relen
 '\0' : 1


 Unregistering an interface (client -> server)

 'i' : 1
 iflen : 1
 ifname : iflen
 '\0' : 1