12 |
|
- Client Control Protocol |
13 |
|
- Client Data Protocol |
14 |
|
|
15 |
+ |
|
16 |
|
Conventions |
17 |
|
----------- |
18 |
|
All protocols in this document assume a valid connection of |
19 |
|
the appropriate type has been made, and that data streams |
20 |
< |
already available. All strings should and will be |
20 |
> |
are already available. All strings should, and will be, |
21 |
|
terminated with a \n (newline character) to indicate the end |
22 |
|
of the message. All messages are sent as ASCII Strings. |
23 |
|
|
24 |
|
Fixed protocol messages will appear in [] brackets, if there |
25 |
< |
is a variety of options they will be seperated with the | |
25 |
> |
is a variety of options they will be separated with the | |
26 |
|
character. For example: |
27 |
|
|
28 |
|
[OK|ERROR] |
29 |
< |
|
29 |
> |
|
30 |
|
Indicates that the message "OK" OR the message "ERROR" will |
31 |
|
be sent depending on the result of the last action. |
32 |
|
|
36 |
|
|
37 |
|
{lastmodified} |
38 |
|
|
39 |
< |
Indicates that data indicating for use as last modified will |
40 |
< |
be returned. |
39 |
> |
Indicates that data for use as 'last modified' will be |
40 |
> |
returned. |
41 |
|
|
42 |
< |
If ever [ERROR] is sent back at any time, this indicates |
43 |
< |
that all communication is over. EXCEPT where specified! |
42 |
> |
If [ERROR] is sent back at any time, this indicates that all |
43 |
> |
communication is over. EXCEPT where otherwise specified! |
44 |
|
|
45 |
+ |
|
46 |
|
Host Connection Protocol |
47 |
|
------------------------ |
48 |
|
The initial connection of a host to the i-scream server is |
49 |
|
through the FilterManager. A Host gets its configuration |
50 |
< |
and then gets assigned a filter to connect to and start |
50 |
> |
and then gets assigned a Filter to connect to and start |
51 |
|
sending data. |
52 |
|
|
53 |
< |
The port number of the filter manager is fully configurable, |
53 |
> |
The port number of the FilterManager is fully configurable, |
54 |
|
however the default at this time is 4567. |
55 |
|
|
56 |
|
Host (direction) Server Comment |
58 |
|
[STARTCONFIG]----------> Requests to start |
59 |
|
receiving config |
60 |
|
information |
61 |
< |
|
61 |
> |
|
62 |
|
<---------- [OK|ERROR] If the server ok's |
63 |
|
the request or not |
64 |
|
|
65 |
|
[LASTMODIFIED]----------> Asks when the config |
66 |
|
was last modified |
67 |
|
(used when checking |
68 |
< |
if the config has |
68 |
> |
if the config has |
69 |
|
changed) |
70 |
< |
|
70 |
> |
|
71 |
|
<---------- [{lastmodified}Returns a long int |
72 |
< |
|ERROR] time since epoc |
72 |
> |
|ERROR] time since epoch |
73 |
|
eg, 123456789 |
74 |
|
|
75 |
|
[FILELIST] ----------> Asks the server for |
79 |
|
(used when checking |
80 |
|
if the config has |
81 |
|
changed) |
82 |
< |
|
82 |
> |
|
83 |
|
<---------- [{filelist} Returns a semi-colon |
84 |
< |
|ERROR] seperated list of |
84 |
> |
|ERROR] separated list of |
85 |
|
filenames |
86 |
|
eg, |
87 |
|
a.conf;b.conf;c.conf |
95 |
|
retrieved from the |
96 |
|
config file |
97 |
|
eg, UDPUpdateTime |
98 |
< |
|
98 |
> |
|
99 |
|
<---------- [{value}|ERROR]Returns the value of |
100 |
|
the requested config |
101 |
|
property |
102 |
|
eg, 120 |
103 |
|
If it is unable to |
104 |
< |
find the requested |
104 |
> |
find the requested |
105 |
|
property it returns |
106 |
|
ERROR to indicate |
107 |
< |
that fact |
108 |
< |
|
107 |
> |
that fact, but |
108 |
> |
communication still |
109 |
> |
proceeds |
110 |
> |
|
111 |
|
********** LOOP UNTIL ********** |
112 |
|
The loop continues until the host |
113 |
|
sends the following message |
114 |
< |
|
115 |
< |
[ENDCONFIG] ----------> Indicates that the |
114 |
> |
|
115 |
> |
[ENDCONFIG] ----------> Indicates that the |
116 |
|
host requires no |
117 |
|
more config |
118 |
< |
|
118 |
> |
|
119 |
|
********** LOOP END ********** |
120 |
|
Communication continues |
121 |
< |
|
121 |
> |
|
122 |
|
<---------- [OK] Indicates that the |
123 |
|
server is ready to |
124 |
|
proceed |
125 |
< |
|
125 |
> |
|
126 |
|
[FILTER] ----------> Asks the server to |
127 |
|
send it the host |
128 |
< |
information of a |
128 |
> |
information of a |
129 |
|
filter that it |
130 |
|
should connect to |
131 |
< |
|
131 |
> |
|
132 |
|
<---------- {filter} Returns a semi-colon |
133 |
< |
seperated list of |
133 |
> |
separated list of |
134 |
|
FQDN hostname, UDP |
135 |
|
port number and TCP |
136 |
< |
port number that a |
136 |
> |
port number that a |
137 |
|
configured Filter is |
138 |
|
running on and |
139 |
< |
assigned to the |
139 |
> |
assigned to the |
140 |
|
calling host |
141 |
|
eg, |
142 |
|
raptor.ukc.ac.uk; |
146 |
|
server that the host |
147 |
|
has finished an will |
148 |
|
disconnect |
149 |
< |
|
149 |
> |
|
150 |
|
<---------- [OK|ERROR] Indicates that the |
151 |
|
server is either ok |
152 |
|
or that it thought |
153 |
|
there was an error |
154 |
< |
|
154 |
> |
|
155 |
|
Host Heartbeat Protocol |
156 |
|
----------------------- |
157 |
|
When a host is configured after it has connected it should |
158 |
|
obtain a property TCPUpdateTime. This indicates how often |
159 |
< |
a host should send a "Heart Beat" which is a pro-active |
159 |
> |
a host should send a "Heart Beat", which is a pro-active |
160 |
|
connection to the server by the host to indicate that it is |
161 |
|
still alive. This "Heart Beat" also allows a host to see |
162 |
< |
its configuration has changed and act accordingly. In a |
162 |
> |
its configuration has changed and act accordingly. In a |
163 |
|
well written host this should just be a case of dropping out |
164 |
|
of a loop and heading back to the start (connecting to the |
165 |
|
filter manager). |
169 |
|
[HEARTBEAT] ----------> Starts the |
170 |
|
heartbeat protocol |
171 |
|
off |
172 |
< |
|
172 |
> |
|
173 |
|
<---------- [OK|ERROR] Indicates that the |
174 |
|
server is ok or not |
175 |
|
|
181 |
|
server is ok or not |
182 |
|
|
183 |
|
[{filelist}] ----------> Send a semi-colon |
184 |
< |
seperated list of |
184 |
> |
separated list of |
185 |
|
filenames |
186 |
|
eg, |
187 |
|
a.conf;b.conf;c.conf |
188 |
|
This should be |
189 |
|
identical to the one |
190 |
< |
recieved in the |
190 |
> |
received in the |
191 |
|
connection protocol |
192 |
|
|
193 |
|
<---------- [OK] Indicates that the |
194 |
|
server is ok |
195 |
|
|
196 |
|
[{lastmodified}]----------> Returns a long int |
197 |
< |
time since epoc |
197 |
> |
time since epoch |
198 |
|
eg, 123456789 |
199 |
|
This should be |
200 |
|
identical to the one |
201 |
< |
recieved in the |
201 |
> |
received in the |
202 |
|
connection protocol |
203 |
|
|
204 |
|
<---------- [OK|ERROR] The server then |
207 |
|
see if they have |
208 |
|
been modified more |
209 |
|
recently than the |
210 |
< |
lastmodified value |
211 |
< |
if they HAVE that |
210 |
> |
lastmodified value. |
211 |
> |
If they HAVE that |
212 |
|
indicates that the |
213 |
|
configuration has |
214 |
|
changed and the host |
225 |
|
server that the host |
226 |
|
has finished an will |
227 |
|
disconnect |
228 |
< |
|
228 |
> |
|
229 |
|
<---------- [OK|ERROR] Indicates that the |
230 |
|
server is either ok |
231 |
|
or that it thought |
237 |
|
simply XML data. For information on the format of this |
238 |
|
data see the XML via UDP specification document at: |
239 |
|
|
240 |
< |
http://www.i-scream.org.uk/cgi-bin/docs.cgi?doc=specification/xml_via_udp.txt |
240 |
> |
http://www.i-scream.org.uk/cgi-bin/docs.cgi?doc=specificatio |
241 |
> |
n/xml_via_udp.txt |
242 |
|
|
243 |
|
Client Control Protocol |
244 |
|
----------------------- |