Guest User

Untitled

a guest
Dec 4th, 2016
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 84.76 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  3. <?asciidoc-toc?>
  4. <?asciidoc-numbered?>
  5.  
  6. <article lang="en">
  7. <articleinfo>
  8. <title>ADC Protocol</title>
  9. <author>
  10. <firstname>version</firstname>
  11. <othername>1.0.4,</othername>
  12. <surname>UNRELEASED</surname>
  13. </author>
  14. <authorinitials>V1U</authorinitials>
  15. </articleinfo>
  16. <abstract id="_abstract">
  17. <simpara>ADC is a text protocol for a client-server network similar to Neo-Modus'
  18. Direct Connect (NMDC). The goal is to create a simple protocol that doesn&#8217;t
  19. require much effort neither in hub nor client, and is yet extensible. It
  20. addresses some of the issues in the NMDC protocol, but not all.</simpara>
  21. <simpara>The same protocol structure is used both for client-hub and client-client
  22. communication. This document is split into two parts; the first shows the
  23. structure of the protocol, while the second implements a specific system using
  24. this structure. ADC stands for anything you would like it to stand for;
  25. Advanced Direct Connect is the first neutral thing that springs to mind =).</simpara>
  26. <simpara>Many ideas for the protocol come from Jan Vidar Krey&#8217;s DCTNG draft. Major
  27. contributors include Dustin Brody, Walter Doekes, Timmo Stange, Fredrik
  28. Ullner, Fredrik Stenberg and others. Jon Hess contributed the original Direct
  29. Connect idea through the Neo-Modus Direct Connect client / hub.</simpara>
  30. </abstract>
  31. <section id="_version_history">
  32. <title>Version history</title>
  33. <simpara>The latest draft of the next version of this document as well as intermediate
  34. and older versions can be downloaded from
  35. $URL: <ulink url="https://svn.code.sf.net/p/adc/code/trunk/ADC.txt">https://svn.code.sf.net/p/adc/code/trunk/ADC.txt</ulink> $.
  36. This version corresponds to $Revision: 126 $.</simpara>
  37. <section id="_version_1_0_4_unreleased">
  38. <title>Version 1.0.4, UNRELEASED</title>
  39. <itemizedlist>
  40. <listitem>
  41. <simpara>
  42. Separators in the command description for GET, GFI and SND are now explicit.
  43. </simpara>
  44. </listitem>
  45. <listitem>
  46. <simpara>
  47. Clarified UTF-8 encoding note.
  48. </simpara>
  49. </listitem>
  50. </itemizedlist>
  51. </section>
  52. <section id="_version_1_0_3_2013_06_30">
  53. <title>Version 1.0.3, 2013-06-30</title>
  54. <simpara>Fredrik Ullner &lt;<ulink url="mailto:ullner@gmail.com">ullner@gmail.com</ulink>&gt;</simpara>
  55. <itemizedlist>
  56. <listitem>
  57. <simpara>
  58. Added examples for each command.
  59. </simpara>
  60. </listitem>
  61. <listitem>
  62. <simpara>
  63. Features are now described in its own section.
  64. </simpara>
  65. </listitem>
  66. <listitem>
  67. <simpara>
  68. Specified token use from server party in client-client connections.
  69. </simpara>
  70. </listitem>
  71. <listitem>
  72. <simpara>
  73. Changed size in file list schema to an unsigned long to manage files larger than 2 GiB.
  74. </simpara>
  75. </listitem>
  76. </itemizedlist>
  77. </section>
  78. <section id="_version_1_0_2_2013_01_31">
  79. <title>Version 1.0.2, 2013-01-31</title>
  80. <simpara>Fredrik Ullner &lt;<ulink url="mailto:ullner@gmail.com">ullner@gmail.com</ulink>&gt;</simpara>
  81. <itemizedlist>
  82. <listitem>
  83. <simpara>
  84. Editorial updates
  85. </simpara>
  86. </listitem>
  87. <listitem>
  88. <simpara>
  89. Added a terminology section
  90. </simpara>
  91. </listitem>
  92. <listitem>
  93. <simpara>
  94. Added note in STA, severity 2 (Fatal), on responsibility.
  95. </simpara>
  96. </listitem>
  97. <listitem>
  98. <simpara>
  99. State management is now its own section.
  100. </simpara>
  101. </listitem>
  102. <listitem>
  103. <simpara>
  104. The client in a client-client connection should send its INF first now.
  105. </simpara>
  106. </listitem>
  107. </itemizedlist>
  108. </section>
  109. <section id="_version_1_0_1_2008_05_02">
  110. <title>Version 1.0.1, 2008-05-02</title>
  111. <simpara>Jacek Sieka &lt;<ulink url="mailto:arnetheduck@gmail.com">arnetheduck@gmail.com</ulink>&gt;</simpara>
  112. <itemizedlist>
  113. <listitem>
  114. <simpara>
  115. Moved extensions to a separate document
  116. </simpara>
  117. </listitem>
  118. <listitem>
  119. <simpara>
  120. Moved specification to a separate project on SourceForge
  121. </simpara>
  122. </listitem>
  123. </itemizedlist>
  124. </section>
  125. <section id="_version_1_0_2007_12_01">
  126. <title>Version 1.0, 2007-12-01</title>
  127. <simpara>Jacek Sieka &lt;<ulink url="mailto:arnetheduck@gmail.com">arnetheduck@gmail.com</ulink>&gt;</simpara>
  128. <itemizedlist>
  129. <listitem>
  130. <simpara>
  131. Initial release
  132. </simpara>
  133. </listitem>
  134. </itemizedlist>
  135. </section>
  136. </section>
  137. <section id="_line_protocol">
  138. <title>Line protocol</title>
  139. <section id="_general">
  140. <title>General</title>
  141. <itemizedlist>
  142. <listitem>
  143. <simpara>
  144. All messages begin with a four-letter word (FOURCC). The first letter designates how
  145. the message should be sent and the other three specify what to do.
  146. </simpara>
  147. </listitem>
  148. <listitem>
  149. <simpara>
  150. Parameters are separated by space and a newline (codepoint 0x0a) ends each
  151. message. The string "\s" escapes space, "\n" newline and "\\" backslash.
  152. This version of the protocol reserves all other escapes for future use; any
  153. message containing unknown escapes must be discarded.
  154. </simpara>
  155. </listitem>
  156. <listitem>
  157. <simpara>
  158. All text must be sent as 1-to-4 byte, RFC 3629-compliant UTF-8 encoded Unicode
  159. in normalization form C.
  160. </simpara>
  161. </listitem>
  162. <listitem>
  163. <simpara>
  164. Clients must ignore unknown/badly formatted messages. Hubs must ignore
  165. invalid messages and should dispatch unknown messages according to their
  166. type.
  167. </simpara>
  168. </listitem>
  169. <listitem>
  170. <simpara>
  171. Client addresses must be specified in dotted-decimal form ("x.x.x.x") for
  172. IPv4 and RFC 4291 form for IPv6. Hub addresses must be specified in URL
  173. form, with "adc" as protocol specifier ("adc://server:port/").
  174. </simpara>
  175. </listitem>
  176. <listitem>
  177. <simpara>
  178. Numbers are sent as strings in standard floating point notation, using <emphasis>.</emphasis>
  179. as the decimal separator and without a thousands separator. Integers are
  180. numbers with neither a decimal portion nor an exponent. Applications should
  181. be prepared to handle at least 64-bit signed integers and 64-bit floating
  182. point numbers. A <emphasis>-</emphasis> prefix negates.
  183. </simpara>
  184. </listitem>
  185. <listitem>
  186. <simpara>
  187. SIDs, PIDs, CIDs, and short binary data are sent as base32-encoded strings.
  188. Long binary data transfers should use the file transfer mechanism with named
  189. roots.
  190. </simpara>
  191. </listitem>
  192. <listitem>
  193. <simpara>
  194. Extension names, protocol names, and other text not entered by the user may
  195. only include viewable characters that can be encoded by one byte in the
  196. UTF-8 encoding (Unicode codepoints 33-127). ADC is case-sensitive, requiring
  197. upper case for command names.
  198. </simpara>
  199. </listitem>
  200. <listitem>
  201. <simpara>
  202. Some commands and functionality require the use of a hash function. The
  203. hash function is negotiated during session setup and stays the same for the
  204. duration of the session.
  205. </simpara>
  206. </listitem>
  207. </itemizedlist>
  208. </section>
  209. <section id="_message_syntax">
  210. <title>Message syntax</title>
  211. <literallayout class="monospaced">message ::= message_body? eol
  212. message_body ::= (b_message_header | cih_message_header | de_message_header | f_message_header | u_message_header)
  213. (separator positional_parameter)* (separator named_parameter)*
  214. b_message_header ::= 'B' command_name separator my_sid
  215. cih_message_header ::= ('C' | 'I' | 'H') command_name
  216. de_message_header ::= ('D' | 'E') command_name separator my_sid separator target_sid
  217. f_message_header ::= 'F' command_name separator my_sid separator (('+'|'-') feature_name)+
  218. u_message_header ::= 'U' command_name separator my_cid
  219. command_name ::= simple_alpha simple_alphanum simple_alphanum
  220. positional_parameter ::= parameter_value
  221. named_parameter ::= parameter_name parameter_value?
  222. parameter_name ::= simple_alpha simple_alphanum
  223. parameter_value ::= escaped_letter+
  224. target_sid ::= encoded_sid
  225. my_sid ::= encoded_sid
  226. encoded_sid ::= base32_character{4}
  227. my_cid ::= encoded_cid
  228. encoded_cid ::= base32_character+
  229. base32_character ::= simple_alpha | [2-7]
  230. feature_name ::= simple_alpha simple_alphanum{3}
  231. escaped_letter ::= [^ \#x0a] | escape 's' | escape 'n' | escape escape
  232. escape ::= '\'
  233. simple_alpha ::= [A-Z]
  234. simple_alphanum ::= [A-Z0-9]
  235. eol ::= #x0a
  236. separator ::= ' '</literallayout>
  237. </section>
  238. <section id="_message_types">
  239. <title>Message types</title>
  240. <simpara>Message type specifies how messages should be routed and thus which additional
  241. fields can be found in the message header. Clients should use the most
  242. limiting type, in terms of recipients, that makes sense for a particular
  243. message when sending it to the hub for distribution. Clients should use the
  244. message type only to aid in parsing the message and otherwise ignore it. The
  245. following message types are defined:</simpara>
  246. <informaltable
  247. frame="all"
  248. rowsep="1" colsep="1"
  249. >
  250. <tgroup cols="3">
  251. <colspec colname="col_1" colwidth="33*"/>
  252. <colspec colname="col_2" colwidth="33*"/>
  253. <colspec colname="col_3" colwidth="33*"/>
  254. <tbody>
  255. <row>
  256. <entry align="left" valign="top"><simpara>B</simpara></entry>
  257. <entry align="left" valign="top"><simpara>Broadcast</simpara></entry>
  258. <entry align="left" valign="top"><simpara>Hub must send message to all connected clients, including the sender of the message.</simpara></entry>
  259. </row>
  260. <row>
  261. <entry align="left" valign="top"><simpara>C</simpara></entry>
  262. <entry align="left" valign="top"><simpara>Client message</simpara></entry>
  263. <entry align="left" valign="top"><simpara>Clients must use this message type when communicating directly over TCP.</simpara></entry>
  264. </row>
  265. <row>
  266. <entry align="left" valign="top"><simpara>D</simpara></entry>
  267. <entry align="left" valign="top"><simpara>Direct message</simpara></entry>
  268. <entry align="left" valign="top"><simpara>The hub must send the message to the target_sid user.</simpara></entry>
  269. </row>
  270. <row>
  271. <entry align="left" valign="top"><simpara>E</simpara></entry>
  272. <entry align="left" valign="top"><simpara>Echo message</simpara></entry>
  273. <entry align="left" valign="top"><simpara>The hub must send the message to the target_sid user and the my_sid user.</simpara></entry>
  274. </row>
  275. <row>
  276. <entry align="left" valign="top"><simpara>F</simpara></entry>
  277. <entry align="left" valign="top"><simpara>Feature broadcast</simpara></entry>
  278. <entry align="left" valign="top"><simpara>The hub must send message to all clients that support both all required (+) and no excluded (-) features named. The feature name is matched against the corresponding SU field in INF sent by each client.</simpara></entry>
  279. </row>
  280. <row>
  281. <entry align="left" valign="top"><simpara>H</simpara></entry>
  282. <entry align="left" valign="top"><simpara>Hub message</simpara></entry>
  283. <entry align="left" valign="top"><simpara>Clients must use this message type when a message is intended for the hub only.</simpara></entry>
  284. </row>
  285. <row>
  286. <entry align="left" valign="top"><simpara>I</simpara></entry>
  287. <entry align="left" valign="top"><simpara>Info message</simpara></entry>
  288. <entry align="left" valign="top"><simpara>Hubs must use this message type when sending a message to a client that didn&#8217;t come from another client.</simpara></entry>
  289. </row>
  290. <row>
  291. <entry align="left" valign="top"><simpara>U</simpara></entry>
  292. <entry align="left" valign="top"><simpara>UDP message</simpara></entry>
  293. <entry align="left" valign="top"><simpara>Clients must use this message type when communicating directly over UDP.</simpara></entry>
  294. </row>
  295. </tbody>
  296. </tgroup>
  297. </informaltable>
  298. </section>
  299. <section id="_session_hash">
  300. <title>Session hash</title>
  301. <simpara>Certain commands require the use of a hash function. The hash function used is
  302. negotiated using the SUP mechanism each time a new connection is established.
  303. When a client first connects, it offers a set of hash functions as SUP
  304. features. The server picks one of the offered functions and communicates its
  305. choice to the client by placing it before any other hash features present in
  306. the first SUP from the server. Clients and hubs are required to support at
  307. least one hash function, used both for protocol purposes and file
  308. identification.</simpara>
  309. </section>
  310. <section id="_client_identification">
  311. <title>Client identification</title>
  312. <simpara>Each client is identified by three different IDs, Session ID (SID), Private ID
  313. (PID), and Client ID (CID).</simpara>
  314. <section id="_session_id">
  315. <title>Session ID</title>
  316. <simpara>Session IDs appear in all communication that interacts with the hub. They
  317. identify a unique user on a single hub and are assigned by the hub during
  318. initial protocol negotiation. SIDs are 20 bits long and encoded using a 4-byte
  319. base32 encoded string.</simpara>
  320. </section>
  321. <section id="_private_id">
  322. <title>Private ID</title>
  323. <simpara>Private IDs globally identify a unique client. They function during initial
  324. protocol negotiation to generate the CID and are invisible to other clients.
  325. PIDs should be generated in a way to avoid collisions, for example using the
  326. hash of the current time and primary network card MAC address if sufficient
  327. randomness cannot be generated. Hubs and clients may not disclose PIDs to
  328. other clients; doing so weakens the security of the ADC network. Clients
  329. should should keep the same PID between sessions and hubs. PID length follows
  330. the length of the hash algorithm used for the session.</simpara>
  331. </section>
  332. <section id="_client_id">
  333. <title>Client ID</title>
  334. <simpara>Client IDs globally and publicly identify a unique client and underlie client
  335. to client communication. They are generated by hashing the (unencoded) PID
  336. with the session hash algorithm. Hubs should register clients by CID. CID
  337. length follows the length of the hash algorithm used for the session. Clients
  338. must be prepared to handle CIDs of varying lengths.</simpara>
  339. </section>
  340. </section>
  341. </section>
  342. <section id="_files">
  343. <title>Files</title>
  344. <section id="_file_names_and_structure">
  345. <title>File names and structure</title>
  346. <simpara>Filenames are relative to a fictive root in the user&#8217;s share. "/" separates
  347. directories; each file or directory name must be unique in a case-insensitive
  348. context. All printable characters, including whitespace, are valid names for
  349. files, the "/" and "\" being escaped by "\". Clients must then properly filter
  350. the filename for the target file system, as well as request filenames from
  351. other clients according to these rules. The special names "." and ".." may not
  352. occur as a directory or filename; any file list received containing those must
  353. be ignored. All directory names must end with a "/".</simpara>
  354. <simpara>Shared files are identified relative to the unnamed root "/"
  355. ("/dir/subdir/filename.ext"), while extensions can add named roots to this
  356. namespace. For example, "TTH/&#8230;" from the TIGR extension uses the named root
  357. "TTH" to identify files by their Tiger tree hash. It is invalid for names
  358. from the unnamed root to appear in the share without also being identified by
  359. at least one hash value.</simpara>
  360. <simpara>The rootless filename "files.xml" specifies the full file listing,
  361. uncompressed, in XML using the UTF-8 encoding. It is recommended that clients
  362. use an extension to transfer this list in compressed form.</simpara>
  363. <simpara>Extensions may specify additional rootless filenames, but should generally
  364. avoid doing so to avoid name clashes.</simpara>
  365. <simpara>The special type "list" is used to browse partial lists. A partial file list
  366. has the same structure as a normal list, but directories may be tagged with an
  367. attribute <emphasis>Incomplete="1"</emphasis> to specify that they have unexpanded sub-entries.
  368. Only directory names in the unnamed root may be requested, for instance "/"
  369. and "/share/". The content of that directory will then be sent to the
  370. requesting client to a depth chosen by the sending client (it should normally
  371. only send the directory level requested, but may choose to send more if there
  372. are few entries, for example a directory only containing a few files). The
  373. "Base" attribute of "FileListing" specifies which directory a particular file
  374. list represents.</simpara>
  375. </section>
  376. <section id="_file_list">
  377. <title>File list</title>
  378. <simpara>files.xml is the list of files intended for browsing. The file list must
  379. validate against the following XML schema:</simpara>
  380. <screen>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  381. &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
  382. &lt;xs:simpleType name="base32Binary"&gt;
  383. &lt;xs:restriction base="xs:string"&gt;
  384. &lt;xs:pattern value="[A-Za-z2-7]+"&gt;&lt;/xs:pattern&gt;
  385. &lt;/xs:restriction&gt;
  386. &lt;/xs:simpleType&gt;
  387.  
  388. &lt;xs:simpleType name="zeroOne"&gt;
  389. &lt;xs:restriction base="xs:int"&gt;
  390. &lt;xs:enumeration value="0"&gt;&lt;/xs:enumeration&gt;
  391. &lt;xs:enumeration value="1"&gt;&lt;/xs:enumeration&gt;
  392. &lt;/xs:restriction&gt;
  393. &lt;/xs:simpleType&gt;
  394.  
  395. &lt;xs:complexType name="ContainerType"&gt;
  396. &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
  397. &lt;xs:choice&gt;
  398. &lt;xs:element ref="Directory"&gt;&lt;/xs:element&gt;
  399. &lt;xs:element ref="File"&gt;&lt;/xs:element&gt;
  400. &lt;xs:any processContents="lax"&gt;&lt;/xs:any&gt;
  401. &lt;/xs:choice&gt;
  402. &lt;/xs:sequence&gt;
  403. &lt;/xs:complexType&gt;
  404.  
  405. &lt;xs:attribute name="Base" type="xs:string"&gt;&lt;/xs:attribute&gt;
  406. &lt;xs:attribute name="CID" type="base32Binary"&gt;&lt;/xs:attribute&gt;
  407. &lt;xs:attribute name="Generator" type="xs:string"&gt;&lt;/xs:attribute&gt;
  408. &lt;xs:attribute name="Incomplete" type="zeroOne" default="0"&gt;&lt;/xs:attribute&gt;
  409. &lt;xs:attribute name="Name" type="xs:string"&gt;&lt;/xs:attribute&gt;
  410. &lt;xs:attribute name="Size" type="xs:unsignedLong"&gt;&lt;/xs:attribute&gt;
  411. &lt;xs:attribute name="Version" type="xs:int"&gt;&lt;/xs:attribute&gt;
  412.  
  413. &lt;xs:element name="FileListing"&gt;
  414. &lt;xs:complexType&gt;
  415. &lt;xs:complexContent&gt;
  416. &lt;xs:extension base="ContainerType"&gt;
  417. &lt;xs:attribute ref="CID" use="required"&gt;&lt;/xs:attribute&gt;
  418. &lt;xs:attribute ref="Version" use="required"&gt;&lt;/xs:attribute&gt;
  419. &lt;xs:attribute ref="Generator" use="optional"&gt;&lt;/xs:attribute&gt;
  420. &lt;xs:attribute ref="Base" use="required"&gt;&lt;/xs:attribute&gt;
  421. &lt;xs:anyAttribute processContents="lax"&gt;&lt;/xs:anyAttribute&gt;
  422. &lt;/xs:extension&gt;
  423. &lt;/xs:complexContent&gt;
  424. &lt;/xs:complexType&gt;
  425. &lt;/xs:element&gt;
  426.  
  427. &lt;xs:element name="Directory"&gt;
  428. &lt;xs:complexType&gt;
  429. &lt;xs:complexContent&gt;
  430. &lt;xs:extension base="ContainerType"&gt;
  431. &lt;xs:attribute ref="Name" use="required"&gt;&lt;/xs:attribute&gt;
  432. &lt;xs:attribute ref="Incomplete" use="optional"&gt;&lt;/xs:attribute&gt;
  433. &lt;xs:anyAttribute processContents="lax"&gt;&lt;/xs:anyAttribute&gt;
  434. &lt;/xs:extension&gt;
  435. &lt;/xs:complexContent&gt;
  436. &lt;/xs:complexType&gt;
  437. &lt;/xs:element&gt;
  438.  
  439. &lt;xs:element name="File"&gt;
  440. &lt;xs:complexType&gt;
  441. &lt;xs:sequence&gt;
  442. &lt;xs:any minOccurs="0" maxOccurs="unbounded"&gt;&lt;/xs:any&gt;
  443. &lt;/xs:sequence&gt;
  444. &lt;xs:attribute ref="Name" use="required"&gt;&lt;/xs:attribute&gt;
  445. &lt;xs:attribute ref="Size" use="required"&gt;&lt;/xs:attribute&gt;
  446. &lt;xs:anyAttribute processContents="lax"&gt;&lt;/xs:anyAttribute&gt;
  447. &lt;/xs:complexType&gt;
  448. &lt;/xs:element&gt;
  449.  
  450. &lt;/xs:schema&gt;</screen>
  451. <simpara>An example file list:</simpara>
  452. <screen>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt;
  453. &lt;FileListing Version="1" CID="mycid" Generator="DC++ 0.701" Base="/"&gt;
  454. &lt;Directory Name="share"&gt;
  455. &lt;Directory Name="DC++ Prerelease"&gt;
  456. &lt;File Name="DCPlusPlus.pdb" Size="17648640" TTH="xxx" /&gt;
  457. &lt;File Name="DCPlusPlus.exe" Size="946176" TTH="yyy" /&gt;
  458. &lt;/Directory&gt;
  459. &lt;File Name="ADC.txt" Size="154112" TTH="zzz" /&gt;
  460. &lt;/Directory&gt;
  461. &lt;!-- Only used by partial lists --&gt;
  462. &lt;Directory Name="share2" Incomplete="1"/&gt;
  463. &lt;/FileListing&gt;</screen>
  464. <simpara>"encoding" must always be set to UTF-8. Clients must be prepared to handle XML
  465. files both with and without a BOM (byte order mark), although should not
  466. output one.</simpara>
  467. <simpara>"Version" will not change unless a breaking change is done to the structure of
  468. the file.</simpara>
  469. <simpara>"CID" is the CID of the client that generated the list.</simpara>
  470. <simpara>"Generator" is optional and for informative purposes only.</simpara>
  471. <simpara>"Base" is used for partial file lists, but must be present even in the
  472. non-partial list.</simpara>
  473. <simpara>"Incomplete" signals whether a directory in a partial file list contains
  474. unlisted items. "1" means the directory contains unlisted items, "0" that it
  475. does not. Incomplete="0" is the default and may thus be omitted.</simpara>
  476. <simpara>"TTH" is used by the TIGR extension.</simpara>
  477. <simpara>More information may be added to the file by extensions, but is not guaranteed
  478. to be interpreted by other clients.</simpara>
  479. </section>
  480. </section>
  481. <section id="_base_messages">
  482. <title>BASE messages</title>
  483. <simpara>ADC clients/hubs that support the following messages must advertise the feature "BASE" .</simpara>
  484. <simpara>The connecting party will be known as client, the other as server. For each message, the action code and the
  485. message contexts under which it is valid are specified.</simpara>
  486. <simpara>The message context specifies how the message may be received / sent. Hubs and
  487. clients may support using the message in additional contexts as well. The
  488. context codes are as follows:</simpara>
  489. <informaltable
  490. frame="all"
  491. rowsep="1" colsep="1"
  492. >
  493. <tgroup cols="2">
  494. <colspec colname="col_1" colwidth="50*"/>
  495. <colspec colname="col_2" colwidth="50*"/>
  496. <tbody>
  497. <row>
  498. <entry align="left" valign="top"><simpara>F</simpara></entry>
  499. <entry align="left" valign="top"><simpara>From hub (hub-client TCP)</simpara></entry>
  500. </row>
  501. <row>
  502. <entry align="left" valign="top"><simpara>T</simpara></entry>
  503. <entry align="left" valign="top"><simpara>To hub (hub-client TCP)</simpara></entry>
  504. </row>
  505. <row>
  506. <entry align="left" valign="top"><simpara>C</simpara></entry>
  507. <entry align="left" valign="top"><simpara>Between clients (client-client TCP)</simpara></entry>
  508. </row>
  509. <row>
  510. <entry align="left" valign="top"><simpara>U</simpara></entry>
  511. <entry align="left" valign="top"><simpara>Between clients (client-client UDP)</simpara></entry>
  512. </row>
  513. </tbody>
  514. </tgroup>
  515. </informaltable>
  516. <simpara>When requesting a new client-client connection, this protocol is identified by
  517. "ADC/1.0".</simpara>
  518. <simpara>In the descriptions of the commands, the message header and trailing named
  519. parameters have been omitted.</simpara>
  520. <section id="_state_management">
  521. <title>State management</title>
  522. <simpara>ADC defines a state machine to control flow and processing of messages. The receiving end must ensure, according to the state machine, that it does not parse or drop messages while it is in the process of another state where the message might be invalid.</simpara>
  523. <informaltable
  524. frame="all"
  525. rowsep="1" colsep="1"
  526. >
  527. <tgroup cols="2">
  528. <colspec colname="col_1" colwidth="50*"/>
  529. <colspec colname="col_2" colwidth="50*"/>
  530. <thead>
  531. <row>
  532. <entry align="left" valign="top">State </entry>
  533. <entry align="left" valign="top">Description</entry>
  534. </row>
  535. </thead>
  536. <tbody>
  537. <row>
  538. <entry align="left" valign="top"><simpara>PROTOCOL</simpara></entry>
  539. <entry align="left" valign="top"><simpara>Feature support recovery</simpara></entry>
  540. </row>
  541. <row>
  542. <entry align="left" valign="top"><simpara>IDENTIFY</simpara></entry>
  543. <entry align="left" valign="top"><simpara>User identification and static checks</simpara></entry>
  544. </row>
  545. <row>
  546. <entry align="left" valign="top"><simpara>VERIFY</simpara></entry>
  547. <entry align="left" valign="top"><simpara>Password check (does not exist in C-C communication unless announced by an extension)</simpara></entry>
  548. </row>
  549. <row>
  550. <entry align="left" valign="top"><simpara>NORMAL</simpara></entry>
  551. <entry align="left" valign="top"><simpara>Normal operation (end state)</simpara></entry>
  552. </row>
  553. <row>
  554. <entry align="left" valign="top"><simpara>DATA</simpara></entry>
  555. <entry align="left" valign="top"><simpara>Binary transfers. The state changes back to NORMAL once the transfer is complete.</simpara></entry>
  556. </row>
  557. </tbody>
  558. </tgroup>
  559. </informaltable>
  560. <simpara>The states presented are the login order, from top to bottom.</simpara>
  561. <section id="_states">
  562. <title>States</title>
  563. <section id="_protocol">
  564. <title>PROTOCOL</title>
  565. <simpara>When the hub receives a SUP, it should reply with its own SUP followed by SID assignment. The hub transitions the state then to IDENTIFY.</simpara>
  566. <simpara>When the server party receives a SUP in the client-client connection, it should reply with its own SUP. The server transitions the state then to IDENTIFY.</simpara>
  567. </section>
  568. <section id="_identify">
  569. <title>IDENTIFY</title>
  570. <simpara>The hub may initiate this state by sending its own INF in this state but is not required. The client should send its INF whereupon the hub shall verify the PD and ID fields and other required fields. The hub transitions the state then to VERIFY if the user is registered or NORMAL if not.</simpara>
  571. <simpara>The client party in the client-client connection shall send its INF whereupon the server party shall send its INF. The server transitions the state then to NORMAL (or VERIFY if an extension implements this).</simpara>
  572. </section>
  573. <section id="_verify">
  574. <title>VERIFY</title>
  575. <simpara>The hub shall send a GPA whereupon the client will respond with a PAS. The server transitions the state then to NORMAL.</simpara>
  576. <simpara>Client-client support for VERIFY must be signaled as an extension.</simpara>
  577. </section>
  578. <section id="_normal">
  579. <title>NORMAL</title>
  580. <simpara>The hub should send its INF if not done already. The server shall send the INF of all connected clients whereupon the connecting client&#8217;s INF shall be last. Normal operation may then commence with chatting and file sharing.</simpara>
  581. <simpara>Normal operation may commence immediately in a client-client connection. Typically, the downloading party sends a GET whereupon the other party sends a SND followed by a transition to the DATA state.</simpara>
  582. </section>
  583. <section id="_data">
  584. <title>DATA</title>
  585. <simpara>The DATA state is an actual binary transfer state, it does not have any commands or other content beyond streaming data.</simpara>
  586. <simpara>The DATA state exist only in the client-client communication, an extension can be used to add binary transfers between a client and a hub. The DATA state commence after a SND command.</simpara>
  587. <simpara>The state transitions back to NORMAL once the correct amount of bytes are transferred (specified by a previous command).</simpara>
  588. </section>
  589. </section>
  590. <section id="_notes">
  591. <title>Notes</title>
  592. <simpara>State always transitions from PROTOCOL to IDENTIFY and never from IDENTIFY to PROTOCOL. Likewise apply between IDENTIFY, VERIFY and NORMAL. This does not apply between NORMAL and DATA.</simpara>
  593. <simpara>Successful commands sent after a state transition indicate that the next state has been reached. For example, PROTOCOL begins a connection and state changes to IDENTIFY once the hub sends the SID.</simpara>
  594. <simpara>The state is shared between the client and the server while the server (implicitly) controls state transitions.</simpara>
  595. <simpara>The connecting party is known as the client and the other is known as the server (or hub). The client initiates the connection and state machine by sending its own SUP.</simpara>
  596. <simpara>A STA is valid in all states (except DATA) and may require that messages are resent (i.e. that the state transition does not occur).</simpara>
  597. <simpara>It is always the client party in a client-client connection that sent the connection request (CTM/RCM) command that is given control of the connection once the NORMAL state has been reached.</simpara>
  598. <simpara>Any party may disconnect the connection if they receive invalid data or insufficient data. All implementations must therefore be prepared for a potential disconnection following each command, meaning that the following state is not achieved. A disconnection should be preceded by a STA or a QUI to indicate what was wrong.</simpara>
  599. <simpara>The hub&#8217;s INF is optionally sent in IDENTIFY or in NORMAL.</simpara>
  600. <informaltable
  601. frame="all"
  602. rowsep="1" colsep="1"
  603. >
  604. <tgroup cols="2">
  605. <colspec colname="col_1" colwidth="50*"/>
  606. <colspec colname="col_2" colwidth="50*"/>
  607. <thead>
  608. <row>
  609. <entry align="left" valign="top">State </entry>
  610. <entry align="left" valign="top">Commands</entry>
  611. </row>
  612. </thead>
  613. <tbody>
  614. <row>
  615. <entry align="left" valign="top"><simpara>PROTOCOL</simpara></entry>
  616. <entry align="left" valign="top"><simpara>STA, SUP, SID</simpara></entry>
  617. </row>
  618. <row>
  619. <entry align="left" valign="top"><simpara>IDENTIFY</simpara></entry>
  620. <entry align="left" valign="top"><simpara>STA, INF, QUI</simpara></entry>
  621. </row>
  622. <row>
  623. <entry align="left" valign="top"><simpara>VERIFY</simpara></entry>
  624. <entry align="left" valign="top"><simpara>STA, GPA, PAS, QUI</simpara></entry>
  625. </row>
  626. <row>
  627. <entry align="left" valign="top"><simpara>NORMAL</simpara></entry>
  628. <entry align="left" valign="top"><simpara>STA, SUP, INF, MSG, SCH, RES, CTM, RCM, QUI, GET, GFI, SND</simpara></entry>
  629. </row>
  630. </tbody>
  631. </tgroup>
  632. </informaltable>
  633. </section>
  634. </section>
  635. <section id="_features">
  636. <title>Features</title>
  637. <simpara>Features are used to indicate support for protocol commands or functionality.</simpara>
  638. <simpara>The server may use any feature that the client indicates support for regardless of its own SUP and vice versa. A client can announce features in the SUP regardless of the INF&#8217;s SU field and vice versa.</simpara>
  639. <simpara>A feature name consists of four uppercase letters, where the last letter may be changed to a number to indicate a revised version of the feature.</simpara>
  640. <simpara>A central register of known features is kept to avoid clashes, see below features in this protocol and the features in the extension document.</simpara>
  641. <section id="_base">
  642. <title>BASE</title>
  643. <simpara>All clients must support the BASE feature (unless a future revision takes its place), which is this protocol.</simpara>
  644. <simpara>Clients must add the feature to the INF&#8217;s SU field.</simpara>
  645. </section>
  646. <section id="_tcp4_tcp6">
  647. <title>TCP4 / TCP6</title>
  648. <simpara>The features TCP4 and TCP6 are used to indicate support for incoming TCP connections. The 4 and 6 indicate IPv4 and IPv6.</simpara>
  649. <simpara>Clients should add the feature to the INF&#8217;s SU field.</simpara>
  650. <simpara>Clients that support incoming TCP connections is referenced as <emphasis>active</emphasis> where the opposite is <emphasis>passive</emphasis>.</simpara>
  651. </section>
  652. <section id="_udp4_udp6">
  653. <title>UDP4 / UDP6</title>
  654. <simpara>The features UDP4 and UDP6 are used to indicate support for incoming UDP packets. The 4 and 6 indicate UDP with IPv4 and IPv6.</simpara>
  655. <simpara>Clients should add the feature to the INF&#8217;s SU field.</simpara>
  656. <simpara>Clients that support incoming UDP packets is referenced as <emphasis>active</emphasis> where the opposite is <emphasis>passive</emphasis>.</simpara>
  657. </section>
  658. </section>
  659. <section id="_actions">
  660. <title>Actions</title>
  661. <section id="_sta">
  662. <title>STA</title>
  663. <literallayout class="monospaced">STA code description</literallayout>
  664. <simpara>Contexts: F, T, C, U</simpara>
  665. <simpara>States: PROTOCOL, IDENTIFY, VERIFY, NORMAL</simpara>
  666. <simpara>Status code in the form "xyy" where x specifies severity and yy the specific
  667. error code. The severity and error code are treated separately, the same error
  668. could occur at different severity levels.</simpara>
  669. <simpara>Severity values:</simpara>
  670. <informaltable
  671. frame="all"
  672. rowsep="1" colsep="1"
  673. >
  674. <tgroup cols="2">
  675. <colspec colname="col_1" colwidth="50*"/>
  676. <colspec colname="col_2" colwidth="50*"/>
  677. <tbody>
  678. <row>
  679. <entry align="left" valign="top"><simpara>0</simpara></entry>
  680. <entry align="left" valign="top"><simpara>Success (used for confirming commands), error code must be "00", and an additional flag "FC" contains the FOURCC of the command being confirmed if applicable.</simpara></entry>
  681. </row>
  682. <row>
  683. <entry align="left" valign="top"><simpara>1</simpara></entry>
  684. <entry align="left" valign="top"><simpara>Recoverable (error but no disconnect)</simpara></entry>
  685. </row>
  686. <row>
  687. <entry align="left" valign="top"><simpara>2</simpara></entry>
  688. <entry align="left" valign="top"><simpara>Fatal (disconnect), sending party is responsible for action.</simpara></entry>
  689. </row>
  690. </tbody>
  691. </tgroup>
  692. </informaltable>
  693. <simpara>Error codes:</simpara>
  694. <informaltable
  695. frame="all"
  696. rowsep="1" colsep="1"
  697. >
  698. <tgroup cols="2">
  699. <colspec colname="col_1" colwidth="50*"/>
  700. <colspec colname="col_2" colwidth="50*"/>
  701. <tbody>
  702. <row>
  703. <entry align="left" valign="top"><simpara>00</simpara></entry>
  704. <entry align="left" valign="top"><simpara>Generic, show description</simpara></entry>
  705. </row>
  706. <row>
  707. <entry align="left" valign="top"><simpara>x0</simpara></entry>
  708. <entry align="left" valign="top"><simpara>Same as 00, but categorized according to the rough structure set below</simpara></entry>
  709. </row>
  710. <row>
  711. <entry align="left" valign="top"><simpara>10</simpara></entry>
  712. <entry align="left" valign="top"><simpara>Generic hub error</simpara></entry>
  713. </row>
  714. <row>
  715. <entry align="left" valign="top"><simpara>11</simpara></entry>
  716. <entry align="left" valign="top"><simpara>Hub full</simpara></entry>
  717. </row>
  718. <row>
  719. <entry align="left" valign="top"><simpara>12</simpara></entry>
  720. <entry align="left" valign="top"><simpara>Hub disabled</simpara></entry>
  721. </row>
  722. <row>
  723. <entry align="left" valign="top"><simpara>20</simpara></entry>
  724. <entry align="left" valign="top"><simpara>Generic login/access error</simpara></entry>
  725. </row>
  726. <row>
  727. <entry align="left" valign="top"><simpara>21</simpara></entry>
  728. <entry align="left" valign="top"><simpara>Nick invalid</simpara></entry>
  729. </row>
  730. <row>
  731. <entry align="left" valign="top"><simpara>22</simpara></entry>
  732. <entry align="left" valign="top"><simpara>Nick taken</simpara></entry>
  733. </row>
  734. <row>
  735. <entry align="left" valign="top"><simpara>23</simpara></entry>
  736. <entry align="left" valign="top"><simpara>Invalid password</simpara></entry>
  737. </row>
  738. <row>
  739. <entry align="left" valign="top"><simpara>24</simpara></entry>
  740. <entry align="left" valign="top"><simpara>CID taken</simpara></entry>
  741. </row>
  742. <row>
  743. <entry align="left" valign="top"><simpara>25</simpara></entry>
  744. <entry align="left" valign="top"><simpara>Access denied, flag "FC" is the FOURCC of the offending command. Sent when a user is not allowed to execute a particular command</simpara></entry>
  745. </row>
  746. <row>
  747. <entry align="left" valign="top"><simpara>26</simpara></entry>
  748. <entry align="left" valign="top"><simpara>Registered users only</simpara></entry>
  749. </row>
  750. <row>
  751. <entry align="left" valign="top"><simpara>27</simpara></entry>
  752. <entry align="left" valign="top"><simpara>Invalid PID supplied</simpara></entry>
  753. </row>
  754. <row>
  755. <entry align="left" valign="top"><simpara>30</simpara></entry>
  756. <entry align="left" valign="top"><simpara>Kicks/bans/disconnects generic</simpara></entry>
  757. </row>
  758. <row>
  759. <entry align="left" valign="top"><simpara>31</simpara></entry>
  760. <entry align="left" valign="top"><simpara>Permanently banned</simpara></entry>
  761. </row>
  762. <row>
  763. <entry align="left" valign="top"><simpara>32</simpara></entry>
  764. <entry align="left" valign="top"><simpara>Temporarily banned, flag "TL" is an integer specifying the number of seconds left until it expires (This is used for kick as well…).</simpara></entry>
  765. </row>
  766. <row>
  767. <entry align="left" valign="top"><simpara>40</simpara></entry>
  768. <entry align="left" valign="top"><simpara>Protocol error</simpara></entry>
  769. </row>
  770. <row>
  771. <entry align="left" valign="top"><simpara>41</simpara></entry>
  772. <entry align="left" valign="top"><simpara>Transfer protocol unsupported, flag "TO" the token, flag "PR" the protocol string. The client receiving a CTM or RCM should send this if it doesn&#8217;t support the C-C protocol.</simpara></entry>
  773. </row>
  774. <row>
  775. <entry align="left" valign="top"><simpara>42</simpara></entry>
  776. <entry align="left" valign="top"><simpara>Direct connection failed, flag "TO" the token, flag "PR" the protocol string. The client receiving a CTM or RCM should send this if it tried but couldn&#8217;t connect.</simpara></entry>
  777. </row>
  778. <row>
  779. <entry align="left" valign="top"><simpara>43</simpara></entry>
  780. <entry align="left" valign="top"><simpara>Required INF field missing/bad, flag "FM" specifies missing field, "FB" specifies invalid field.</simpara></entry>
  781. </row>
  782. <row>
  783. <entry align="left" valign="top"><simpara>44</simpara></entry>
  784. <entry align="left" valign="top"><simpara>Invalid state, flag "FC" the FOURCC of the offending command.</simpara></entry>
  785. </row>
  786. <row>
  787. <entry align="left" valign="top"><simpara>45</simpara></entry>
  788. <entry align="left" valign="top"><simpara>Required feature missing, flag "FC" specifies the FOURCC of the missing feature.</simpara></entry>
  789. </row>
  790. <row>
  791. <entry align="left" valign="top"><simpara>46</simpara></entry>
  792. <entry align="left" valign="top"><simpara>Invalid IP supplied in INF, flag "I4" or "I6" specifies the correct IP.</simpara></entry>
  793. </row>
  794. <row>
  795. <entry align="left" valign="top"><simpara>47</simpara></entry>
  796. <entry align="left" valign="top"><simpara>No hash support overlap in SUP between client and hub.</simpara></entry>
  797. </row>
  798. <row>
  799. <entry align="left" valign="top"><simpara>50</simpara></entry>
  800. <entry align="left" valign="top"><simpara>Client-client / file transfer error</simpara></entry>
  801. </row>
  802. <row>
  803. <entry align="left" valign="top"><simpara>51</simpara></entry>
  804. <entry align="left" valign="top"><simpara>File not available</simpara></entry>
  805. </row>
  806. <row>
  807. <entry align="left" valign="top"><simpara>52</simpara></entry>
  808. <entry align="left" valign="top"><simpara>File part not available</simpara></entry>
  809. </row>
  810. <row>
  811. <entry align="left" valign="top"><simpara>53</simpara></entry>
  812. <entry align="left" valign="top"><simpara>Slots full</simpara></entry>
  813. </row>
  814. <row>
  815. <entry align="left" valign="top"><simpara>54</simpara></entry>
  816. <entry align="left" valign="top"><simpara>No hash support overlap in SUP between clients.</simpara></entry>
  817. </row>
  818. </tbody>
  819. </tgroup>
  820. </informaltable>
  821. <simpara>Description:
  822. Description of the error, suitable for viewing directly by the user</simpara>
  823. <simpara>Even if an error code is unknown by the client, it should display the text
  824. message alone. Error codes are used so that the client can take different
  825. action on different errors. Most error codes don&#8217;t have parameters and only
  826. make sense in C and I types.</simpara>
  827. </section>
  828. <section id="_sup">
  829. <title>SUP</title>
  830. <literallayout class="monospaced">SUP ('AD' | 'RM') feature (separator ('AD' | 'RM') feature)*</literallayout>
  831. <simpara>Contexts: F, T, C</simpara>
  832. <simpara>States: PROTOCOL, NORMAL</simpara>
  833. <simpara>This command identifies which features a specific client / hub supports.</simpara>
  834. <simpara>This command can also be used to dynamically add / remove features, <emphasis>AD</emphasis>
  835. meaning add and <emphasis>RM</emphasis> meaning remove.</simpara>
  836. </section>
  837. <section id="_sid">
  838. <title>SID</title>
  839. <literallayout class="monospaced">SID sid</literallayout>
  840. <simpara>Contexts: F</simpara>
  841. <simpara>States: PROTOCOL</simpara>
  842. <simpara>This command assigns a SID to a user who is currently logging on.</simpara>
  843. </section>
  844. <section id="_inf">
  845. <title>INF</title>
  846. <literallayout class="monospaced">INF</literallayout>
  847. <simpara>Contexts: F, T, C</simpara>
  848. <simpara>States: IDENTIFY, NORMAL</simpara>
  849. <simpara>This command updates the information about a client. Each time this is
  850. received, it means that the fields specified have been added or updated. Each
  851. field is identified by two characters, directly followed by the data
  852. associated with that field. A field, and the effects of its presence, can be
  853. canceled by sending the field name without data. Clients must ignore fields
  854. they don&#8217;t recognize. Most of these fields are only interesting in the
  855. client-hub communication; during client-client this command is mainly used for
  856. identification purposes. Hubs can choose to require or ignore any or all of
  857. these fields; clients must work without any of them. Many of these fields,
  858. such as share size and client version, are purely informative, and should be
  859. taken with a grain of salt, as it is very easy to fake them. However, clients
  860. should strive to provide accurate data for the general health of the system,
  861. as providing invalid information probably will annoy a great deal of people.
  862. Updates are made in an incremental manner, by sending only the fields that
  863. have changed.</simpara>
  864. <simpara>Fields:</simpara>
  865. <informaltable
  866. frame="all"
  867. rowsep="1" colsep="1"
  868. >
  869. <tgroup cols="3">
  870. <colspec colname="col_1" colwidth="33*"/>
  871. <colspec colname="col_2" colwidth="33*"/>
  872. <colspec colname="col_3" colwidth="33*"/>
  873. <thead>
  874. <row>
  875. <entry align="left" valign="top">Code </entry>
  876. <entry align="left" valign="top">Type </entry>
  877. <entry align="left" valign="top">Description</entry>
  878. </row>
  879. </thead>
  880. <tbody>
  881. <row>
  882. <entry align="left" valign="top"><simpara>ID</simpara></entry>
  883. <entry align="left" valign="top"><simpara>base32</simpara></entry>
  884. <entry align="left" valign="top"><simpara>The CID of the client. Mandatory for C-C connections.</simpara></entry>
  885. </row>
  886. <row>
  887. <entry align="left" valign="top"><simpara>PD</simpara></entry>
  888. <entry align="left" valign="top"><simpara>base32</simpara></entry>
  889. <entry align="left" valign="top"><simpara>The PID of the client. Hubs must check that the hash(PID) == CID and then discard the field before broadcasting it to other clients. Must not be sent in C-C connections.</simpara></entry>
  890. </row>
  891. <row>
  892. <entry align="left" valign="top"><simpara>I4</simpara></entry>
  893. <entry align="left" valign="top"><simpara>IPv4</simpara></entry>
  894. <entry align="left" valign="top"><simpara>IPv4 address without port. A zero address (0.0.0.0) means that the server should replace it with the real IP of the client. Hubs must check that a specified address corresponds to what the client is connecting from to avoid DoS attacks and only allow trusted clients to specify a different address. Clients should use the zero address when connecting, but may opt not to do so at the user&#8217;s discretion.</simpara></entry>
  895. </row>
  896. <row>
  897. <entry align="left" valign="top"><simpara>I6</simpara></entry>
  898. <entry align="left" valign="top"><simpara>IPv6</simpara></entry>
  899. <entry align="left" valign="top"><simpara>IPv6 address without port. A zero address (::) means that the server should replace it with the IP of the client.</simpara></entry>
  900. </row>
  901. <row>
  902. <entry align="left" valign="top"><simpara>U4</simpara></entry>
  903. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  904. <entry align="left" valign="top"><simpara>Client UDP port.</simpara></entry>
  905. </row>
  906. <row>
  907. <entry align="left" valign="top"><simpara>U6</simpara></entry>
  908. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  909. <entry align="left" valign="top"><simpara>Same as U4, but for IPv6.</simpara></entry>
  910. </row>
  911. <row>
  912. <entry align="left" valign="top"><simpara>SS</simpara></entry>
  913. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  914. <entry align="left" valign="top"><simpara>Share size in bytes</simpara></entry>
  915. </row>
  916. <row>
  917. <entry align="left" valign="top"><simpara>SF</simpara></entry>
  918. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  919. <entry align="left" valign="top"><simpara>Number of shared files</simpara></entry>
  920. </row>
  921. <row>
  922. <entry align="left" valign="top"><simpara>VE</simpara></entry>
  923. <entry align="left" valign="top"><simpara>string</simpara></entry>
  924. <entry align="left" valign="top"><simpara>Client identification, version (client-specific, a short identifier then a dotted version number is recommended)</simpara></entry>
  925. </row>
  926. <row>
  927. <entry align="left" valign="top"><simpara>US</simpara></entry>
  928. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  929. <entry align="left" valign="top"><simpara>Maximum upload speed, bytes/second</simpara></entry>
  930. </row>
  931. <row>
  932. <entry align="left" valign="top"><simpara>DS</simpara></entry>
  933. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  934. <entry align="left" valign="top"><simpara>Maximum download speed, bytes/second</simpara></entry>
  935. </row>
  936. <row>
  937. <entry align="left" valign="top"><simpara>SL</simpara></entry>
  938. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  939. <entry align="left" valign="top"><simpara>Maximum simultaneous upload connections (slots)</simpara></entry>
  940. </row>
  941. <row>
  942. <entry align="left" valign="top"><simpara>AS</simpara></entry>
  943. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  944. <entry align="left" valign="top"><simpara>Automatic slot allocator speed limit, bytes/sec. The client keeps opening slots as long as its total upload speed doesn&#8217;t exceed this value.</simpara></entry>
  945. </row>
  946. <row>
  947. <entry align="left" valign="top"><simpara>AM</simpara></entry>
  948. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  949. <entry align="left" valign="top"><simpara>Minimum simultaneous upload connections in automatic slot manager mode</simpara></entry>
  950. </row>
  951. <row>
  952. <entry align="left" valign="top"><simpara>EM</simpara></entry>
  953. <entry align="left" valign="top"><simpara>string</simpara></entry>
  954. <entry align="left" valign="top"><simpara>E-mail address</simpara></entry>
  955. </row>
  956. <row>
  957. <entry align="left" valign="top"><simpara>NI</simpara></entry>
  958. <entry align="left" valign="top"><simpara>string</simpara></entry>
  959. <entry align="left" valign="top"><simpara>Nickname (or hub name). The hub must ensure that this is unique in the hub up to case-sensitivity. Valid are all characters in the Unicode character set with code point above 32, although hubs may limit this further as they like with an appropriate error message.</simpara></entry>
  960. </row>
  961. <row>
  962. <entry align="left" valign="top"><simpara>DE</simpara></entry>
  963. <entry align="left" valign="top"><simpara>string</simpara></entry>
  964. <entry align="left" valign="top"><simpara>Description. Valid are all characters in the Unicode character set with code point equal to or greater than 32.</simpara></entry>
  965. </row>
  966. <row>
  967. <entry align="left" valign="top"><simpara>HN</simpara></entry>
  968. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  969. <entry align="left" valign="top"><simpara>Hubs where user is a normal user and in NORMAL state</simpara></entry>
  970. </row>
  971. <row>
  972. <entry align="left" valign="top"><simpara>HR</simpara></entry>
  973. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  974. <entry align="left" valign="top"><simpara>Hubs where user is registered (had to supply password) and in NORMAL state</simpara></entry>
  975. </row>
  976. <row>
  977. <entry align="left" valign="top"><simpara>HO</simpara></entry>
  978. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  979. <entry align="left" valign="top"><simpara>Hubs where user is op and in NORMAL state</simpara></entry>
  980. </row>
  981. <row>
  982. <entry align="left" valign="top"><simpara>TO</simpara></entry>
  983. <entry align="left" valign="top"><simpara>string</simpara></entry>
  984. <entry align="left" valign="top"><simpara>Token, as received in RCM/CTM, when establishing a C-C connection.</simpara></entry>
  985. </row>
  986. <row>
  987. <entry align="left" valign="top"><simpara>CT</simpara></entry>
  988. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  989. <entry align="left" valign="top"><simpara>Client (user) type, 1=bot, 2=registered user, 4=operator, 8=super user, 16=hub owner, 32=hub (used when the hub sends an INF about itself). Multiple types are specified by adding the numbers together.</simpara></entry>
  990. </row>
  991. <row>
  992. <entry align="left" valign="top"><simpara>AW</simpara></entry>
  993. <entry align="left" valign="top"><simpara>integer</simpara></entry>
  994. <entry align="left" valign="top"><simpara>1=Away, 2=Extended away, not interested in hub chat (hubs may skip sending broadcast type MSG commands to clients with this flag)</simpara></entry>
  995. </row>
  996. <row>
  997. <entry align="left" valign="top"><simpara>SU</simpara></entry>
  998. <entry align="left" valign="top"><simpara>string</simpara></entry>
  999. <entry align="left" valign="top"><simpara>Comma-separated list of feature FOURCC&#8217;s. This notifies other clients of extended capabilities of the connecting client.</simpara></entry>
  1000. </row>
  1001. <row>
  1002. <entry align="left" valign="top"><simpara>RF</simpara></entry>
  1003. <entry align="left" valign="top"><simpara>string</simpara></entry>
  1004. <entry align="left" valign="top"><simpara>URL of referrer (hub in case of redirect, web page)</simpara></entry>
  1005. </row>
  1006. </tbody>
  1007. </tgroup>
  1008. </informaltable>
  1009. <note><simpara>Normally one would only accept an IP (I4 or I6) that is the same as the
  1010. source IP of the connecting peer. Use caution when accepting unknown IPs. Only
  1011. for trusted users one may allow a different IP or an IP from a different
  1012. domain (IPv4 or IPv6) to be specified. If you fail to do this, your hub can be
  1013. used as a medium for DDoS attacks.</simpara></note>
  1014. <simpara>When the hub sends an INF about itself, the NI becomes hub
  1015. name, the VE the hub version, and DE the hub description.</simpara>
  1016. </section>
  1017. <section id="_msg">
  1018. <title>MSG</title>
  1019. <literallayout class="monospaced">MSG text</literallayout>
  1020. <simpara>Contexts: F, T</simpara>
  1021. <simpara>States: NORMAL</simpara>
  1022. <simpara>A chat message. The receiving clients should precede it with "&lt;" nick "&gt;", to
  1023. allow for uniform message displays.</simpara>
  1024. <simpara>Flags:</simpara>
  1025. <informaltable
  1026. frame="all"
  1027. rowsep="1" colsep="1"
  1028. >
  1029. <tgroup cols="2">
  1030. <colspec colname="col_1" colwidth="50*"/>
  1031. <colspec colname="col_2" colwidth="50*"/>
  1032. <tbody>
  1033. <row>
  1034. <entry align="left" valign="top"><simpara>PM&lt;group-SID&gt;</simpara></entry>
  1035. <entry align="left" valign="top"><simpara>Private message, &lt;group-SID&gt; is the SID clients must send responses to. This field must contain the originating SID if this is a normal private conversation.</simpara></entry>
  1036. </row>
  1037. <row>
  1038. <entry align="left" valign="top"><simpara>ME</simpara></entry>
  1039. <entry align="left" valign="top"><simpara>Speak in third person, 1 = message should be displayed as /me in IRC ("*nick text")</simpara></entry>
  1040. </row>
  1041. </tbody>
  1042. </tgroup>
  1043. </informaltable>
  1044. </section>
  1045. <section id="_sch">
  1046. <title>SCH</title>
  1047. <literallayout class="monospaced">SCH</literallayout>
  1048. <simpara>Contexts: F, T, C, (U)</simpara>
  1049. <simpara>States: NORMAL</simpara>
  1050. <simpara>Search. Each parameter is an operator followed by a term. Each term is a
  1051. two-letter code followed by the data to search for. Clients must ignore any
  1052. unknown fields and complete the search request as if they were not present,
  1053. unless no known fields are present in which case the client must ignore the
  1054. search.</simpara>
  1055. <informaltable
  1056. frame="all"
  1057. rowsep="1" colsep="1"
  1058. >
  1059. <tgroup cols="2">
  1060. <colspec colname="col_1" colwidth="50*"/>
  1061. <colspec colname="col_2" colwidth="50*"/>
  1062. <tbody>
  1063. <row>
  1064. <entry align="left" valign="top"><simpara>AN, NO, EX</simpara></entry>
  1065. <entry align="left" valign="top"><simpara>String search term, where AN is include (and), NO is exclude (and not), and EX is extension. Each filename (including the path to it) should be matched using case insensitive substring search as follows: match all AN, remove those that match any NO, and make sure the extension matches at least one of the EX (if it is present). Extensions must be sent without the leading period ('.').</simpara></entry>
  1066. </row>
  1067. <row>
  1068. <entry align="left" valign="top"><simpara>LE</simpara></entry>
  1069. <entry align="left" valign="top"><simpara>Smaller (less) than or equal size in bytes</simpara></entry>
  1070. </row>
  1071. <row>
  1072. <entry align="left" valign="top"><simpara>GE</simpara></entry>
  1073. <entry align="left" valign="top"><simpara>Larger (greater) than or equal size in bytes</simpara></entry>
  1074. </row>
  1075. <row>
  1076. <entry align="left" valign="top"><simpara>EQ</simpara></entry>
  1077. <entry align="left" valign="top"><simpara>Exact size in bytes</simpara></entry>
  1078. </row>
  1079. <row>
  1080. <entry align="left" valign="top"><simpara>TO</simpara></entry>
  1081. <entry align="left" valign="top"><simpara>Token, string. Used by the client to tell one search from the other. If present, the responding client must copy this field to each search result.</simpara></entry>
  1082. </row>
  1083. <row>
  1084. <entry align="left" valign="top"><simpara>TY</simpara></entry>
  1085. <entry align="left" valign="top"><simpara>File type, to be chosen from the following (none specified = any type): 1 = File, 2 = Directory</simpara></entry>
  1086. </row>
  1087. </tbody>
  1088. </tgroup>
  1089. </informaltable>
  1090. <simpara>Searching by UDP is subject to IP spoofing; can thus be used to initiate a DoS
  1091. attack. Clients should only accept incoming UDP searches in a trusted
  1092. environment.</simpara>
  1093. </section>
  1094. <section id="_res">
  1095. <title>RES</title>
  1096. <literallayout class="monospaced">RES</literallayout>
  1097. <simpara>Contexts: F, T, C, U</simpara>
  1098. <simpara>States: NORMAL</simpara>
  1099. <simpara>Search result, made up of fields syntactically and structurally similar to the
  1100. INF ones. Clients must provide filename, session hash, size and token, but are
  1101. encouraged to supply additional fields if available. Passive results should be
  1102. limited to 5 and active to 10.</simpara>
  1103. <informaltable
  1104. frame="all"
  1105. rowsep="1" colsep="1"
  1106. >
  1107. <tgroup cols="2">
  1108. <colspec colname="col_1" colwidth="50*"/>
  1109. <colspec colname="col_2" colwidth="50*"/>
  1110. <tbody>
  1111. <row>
  1112. <entry align="left" valign="top"><simpara>FN</simpara></entry>
  1113. <entry align="left" valign="top"><simpara>Full filename including path in share</simpara></entry>
  1114. </row>
  1115. <row>
  1116. <entry align="left" valign="top"><simpara>SI</simpara></entry>
  1117. <entry align="left" valign="top"><simpara>Size, in bytes</simpara></entry>
  1118. </row>
  1119. <row>
  1120. <entry align="left" valign="top"><simpara>SL</simpara></entry>
  1121. <entry align="left" valign="top"><simpara>Slots currently available</simpara></entry>
  1122. </row>
  1123. <row>
  1124. <entry align="left" valign="top"><simpara>TO</simpara></entry>
  1125. <entry align="left" valign="top"><simpara>Token</simpara></entry>
  1126. </row>
  1127. </tbody>
  1128. </tgroup>
  1129. </informaltable>
  1130. </section>
  1131. <section id="_ctm">
  1132. <title>CTM</title>
  1133. <literallayout class="monospaced">CTM protocol separator port separator token</literallayout>
  1134. <simpara>Contexts: F, T</simpara>
  1135. <simpara>States: NORMAL</simpara>
  1136. <simpara>Connect to me. Used by active clients that want to connect to someone, or in
  1137. response to RCM. Only TCP active clients may send this. &lt;token&gt; is a string
  1138. that identifies the incoming connection triggered by this command and must be
  1139. present in the INF command of the connecting client. Implementations should not accept
  1140. incoming connections with a token that was not sent earlier. The server party may, but should not, provide the token in its INF.
  1141. &lt;protocol&gt; is an arbitrary string specifying the protocol to connect with; in the case of an
  1142. ADC 1.0 compliant connection attempt, this should be the string "ADC/1.0". If
  1143. &lt;protocol&gt; is supported, a response to RCM must copy the &lt;token&gt; and
  1144. &lt;protocol&gt; fields directly. If a protocol is not supported, a DSTA must be
  1145. sent indicating this.</simpara>
  1146. </section>
  1147. <section id="_rcm">
  1148. <title>RCM</title>
  1149. <literallayout class="monospaced">RCM protocol separator token</literallayout>
  1150. <simpara>Contexts: F, T</simpara>
  1151. <simpara>States: NORMAL</simpara>
  1152. <simpara>Reverse CTM. Used by passive clients to request a connection token from an
  1153. active client.</simpara>
  1154. </section>
  1155. <section id="_gpa">
  1156. <title>GPA</title>
  1157. <literallayout class="monospaced">GPA data</literallayout>
  1158. <simpara>Contexts: F</simpara>
  1159. <simpara>States: VERIFY</simpara>
  1160. <simpara>Get Password. The data parameter is at least 24 random bytes (base32 encoded).</simpara>
  1161. </section>
  1162. <section id="_pas">
  1163. <title>PAS</title>
  1164. <literallayout class="monospaced">PAS password</literallayout>
  1165. <simpara>Contexts: T</simpara>
  1166. <simpara>States: VERIFY</simpara>
  1167. <simpara>Password. The password (utf-8 encoded bytes), followed by the random data
  1168. (binary), passed through the session hash algorithm then converted to base32.</simpara>
  1169. </section>
  1170. <section id="_qui">
  1171. <title>QUI</title>
  1172. <literallayout class="monospaced">QUI sid</literallayout>
  1173. <simpara>Contexts: F</simpara>
  1174. <simpara>States: IDENTIFY, VERIFY, NORMAL</simpara>
  1175. <simpara>The client identified by &lt;sid&gt; disconnected from the hub. If the SID belongs
  1176. to the client receiving the QUI, it means that it should take action according
  1177. to the reason (i.e. redirect or not reconnect in case of ban). The hub must
  1178. not send data after the QUI to the client being disconnected.</simpara>
  1179. <simpara>The following flags may be present:</simpara>
  1180. <informaltable
  1181. frame="all"
  1182. rowsep="1" colsep="1"
  1183. >
  1184. <tgroup cols="2">
  1185. <colspec colname="col_1" colwidth="50*"/>
  1186. <colspec colname="col_2" colwidth="50*"/>
  1187. <tbody>
  1188. <row>
  1189. <entry align="left" valign="top"><simpara>ID</simpara></entry>
  1190. <entry align="left" valign="top"><simpara>SID of the initiator of the disconnect (for example the one that issued a kick).</simpara></entry>
  1191. </row>
  1192. <row>
  1193. <entry align="left" valign="top"><simpara>TL</simpara></entry>
  1194. <entry align="left" valign="top"><simpara>Time Left until reconnect is allowed, in seconds. -1 = forever.</simpara></entry>
  1195. </row>
  1196. <row>
  1197. <entry align="left" valign="top"><simpara>MS</simpara></entry>
  1198. <entry align="left" valign="top"><simpara>Message.</simpara></entry>
  1199. </row>
  1200. <row>
  1201. <entry align="left" valign="top"><simpara>RD</simpara></entry>
  1202. <entry align="left" valign="top"><simpara>Redirect server URL.</simpara></entry>
  1203. </row>
  1204. <row>
  1205. <entry align="left" valign="top"><simpara>DI</simpara></entry>
  1206. <entry align="left" valign="top"><simpara>Any client that has this flag in the QUI message should have its transfers terminated by other clients connected to it, as it is unwanted in the system.</simpara></entry>
  1207. </row>
  1208. </tbody>
  1209. </tgroup>
  1210. </informaltable>
  1211. </section>
  1212. <section id="_get">
  1213. <title>GET</title>
  1214. <literallayout class="monospaced">GET type separator identifier separator start_pos separator bytes</literallayout>
  1215. <simpara>Contexts: C</simpara>
  1216. <simpara>States: NORMAL</simpara>
  1217. <simpara>Requests that a certain file or binary data be transmitted. &lt;start_pos&gt; counts
  1218. 0 as the first byte. &lt;bytes&gt; may be set to -1 to indicate that the sending
  1219. client should fill it in with the number of bytes needed to complete the file
  1220. from &lt;start_pos&gt;. &lt;type&gt; is a [a-zA-Z0-9]+ string that specifies the namespace
  1221. for identifier and BASE requires that clients recognize the types "file" and
  1222. "list". Extensions may add to the identifier names as well as add new types.</simpara>
  1223. <simpara>"file" transfers transfer the file data in binary, starting at &lt;start_pos&gt; and
  1224. sending &lt;bytes&gt; bytes. Identifier must come from the namespace of the current
  1225. session hash.</simpara>
  1226. <simpara>"list" transfers are used for partial file lists and have a directory as
  1227. identifier. &lt;start_pos&gt; is always 0 and &lt;bytes&gt; contains the uncompressed
  1228. length of the generated XML text in the corresponding SND. An optional flag
  1229. "RE1" means that the client is requesting a recursive list and that the
  1230. sending client should send the directory itself and all subdirectories as
  1231. well. If this is too much, the sending client may choose to send only parts.
  1232. The flag should be taken as a hint that the requesting client will be getting
  1233. the subdirectories as well, so they might as well be sent in one go.
  1234. Identifier must be a directory in the unnamed root, ending (and beginning)
  1235. with "/".</simpara>
  1236. <simpara>Note that GET can also be used by extensions for binary transfers between hub
  1237. and client.</simpara>
  1238. </section>
  1239. <section id="_gfi">
  1240. <title>GFI</title>
  1241. <literallayout class="monospaced">GFI type separator identifier</literallayout>
  1242. <simpara>Contexts: C</simpara>
  1243. <simpara>States: NORMAL</simpara>
  1244. <simpara>Get File Information. Requests that the other client returns a RES about the
  1245. file as if it had responded to a SCH command. Type and identifier are the same
  1246. as for GET, but the identifier may come from any namespace, including the
  1247. unnamed root.</simpara>
  1248. </section>
  1249. <section id="_snd">
  1250. <title>SND</title>
  1251. <literallayout class="monospaced">SND type separator identifier separator start_pos separator bytes</literallayout>
  1252. <simpara>Contexts: C</simpara>
  1253. <simpara>States: NORMAL</simpara>
  1254. <simpara>The sender will transmit until &lt;bytes&gt; bytes of binary data have been sent. The
  1255. parameters correspond to the GET parameters except that if &lt;bytes&gt; equals -1
  1256. it must be replaced by the number of bytes needed to complete the file
  1257. starting at &lt;start_pos&gt;.</simpara>
  1258. </section>
  1259. </section>
  1260. </section>
  1261. <section id="_examples">
  1262. <title>Examples</title>
  1263. <simpara>Note that examples listed here omit the trailing newline character that shall always end a message.</simpara>
  1264. <section id="_client_hub_connection">
  1265. <title>Client – Hub connection</title>
  1266. <informaltable
  1267. frame="all"
  1268. rowsep="1" colsep="1"
  1269. >
  1270. <tgroup cols="2">
  1271. <colspec colname="col_1" colwidth="50*"/>
  1272. <colspec colname="col_2" colwidth="50*"/>
  1273. <thead>
  1274. <row>
  1275. <entry align="left" valign="top">Client </entry>
  1276. <entry align="left" valign="top">Hub</entry>
  1277. </row>
  1278. </thead>
  1279. <tbody>
  1280. <row>
  1281. <entry align="left" valign="top"><simpara>HSUP ADBASE ADTIGR</simpara></entry>
  1282. <entry align="left" valign="top"><simpara></simpara></entry>
  1283. </row>
  1284. <row>
  1285. <entry align="left" valign="top"><simpara></simpara></entry>
  1286. <entry align="left" valign="top"><simpara>ISUP ADBASE ADTIGR &#8230;</simpara></entry>
  1287. </row>
  1288. <row>
  1289. <entry align="left" valign="top"><simpara></simpara></entry>
  1290. <entry align="left" valign="top"><simpara>ISID &lt;client-sid&gt;</simpara></entry>
  1291. </row>
  1292. <row>
  1293. <entry align="left" valign="top"><simpara></simpara></entry>
  1294. <entry align="left" valign="top"><simpara>IINF CT32 &#8230;</simpara></entry>
  1295. </row>
  1296. <row>
  1297. <entry align="left" valign="top"><simpara>BINF &lt;my-sid&gt; ID&#8230; PD&#8230;</simpara></entry>
  1298. <entry align="left" valign="top"><simpara></simpara></entry>
  1299. </row>
  1300. <row>
  1301. <entry align="left" valign="top"><simpara></simpara></entry>
  1302. <entry align="left" valign="top"><simpara>IGPA &#8230;</simpara></entry>
  1303. </row>
  1304. <row>
  1305. <entry align="left" valign="top"><simpara>HPAS &#8230;</simpara></entry>
  1306. <entry align="left" valign="top"><simpara></simpara></entry>
  1307. </row>
  1308. <row>
  1309. <entry align="left" valign="top"><simpara></simpara></entry>
  1310. <entry align="left" valign="top"><simpara>BINF &lt;all clients&gt;</simpara></entry>
  1311. </row>
  1312. <row>
  1313. <entry align="left" valign="top"><simpara></simpara></entry>
  1314. <entry align="left" valign="top"><simpara>BINF &lt;Client-SID&gt;</simpara></entry>
  1315. </row>
  1316. <row>
  1317. <entry align="left" valign="top"><simpara>&#8230;</simpara></entry>
  1318. <entry align="left" valign="top"><simpara>&#8230;</simpara></entry>
  1319. </row>
  1320. </tbody>
  1321. </tgroup>
  1322. </informaltable>
  1323. </section>
  1324. <section id="_client_client_connection">
  1325. <title>Client – Client connection</title>
  1326. <informaltable
  1327. frame="all"
  1328. rowsep="1" colsep="1"
  1329. >
  1330. <tgroup cols="2">
  1331. <colspec colname="col_1" colwidth="50*"/>
  1332. <colspec colname="col_2" colwidth="50*"/>
  1333. <thead>
  1334. <row>
  1335. <entry align="left" valign="top">Client </entry>
  1336. <entry align="left" valign="top">Server</entry>
  1337. </row>
  1338. </thead>
  1339. <tbody>
  1340. <row>
  1341. <entry align="left" valign="top"><simpara>CSUP ADBASE ADTIGR &#8230;</simpara></entry>
  1342. <entry align="left" valign="top"><simpara></simpara></entry>
  1343. </row>
  1344. <row>
  1345. <entry align="left" valign="top"><simpara></simpara></entry>
  1346. <entry align="left" valign="top"><simpara>CSUP ADBASE ADTIGR &#8230;</simpara></entry>
  1347. </row>
  1348. <row>
  1349. <entry align="left" valign="top"><simpara>CINF IDxxx TO&lt;token&gt;</simpara></entry>
  1350. <entry align="left" valign="top"><simpara></simpara></entry>
  1351. </row>
  1352. <row>
  1353. <entry align="left" valign="top"><simpara></simpara></entry>
  1354. <entry align="left" valign="top"><simpara>CINF IDxxx</simpara></entry>
  1355. </row>
  1356. <row>
  1357. <entry align="left" valign="top"><simpara></simpara></entry>
  1358. <entry align="left" valign="top"><simpara>CGET &#8230;</simpara></entry>
  1359. </row>
  1360. <row>
  1361. <entry align="left" valign="top"><simpara>CSND &#8230;</simpara></entry>
  1362. <entry align="left" valign="top"><simpara></simpara></entry>
  1363. </row>
  1364. <row>
  1365. <entry align="left" valign="top"><simpara>&lt;data&gt;</simpara></entry>
  1366. <entry align="left" valign="top"><simpara></simpara></entry>
  1367. </row>
  1368. </tbody>
  1369. </tgroup>
  1370. </informaltable>
  1371. </section>
  1372. <section id="_commands">
  1373. <title>Commands</title>
  1374. <section id="_sta_2">
  1375. <title>STA</title>
  1376. <informaltable
  1377. frame="all"
  1378. rowsep="1" colsep="1"
  1379. >
  1380. <tgroup cols="2">
  1381. <colspec colname="col_1" colwidth="50*"/>
  1382. <colspec colname="col_2" colwidth="50*"/>
  1383. <thead>
  1384. <row>
  1385. <entry align="left" valign="top">Example </entry>
  1386. <entry align="left" valign="top">Description</entry>
  1387. </row>
  1388. </thead>
  1389. <tbody>
  1390. <row>
  1391. <entry align="left" valign="top"><simpara>ISTA 211 Hub\sfull</simpara></entry>
  1392. <entry align="left" valign="top"><simpara>A STA sent from a hub with the severity Fatal (2) and the error code Hub full (11). The descriptive text afterward is to preferably be presented to the user.</simpara></entry>
  1393. </row>
  1394. <row>
  1395. <entry align="left" valign="top"><simpara>CSTA 151 File\snot\savailable</simpara></entry>
  1396. <entry align="left" valign="top"><simpara>A STA is sent in a client to client connection, indicating that the request for a file failed (error code 51), as the file was not vailable. The severity (Recoverable, 1) indicates that an error occured but that the connection will remain.</simpara></entry>
  1397. </row>
  1398. <row>
  1399. <entry align="left" valign="top"><simpara>ESTA BBBB CCCC 142 Transfer\sprotocol\sunsupported TO123456789 PRADC/0.5</simpara></entry>
  1400. <entry align="left" valign="top"><simpara>A STA is sent from one client to another client in a hub, routed as a E-type message (meaning that the sender should receive it as well), as a response for not supporting transfers of the <emphasis>protocol</emphasis> kind. The token <emphasis>123456789</emphasis> is used and the protocol is "ADC/0.5" (see the command CTM for the version that shall be used in this protocol version).</simpara></entry>
  1401. </row>
  1402. </tbody>
  1403. </tgroup>
  1404. </informaltable>
  1405. </section>
  1406. <section id="_sup_2">
  1407. <title>SUP</title>
  1408. <informaltable
  1409. frame="all"
  1410. rowsep="1" colsep="1"
  1411. >
  1412. <tgroup cols="2">
  1413. <colspec colname="col_1" colwidth="50*"/>
  1414. <colspec colname="col_2" colwidth="50*"/>
  1415. <thead>
  1416. <row>
  1417. <entry align="left" valign="top">Example </entry>
  1418. <entry align="left" valign="top">Description</entry>
  1419. </row>
  1420. </thead>
  1421. <tbody>
  1422. <row>
  1423. <entry align="left" valign="top"><simpara>ISUP ADBASE ADTIGR ADBLOM</simpara></entry>
  1424. <entry align="left" valign="top"><simpara>A SUP sent from a hub indicating that the hub has added the features BASE, TIGR and BLOM.</simpara></entry>
  1425. </row>
  1426. <row>
  1427. <entry align="left" valign="top"><simpara>HSUP RMBLOM ADZLIF</simpara></entry>
  1428. <entry align="left" valign="top"><simpara>A SUP sent from a client to the hub indicating that the client has added the fature ZLIF and removed the feature BLOM.</simpara></entry>
  1429. </row>
  1430. </tbody>
  1431. </tgroup>
  1432. </informaltable>
  1433. </section>
  1434. <section id="_sid_2">
  1435. <title>SID</title>
  1436. <informaltable
  1437. frame="all"
  1438. rowsep="1" colsep="1"
  1439. >
  1440. <tgroup cols="2">
  1441. <colspec colname="col_1" colwidth="50*"/>
  1442. <colspec colname="col_2" colwidth="50*"/>
  1443. <thead>
  1444. <row>
  1445. <entry align="left" valign="top">Example </entry>
  1446. <entry align="left" valign="top">Description</entry>
  1447. </row>
  1448. </thead>
  1449. <tbody>
  1450. <row>
  1451. <entry align="left" valign="top"><simpara>ISID BBBB</simpara></entry>
  1452. <entry align="left" valign="top"><simpara>An SID is sent from the hub indicating that the client&#8217;s SID from then on shall be BBBB.</simpara></entry>
  1453. </row>
  1454. </tbody>
  1455. </tgroup>
  1456. </informaltable>
  1457. </section>
  1458. <section id="_inf_2">
  1459. <title>INF</title>
  1460. <informaltable
  1461. frame="all"
  1462. rowsep="1" colsep="1"
  1463. >
  1464. <tgroup cols="2">
  1465. <colspec colname="col_1" colwidth="50*"/>
  1466. <colspec colname="col_2" colwidth="50*"/>
  1467. <thead>
  1468. <row>
  1469. <entry align="left" valign="top">Example </entry>
  1470. <entry align="left" valign="top">Description</entry>
  1471. </row>
  1472. </thead>
  1473. <tbody>
  1474. <row>
  1475. <entry align="left" valign="top"><simpara>IINF CT32 NIexample_hub DEThe\s\simple\shub</simpara></entry>
  1476. <entry align="left" valign="top"><simpara>An INF is sent from the hub containing its own information: the name is "example_hub" and description "The simple hub".</simpara></entry>
  1477. </row>
  1478. <row>
  1479. <entry align="left" valign="top"><simpara>BINF BBBB HN0 HR1 HO2 NIsample_user DEsample\scontent SF123456 SS42 I4192.168.0.1 U46666 IDIPJJWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KC3I PDIJJJWEPPPLCA33F2ZCR7YO4F6ZXWE4NJ3WQ3C3I</simpara></entry>
  1480. <entry align="left" valign="top"><simpara>An INF sent from a client (with the SID BBBB) containing the following information: the name is "sample_user", the description is "sample content", in three hubs in total (one as registered and two as operator), with a total share size of 42 bytes (with 123456 files) etc.</simpara></entry>
  1481. </row>
  1482. <row>
  1483. <entry align="left" valign="top"><simpara>CINF IPJJWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KC3I TO123456789</simpara></entry>
  1484. <entry align="left" valign="top"><simpara>An INF is sent in a client to client connection indicating the CID and token.</simpara></entry>
  1485. </row>
  1486. </tbody>
  1487. </tgroup>
  1488. </informaltable>
  1489. </section>
  1490. <section id="_msg_2">
  1491. <title>MSG</title>
  1492. <informaltable
  1493. frame="all"
  1494. rowsep="1" colsep="1"
  1495. >
  1496. <tgroup cols="2">
  1497. <colspec colname="col_1" colwidth="50*"/>
  1498. <colspec colname="col_2" colwidth="50*"/>
  1499. <thead>
  1500. <row>
  1501. <entry align="left" valign="top">Example </entry>
  1502. <entry align="left" valign="top">Description</entry>
  1503. </row>
  1504. </thead>
  1505. <tbody>
  1506. <row>
  1507. <entry align="left" valign="top"><simpara>IMSG There\sare\s42\susers\sonline</simpara></entry>
  1508. <entry align="left" valign="top"><simpara>A MSG that is sent from the hub with the message "There are 42 users online".</simpara></entry>
  1509. </row>
  1510. <row>
  1511. <entry align="left" valign="top"><simpara>BMSG BBBB likes\scats ME1</simpara></entry>
  1512. <entry align="left" valign="top"><simpara>A MSG that is sent from a client (with SID BBBB), spoken in third person with the message "likes cats". This will appear like (or something similar) "john likes cats" (assuming that the user with BBBB has the name john).</simpara></entry>
  1513. </row>
  1514. <row>
  1515. <entry align="left" valign="top"><simpara>DMSG CCCC BBBB I\sprefer\sdogs PMCCCC</simpara></entry>
  1516. <entry align="left" valign="top"><simpara>A MSG is sent from a client to another client, spoken as a "private message", with the message "I prefer dogs".</simpara></entry>
  1517. </row>
  1518. </tbody>
  1519. </tgroup>
  1520. </informaltable>
  1521. </section>
  1522. <section id="_sch_2">
  1523. <title>SCH</title>
  1524. <informaltable
  1525. frame="all"
  1526. rowsep="1" colsep="1"
  1527. >
  1528. <tgroup cols="2">
  1529. <colspec colname="col_1" colwidth="50*"/>
  1530. <colspec colname="col_2" colwidth="50*"/>
  1531. <thead>
  1532. <row>
  1533. <entry align="left" valign="top">Example </entry>
  1534. <entry align="left" valign="top">Description</entry>
  1535. </row>
  1536. </thead>
  1537. <tbody>
  1538. <row>
  1539. <entry align="left" valign="top"><simpara>BSCH BBBB ANubuntu ANlinux NOgentoo EXISO EXIMG TO123456789 TY1</simpara></entry>
  1540. <entry align="left" valign="top"><simpara>A SCH that is sent from a client where the search terms "ubuntu" and "linux" should be in the file (TY1) name, excluding files that have "gentoo" in them. The extension of the file should be ISO or IMG. The token "123456789" is used.</simpara></entry>
  1541. </row>
  1542. <row>
  1543. <entry align="left" valign="top"><simpara>BSCH BBBB ANubuntu LE4294967296 TO123456789</simpara></entry>
  1544. <entry align="left" valign="top"><simpara>A SCH that is sent from a client where the search term "ubuntu" should be in the file (TY1) name. The token "123456789" is used. The file must be less than 4 GiB in size (4294967296 bytes).</simpara></entry>
  1545. </row>
  1546. <row>
  1547. <entry align="left" valign="top"><simpara>FSCH BBBB +TCP4 ANubuntu TO123456789</simpara></entry>
  1548. <entry align="left" valign="top"><simpara>A SCH that is sent from a client where the search term "ubuntu" should be in the file (TY1) name. The token "123456789" is used. The hub should only route the SCH to clients that support the feature TCP4.</simpara></entry>
  1549. </row>
  1550. </tbody>
  1551. </tgroup>
  1552. </informaltable>
  1553. </section>
  1554. <section id="_res_2">
  1555. <title>RES</title>
  1556. <informaltable
  1557. frame="all"
  1558. rowsep="1" colsep="1"
  1559. >
  1560. <tgroup cols="2">
  1561. <colspec colname="col_1" colwidth="50*"/>
  1562. <colspec colname="col_2" colwidth="50*"/>
  1563. <thead>
  1564. <row>
  1565. <entry align="left" valign="top">Example </entry>
  1566. <entry align="left" valign="top">Description</entry>
  1567. </row>
  1568. </thead>
  1569. <tbody>
  1570. <row>
  1571. <entry align="left" valign="top"><simpara>DRES CCCC BBBB FN/share/linux/ubuntu.iso SI42 SL1 TO123456789 TRIPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII</simpara></entry>
  1572. <entry align="left" valign="top"><simpara>A RES that is sent from a client (through the hub) indicating a response with the file name "ubuntu.iso" (and its path within the share), where the file sise is 42 bytes. The token "123456789" is used. The TR field indicate the hash of the file (see the TIGR extension).</simpara></entry>
  1573. </row>
  1574. <row>
  1575. <entry align="left" valign="top"><simpara>URES IPJJWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII TRIPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII FN/share/linux/ubuntu.iso SI42 TO123456789</simpara></entry>
  1576. <entry align="left" valign="top"><simpara>A RES that is sent from a client (via UDP) indicating a response with the file name "ubuntu.iso" (and its path within the share), where the file sise is 42 bytes. The token "123456789" is used. The TR field indicate the hash of the file (see the TIGR extension).</simpara></entry>
  1577. </row>
  1578. <row>
  1579. <entry align="left" valign="top"><simpara>CRES FN/share/linux/ubuntu.iso SI42</simpara></entry>
  1580. <entry align="left" valign="top"><simpara>A RES that is sent from a client indicating a response with the file name "ubuntu.iso" (and its path within the share), where the file sise is 42 bytes.</simpara></entry>
  1581. </row>
  1582. </tbody>
  1583. </tgroup>
  1584. </informaltable>
  1585. </section>
  1586. <section id="_ctm_2">
  1587. <title>CTM</title>
  1588. <informaltable
  1589. frame="all"
  1590. rowsep="1" colsep="1"
  1591. >
  1592. <tgroup cols="2">
  1593. <colspec colname="col_1" colwidth="50*"/>
  1594. <colspec colname="col_2" colwidth="50*"/>
  1595. <thead>
  1596. <row>
  1597. <entry align="left" valign="top">Example </entry>
  1598. <entry align="left" valign="top">Description</entry>
  1599. </row>
  1600. </thead>
  1601. <tbody>
  1602. <row>
  1603. <entry align="left" valign="top"><simpara>DCTM BBBB CCCC ADC/1.0 6666 123456789</simpara></entry>
  1604. <entry align="left" valign="top"><simpara>A CTM that is sent from a client to another client indicating that it wants to have a client to client connection. The protocol "ADC/1.0" is used. The port 6666 is used. The token is 123456789. The hub should only send this to the target user (with SID CCCC).</simpara></entry>
  1605. </row>
  1606. <row>
  1607. <entry align="left" valign="top"><simpara>ECTM BBBB CCCC ADC/0.5 6666 123456789</simpara></entry>
  1608. <entry align="left" valign="top"><simpara>A CTM that is sent from a client to another client indicating that it wants to have a client to client connection. The (fictional) protocol "ADC/1.0" is used. The port 6666 is used. The token is 123456789. The hub should send this to the target user (with SID CCCC) and to the originating party (with SID BBBB).</simpara></entry>
  1609. </row>
  1610. </tbody>
  1611. </tgroup>
  1612. </informaltable>
  1613. </section>
  1614. <section id="_rcm_2">
  1615. <title>RCM</title>
  1616. <informaltable
  1617. frame="all"
  1618. rowsep="1" colsep="1"
  1619. >
  1620. <tgroup cols="2">
  1621. <colspec colname="col_1" colwidth="50*"/>
  1622. <colspec colname="col_2" colwidth="50*"/>
  1623. <thead>
  1624. <row>
  1625. <entry align="left" valign="top">Example </entry>
  1626. <entry align="left" valign="top">Description</entry>
  1627. </row>
  1628. </thead>
  1629. <tbody>
  1630. <row>
  1631. <entry align="left" valign="top"><simpara>DRCM BBBB CCCC ADC/1.0 123456789</simpara></entry>
  1632. <entry align="left" valign="top"><simpara>A RCM that is sent from a client to another client indicating that it wants to have a client to client connection. The protocol "ADC/1.0" is used. TThe token is 123456789. The hub should only send this to the target user (with SID CCCC).</simpara></entry>
  1633. </row>
  1634. <row>
  1635. <entry align="left" valign="top"><simpara>ERCM BBBB CCCC ADC/0.5 123456789</simpara></entry>
  1636. <entry align="left" valign="top"><simpara>A RCM that is sent from a client to another client indicating that it wants to have a client to client connection. The (fictional) protocol "ADC/0.5" is used. TThe token is 123456789. The hub should send this to the target user (with SID CCCC) and to the originating party (with SID BBBB).</simpara></entry>
  1637. </row>
  1638. </tbody>
  1639. </tgroup>
  1640. </informaltable>
  1641. </section>
  1642. <section id="_gpa_2">
  1643. <title>GPA</title>
  1644. <informaltable
  1645. frame="all"
  1646. rowsep="1" colsep="1"
  1647. >
  1648. <tgroup cols="2">
  1649. <colspec colname="col_1" colwidth="50*"/>
  1650. <colspec colname="col_2" colwidth="50*"/>
  1651. <thead>
  1652. <row>
  1653. <entry align="left" valign="top">Example </entry>
  1654. <entry align="left" valign="top">Description</entry>
  1655. </row>
  1656. </thead>
  1657. <tbody>
  1658. <row>
  1659. <entry align="left" valign="top"><simpara>IGPA JJWEPPPLCA3PF2ZCRRYO3333</simpara></entry>
  1660. <entry align="left" valign="top"><simpara>A GPA that is sent from the hub indicating the password-response sequence with the random data JJWEPPPLCA3PF2ZCRRYO3333.</simpara></entry>
  1661. </row>
  1662. </tbody>
  1663. </tgroup>
  1664. </informaltable>
  1665. </section>
  1666. <section id="_pas_2">
  1667. <title>PAS</title>
  1668. <informaltable
  1669. frame="all"
  1670. rowsep="1" colsep="1"
  1671. >
  1672. <tgroup cols="2">
  1673. <colspec colname="col_1" colwidth="50*"/>
  1674. <colspec colname="col_2" colwidth="50*"/>
  1675. <thead>
  1676. <row>
  1677. <entry align="left" valign="top">Example </entry>
  1678. <entry align="left" valign="top">Description</entry>
  1679. </row>
  1680. </thead>
  1681. <tbody>
  1682. <row>
  1683. <entry align="left" valign="top"><simpara>HPAS YO4F2ZX2EV2JMW2KCIIYYYYY</simpara></entry>
  1684. <entry align="left" valign="top"><simpara>A PAS that is sent from the client where the password and random data is hashed.</simpara></entry>
  1685. </row>
  1686. </tbody>
  1687. </tgroup>
  1688. </informaltable>
  1689. </section>
  1690. <section id="_qui_2">
  1691. <title>QUI</title>
  1692. <informaltable
  1693. frame="all"
  1694. rowsep="1" colsep="1"
  1695. >
  1696. <tgroup cols="2">
  1697. <colspec colname="col_1" colwidth="50*"/>
  1698. <colspec colname="col_2" colwidth="50*"/>
  1699. <thead>
  1700. <row>
  1701. <entry align="left" valign="top">Example </entry>
  1702. <entry align="left" valign="top">Description</entry>
  1703. </row>
  1704. </thead>
  1705. <tbody>
  1706. <row>
  1707. <entry align="left" valign="top"><simpara>IQUI BBBB</simpara></entry>
  1708. <entry align="left" valign="top"><simpara>A QUI that is sent from the hub indicating that the client BBBB has disconnected.</simpara></entry>
  1709. </row>
  1710. <row>
  1711. <entry align="left" valign="top"><simpara>IQUI BBBB IDCCCC MSCats\sare\shorrible DI1 TL-1</simpara></entry>
  1712. <entry align="left" valign="top"><simpara>A QUI that is sent from the hub indicating that the client BBBB has disconnected. The originator of the action is the client with the SID CCCC. The message "Cats are horrible" is included. All clients should terminate their connections with the client BBBB (DI1). The client should never attempt to reconnect (TL-1).</simpara></entry>
  1713. </row>
  1714. </tbody>
  1715. </tgroup>
  1716. </informaltable>
  1717. </section>
  1718. <section id="_get_2">
  1719. <title>GET</title>
  1720. <informaltable
  1721. frame="all"
  1722. rowsep="1" colsep="1"
  1723. >
  1724. <tgroup cols="2">
  1725. <colspec colname="col_1" colwidth="50*"/>
  1726. <colspec colname="col_2" colwidth="50*"/>
  1727. <thead>
  1728. <row>
  1729. <entry align="left" valign="top">Example </entry>
  1730. <entry align="left" valign="top">Description</entry>
  1731. </row>
  1732. </thead>
  1733. <tbody>
  1734. <row>
  1735. <entry align="left" valign="top"><simpara>CGET file TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII 0 -1</simpara></entry>
  1736. <entry align="left" valign="top"><simpara>A GET that is sent from a client as a request for a file with the identifier TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII (see TIGR extension). The sending client should send the entire file.</simpara></entry>
  1737. </row>
  1738. <row>
  1739. <entry align="left" valign="top"><simpara>CGET list /share/ 0 -1 RE1</simpara></entry>
  1740. <entry align="left" valign="top"><simpara>A GET that is sent from a client as a request for a directory with the identifier /share/. The sending client should send the directory and its subdirectories.</simpara></entry>
  1741. </row>
  1742. <row>
  1743. <entry align="left" valign="top"><simpara>CGET file TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII 6666 3333</simpara></entry>
  1744. <entry align="left" valign="top"><simpara>A GET that is sent from a client as a request for a file with the identifier TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII (see TIGR extension). The sending client should send the next 3333 bytes, starting at byte position 6666.</simpara></entry>
  1745. </row>
  1746. </tbody>
  1747. </tgroup>
  1748. </informaltable>
  1749. </section>
  1750. <section id="_gfi_2">
  1751. <title>GFI</title>
  1752. <informaltable
  1753. frame="all"
  1754. rowsep="1" colsep="1"
  1755. >
  1756. <tgroup cols="2">
  1757. <colspec colname="col_1" colwidth="50*"/>
  1758. <colspec colname="col_2" colwidth="50*"/>
  1759. <thead>
  1760. <row>
  1761. <entry align="left" valign="top">Example </entry>
  1762. <entry align="left" valign="top">Description</entry>
  1763. </row>
  1764. </thead>
  1765. <tbody>
  1766. <row>
  1767. <entry align="left" valign="top"><simpara>CGFI file TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII</simpara></entry>
  1768. <entry align="left" valign="top"><simpara>A GFI that is sent from a client as a request for file information for a file with the identifier TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII (see TIGR extension).</simpara></entry>
  1769. </row>
  1770. <row>
  1771. <entry align="left" valign="top"><simpara>CGFI list /share/</simpara></entry>
  1772. <entry align="left" valign="top"><simpara>A GFI that is sent from a client as a request for directory information with the identifier /share/.</simpara></entry>
  1773. </row>
  1774. </tbody>
  1775. </tgroup>
  1776. </informaltable>
  1777. </section>
  1778. <section id="_snd_2">
  1779. <title>SND</title>
  1780. <informaltable
  1781. frame="all"
  1782. rowsep="1" colsep="1"
  1783. >
  1784. <tgroup cols="2">
  1785. <colspec colname="col_1" colwidth="50*"/>
  1786. <colspec colname="col_2" colwidth="50*"/>
  1787. <thead>
  1788. <row>
  1789. <entry align="left" valign="top">Example </entry>
  1790. <entry align="left" valign="top">Description</entry>
  1791. </row>
  1792. </thead>
  1793. <tbody>
  1794. <row>
  1795. <entry align="left" valign="top"><simpara>CSND file TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII 0 9999</simpara></entry>
  1796. <entry align="left" valign="top"><simpara>A SND that is sent from a client prior to streaming data for the file with the identifier TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII (see TIGR extension). The sending client indicates that it will send 9999 bytes and start streaming at the byte position 0 (the beginning of the file).</simpara></entry>
  1797. </row>
  1798. <row>
  1799. <entry align="left" valign="top"><simpara>CSND list /share/ 0 66</simpara></entry>
  1800. <entry align="left" valign="top"><simpara>A SND that is sent from a client prior to streaming data for the directory with the identifier /share/. The sending client indicates that it will send 66 bytes.</simpara></entry>
  1801. </row>
  1802. <row>
  1803. <entry align="left" valign="top"><simpara>CSND file TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII 6666 3333</simpara></entry>
  1804. <entry align="left" valign="top"><simpara>A SND that is sent from a client prior to streaming data for the file with the identifier TTH/IPPPWEPPPLCA3PF2ZCRRYO4F2ZX2EV2JMW2KCII (see TIGR extension). The sending client indicates that it will send 3333 bytes and start streaming at the byte position 6666.</simpara></entry>
  1805. </row>
  1806. </tbody>
  1807. </tgroup>
  1808. </informaltable>
  1809. </section>
  1810. </section>
  1811. </section>
  1812. <section id="_terminology">
  1813. <title>Terminology</title>
  1814. <informaltable
  1815. frame="all"
  1816. rowsep="1" colsep="1"
  1817. >
  1818. <tgroup cols="2">
  1819. <colspec colname="col_1" colwidth="50*"/>
  1820. <colspec colname="col_2" colwidth="50*"/>
  1821. <thead>
  1822. <row>
  1823. <entry align="left" valign="top">Term </entry>
  1824. <entry align="left" valign="top">Description</entry>
  1825. </row>
  1826. </thead>
  1827. <tbody>
  1828. <row>
  1829. <entry align="left" valign="top"><simpara>FOURCC</simpara></entry>
  1830. <entry align="left" valign="top"><simpara>Four character code. This may be the message type followed by the command, e.g. "ISTA", "BMSG" etc. This may also be the name of a feature (BASE, TIGR etc). Any four character identification.</simpara></entry>
  1831. </row>
  1832. <row>
  1833. <entry align="left" valign="top"><simpara>Server</simpara></entry>
  1834. <entry align="left" valign="top"><simpara>The hub is the <emphasis>server</emphasis> in a client - hub context. The client receiving the incoming connection is the <emphasis>server</emphasis> in a client - client context.</simpara></entry>
  1835. </row>
  1836. <row>
  1837. <entry align="left" valign="top"><simpara>Base32</simpara></entry>
  1838. <entry align="left" valign="top"><simpara>An encoding used by the protocol, see RFC 4648 for more information about Base32. Note that the Base32 implementation in ADC is never padded.</simpara></entry>
  1839. </row>
  1840. <row>
  1841. <entry align="left" valign="top"><simpara>Context</simpara></entry>
  1842. <entry align="left" valign="top"><simpara>When a command states a context, e.g. "T" (To hub), it defines an expectance on the flow of traffic. A context may refer to one or multiple message types. For example, for the context <emphasis>T</emphasis>, the message types "B", "C", "D", "E", "F" and "H" are valid. Note that the context is not a restriction in any way, implementations may further extend a command&#8217;s expected contexts.</simpara></entry>
  1843. </row>
  1844. </tbody>
  1845. </tgroup>
  1846. </informaltable>
  1847. </section>
  1848. <section id="_standard_extensions">
  1849. <title>Standard Extensions</title>
  1850. <simpara>Apart from supporting BASE, clients may opt to implement one or more of the
  1851. following standard extensions. To be considered for addition, an extension must
  1852. be well documented and must be implemented and tested in the real world.</simpara>
  1853. <simpara>While in development, extensions are tracked here:
  1854. <ulink url="http://adc.sourceforge.net/wiki/index.php/Extensions">http://adc.sourceforge.net/wiki/index.php/Extensions</ulink></simpara>
  1855. <simpara>Once they have been tried and accepted, they&#8217;re moved to the official extensions
  1856. document that accompanies this one.</simpara>
  1857. </section>
  1858. </article>
Add Comment
Please, Sign In to add comment