gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r1465 - GNUnet-docs/WWW


From: grothoff
Subject: [GNUnet-SVN] r1465 - GNUnet-docs/WWW
Date: Wed, 13 Jul 2005 08:21:38 -0700 (PDT)

Author: grothoff
Date: 2005-07-13 08:21:33 -0700 (Wed, 13 Jul 2005)
New Revision: 1465

Modified:
   GNUnet-docs/WWW/protocol_cs_afs.php3
   GNUnet-docs/WWW/protocol_cs_index.inc
   GNUnet-docs/WWW/protocol_cs_stats.php3
   GNUnet-docs/WWW/protocol_cs_traffic.php3
Log:
update

Modified: GNUnet-docs/WWW/protocol_cs_afs.php3
===================================================================
--- GNUnet-docs/WWW/protocol_cs_afs.php3        2005-07-13 14:51:18 UTC (rev 
1464)
+++ GNUnet-docs/WWW/protocol_cs_afs.php3        2005-07-13 15:21:33 UTC (rev 
1465)
@@ -1,342 +1,203 @@
 <?php
 include("scripts.php3");
 $title = "GNUnet Documentation: AFS Client-to-Node protocol";
-$description="GNUnet Documentation - Protocol between client and node for 
anonymous file sharing";
+$description="Protocol between client and node for (anonymous) file sharing";
 include("html_header.php3");
 
-ANCHOR("CSprotocolAFS");H3("GNUnet Protocol: client-to-node: Anonymous File 
Sharing");
+H3("GNUnet Protocol: client-to-node: File Sharing");
 BP();
 afslogo();
-W("The GNUnet client-to-node procotol currently defines the following 
messages:");
+W("The file-sharing procotol currently defines the following messages between 
client and server:");
 EP();
 ?>
 <ul>
- <li><a href="#CS_QUERY">QUERY</a></li>
- <li><a href="#CS_3HASH">RESULT_3HASH</a></li>
- <li><a href="#CS_CHK">RESULT_CHK</a></li>
- <li><a href="#CS_INSERT_CHK">INSERT_CHK</a></li>
- <li><a href="#CS_INSERT_3HASH">INSERT_3HASH</a></li>
- <li><a href="#CS_INDEX_BLOCK">INDEX_BLOCK</a></li>
- <li><a href="#CS_INDEX_FILE">INDEX_FILE</a></li>
- <li><a href="#CS_INDEX_SUPER">INDEX_SUPER</a></li>
- <li><a href="#CS_DELETE_CHK">DELETE_CHK</a></li>
- <li><a href="#CS_DELETE_3HASH">DELETE_3HASH</a></li>
- <li><a href="#CS_UNINDEX_BLOCK">UNINDEX_BLOCK</a></li>
- <li><a href="#CS_UNINDEX_FILE">UNINDEX_FILE</a></li>
- <li><a href="#CS_UNINDEX_SUPER">UNINDEX_SUPER</a></li>
- <li><a href="#CS_NSQUERY">NSQUERY</a></li>
- <li><a href="#CS_INSERT_SBLOCK">INSERT_SBLOCK</a></li>
- <li><a href="#CS_RESULT_SBLOCK">RESULT_SBLOCK</a></li>
- <li><a href="#CS_UPLOAD_FILE">UPLOAD_FILE</a></li>
- <li><a href="#CS_LINK_FILE">LINK_FILE</a></li>
+ <li><a href="#CS_QUERY">QUERY_START</a></li>
+ <li><a href="#CS_QUERY_STOP">QUERY_STOP</a></li>
+ <li><a href="#CS_RESULT">RESULT</a></li>
+ <li><a href="#CS_INSERT">INSERT</a></li>
+ <li><a href="#CS_INDEX">INDEX</a></li>
+ <li><a href="#CS_DELETE">DELETE</a></li>
+ <li><a href="#CS_UNINDEX">UNINDEX</a></li>
+ <li><a href="#CS_TESTINDEX">TESTINDEX</a></li>
  <li><a href="#CS_GET_AVG_PRIORITY">GET_AVG_PRIORITY</a></li>
+ <li><a href="#CS_INIT_INDEX">INIT_INDEX</a></li>
 </ul>
 <?php
 
-ANCHOR("CS_QUERY");H4("QUERY");
+ANCHOR("CS_QUERY");H4("QUERY_START");
 BP();
 W("The client sends a message of this form whenever it is searching or 
downloading.");
 W("The server is expected to perform the search and send results back to the 
client.");
-W("The server can send any number of results with any delay (but typically no 
results are returned after ttl seconds and the client will re-issue the 
request), including none.");
-W("The format of the CS_QUERY message is:");
+W("The server can send any number of results with any delay.");
+W("Typically no results are returned after <tt>ttl</tt> seconds and the client 
will re-issue the request.");
+W("The server is supposed to stop searching after receiving a matching 
<tt>QUERY_STOP</tt> message.");
+W("The format of the message is:");
 EP();
+LAYOUT("RequestSearch",
+       F(ARRAY(N("message size (88 or 152)", NBO_()) => 2,
+               V("request type", 8, NBO_()) => 2,
+               N("priority", NBO_()) => 4,
+               N("expiration (cron_t)", NBO_()) => 8,
+               N("type", NBO_()) => 4,
+               N("anonymity level", NBO_()) => 4,
+               N("query", "") => 64,
+               N("namespace (optional)", "") => 64)));
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("12+n*20", "8");
-rowIntEntryNBO("priority");
-rowIntEntryNBO("time to live (ttl)");
-fiveRowIntEntries("query [n]");
-echo "</table>\n";
 
-ANCHOR("CS_3HASH");H4("3HASH");
+ANCHOR("CS_QUERY_STOP");H4("QUERY_STOP");
 BP();
-W("If <tt>gnunetd</tt> finds a search result to a %s, it sends back the data 
encapsulated in this message.",
-  extlink_("#CS_QUERY","QUERY"));
-W("The message contains the double hash from the query to identify the 
result.");
-W("The format of the  message is:");
+W("This message is send by the client to <tt>gnunetd</tt> to abort a search.");
+W("The format of the message is:");
 EP();
+LAYOUT("RequestSearch",
+       F(ARRAY(N("message size (88 or 152)", NBO_()) => 2,
+               V("request type", 9, NBO_()) => 2,
+               N("priority", NBO_()) => 4,
+               N("expiration (cron_t)", NBO_()) => 8,
+               N("type", NBO_()) => 4,
+               N("anonymity level", NBO_()) => 4,
+               N("query", "") => 64,
+               N("namespace (optional)", "") => 64)));
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">";
-include("bittable.inc");
-rowSizeType("1048","9");
-fiveRowIntEntries("proof (double hash)");
-rowIntEntry("data (1024 octets)");
-echo "</table>";
 
-ANCHOR("CS_CHK");H4("CHK");
+
+ANCHOR("CS_RESULT");H4("RESULT");
 BP();
-W("If <tt>gnunetd</tt> finds a download result to a %s, it sends back the data 
encapsulated in this message.",
-  extlink_("#CS_QUERY","QUERY"));
-W("The format of the message is:");
+W("If <tt>gnunetd</tt> finds a search result to a %s, it sends back the data 
encapsulated in this message.",
+  extlink_("#CS_QUERY","QUERY_START"));
+W("The format of the  message is:");
 EP();
+LAYOUT("ReplyContent",
+       F(ARRAY(N("message size (4+X)", NBO_()) => 2,
+               V("request type", 9, NBO_()) => 2,
+               N("data (ECRS encoded)", "") => 0)));
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("1028","10");
-rowIntEntry("data (1024 octets)");
-echo "</table>\n";
-
-ANCHOR("CS_INSERT_CHK");H4("INSERT_CHK");
+ANCHOR("CS_INSERT");H4("INSERT");
 BP();
-W("Clients send this message to insert search results into the network.");
+W("Clients send this message to insert data into the network.");
 W("The server is supposed to store the data and share it with other nodes.");
 W("Note that there are two ways to share data, via insertion and via %s.",
-  extlink_("#CS_INDEX_BLOCK","indexing"));
+  extlink_("#CS_INDEX","indexing"));
 W("Indexing only applies to downloads and never to search results.");
 W("The importance in this message tells the server how important it is to 
store this content, so that the server can decide which content to discard if 
it is running out of space.");
 P();
 W("If the insertion was successful, the server replies with a %s containing 
<tt>OK</tt>, otherwise the server replies with <tt>SYSERR</tt>.",
-  extlink_("#CS_RETURN_VALUE","RETURN_VALUE"));
+  intlink_("protocol_cs_core.php3","RETURN_VALUE"));
 P();
-W("The format of the INSERT_CHK message is:");
+W("The format of the message is:");
 EP();
+LAYOUT("RequestInsert",
+       F(ARRAY(N("message size (20+X)", NBO_()) => 2,
+               V("request type", 10, NBO_()) => 2,
+               N("priority", NBO_()) => 4,
+               N("expiration (cron_t)", NBO_()) => 8,
+               N("anonymity level", NBO_()) => 4,
+              N("data (ECRS encoded)", "") => 0)));
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("1032","11");
-rowIntEntryNBO("priority");
-rowIntEntry("data (1024 octets)");
-echo "</table>\n";
-
-ANCHOR("CS_INSERT_3HASH");H4("INSERT_3HASH");
+ANCHOR("CS_INDEX");H4("INDEX");
 BP();
-W("Clients send this message to insert search results into the network.");
-W("The server is supposed to store the data and share it with other nodes.");
-W("The importance in this message tells the server how important it is to 
store this content, so that the server can decide which content to discard if 
it is running out of space.");
+W("Clients send this message to index content to make it available to the 
network.");
+W("The indexing message does not only contain the data but also describes a 
way for the server to possibly find it on-demand.");
+W("This is achieved using the <tt>file ID</tt>, a hash of the entire file.");
+W("This hash thus uniquely identifies the file.");
+W("The client should send an <tt>INDEX_INIT</tt> message earlier that tells 
the server the location of a file with that hash in the filesystem.</tt>");
+W("If <tt>gnunetd</tt> can access that file, it will create a symbolic link 
instead of copying <tt>data</tt> into its internal database.");
+W("If <tt>gnunetd</tt> cannot access the file, it will create a copy of the 
file using the <tt>data</tt> contained in the <tt>INDEX</tt> messages.");
+W("In both cases <tt>gnunetd</tt> will store an index of the file in its 
database in order to be able to retrieve the blocks on-demand.");
 P();
-W("If the insertion was successful, the server replies with a %s containing 
<tt>OK</tt>, otherwise the server replies with <tt>SYSERR</tt>.",
-  extlink_("#CS_RETURN_VALUE","RETURN_VALUE"));
-P();
-W("The format of the INSERT_3HASH message is:");
-EP();
-
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("1052","12");
-rowIntEntryNBO("priority");
-fiveRowIntEntries("proof (double hash)");
-rowIntEntry("data (1024 octets)");
-echo "</table>\n";
-
-ANCHOR("CS_INDEX_BLOCK");H4("INDEX_BLOCK");
-BP();
-W("Clients send this message to insert content into the network.");
-W("The indexing message does not contain the data but describes a way for the 
server to find on-demand.");
-W("The %s contains an index into the list of filenames and the offset in the 
file at which the block corresponding to the query can be found.",
-  extlink_("doxygen/html/structContentIndex.html","ContentIndex struct"));
-P();
 W("If the indexing was successful, the server replies with a %s containing 
<tt>OK</tt>, otherwise the server replies with <tt>SYSERR</tt>.",
-  extlink_("#CS_RETURN_VALUE","RETURN_VALUE"));
-W("The format of the INDEX_BLOCK message is:");
+  intlink_("protocol_cs_core.php3","RETURN_VALUE"));
+W("The format of the message is:");
 EP();
+LAYOUT("RequestIndex",
+       F(ARRAY(N("message size (92+X)", NBO_()) => 2,
+               V("request type", 11, NBO_()) => 2,
+               N("priority", NBO_()) => 4,
+               N("expiration (cron_t)", NBO_()) => 8,
+               N("offset of data in file", NBO_()) => 8,
+               N("file ID (SHA-512 of entire file)", "") => 64,
+               N("anonymity level", NBO_()) => 4,
+              N("data (X bytes in plaintext)", "") => 0)));
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("36", "13");
-rowIntEntryVerbatim(extlink_("doxygen/html/structContentIndex.html","ContentIndex")
 . W_("(32 octets)"));
-echo "</table>\n";
 
-ANCHOR("CS_INDEX_FILE");H4("INDEX_FILE");
+ANCHOR("CS_DELETE");H4("DELETE");
 BP();
-W("This message is used by the client to add a file to the list of shared 
files.");
-W("<tt>gnunetd</tt> responds to this request with %s which can be used in the 
%s messages.",
-  ARRAY(extlink_("#CS_RETURN_VALUE","an index into the list of files"),
-    extlink_("#CS_INDEX_BLOCK","CS_INDEX_BLOCK")));
-W("The file is identified by the RIPE160MD hash of the contents.");
-W("Note that the client is expected to either copy or linked the file to the 
index directory with the appropriate messages.");
-W("Attempting to create a link should be done before INDEX_FILE, but making a 
copy should be done afterwards.");
-W("The server responds with a value of SYSERR if the quota-settings 
(INDEX-QUOTA) will not allow the upload of the file.");
-W("The client should use filesize 0 if a symlink will be used and thus the 
quota check can hence be avoided.");
-W("The format of the INDEX_FILE message is:");
+W("This message is used by clients to request the deletion of specific content 
by <tt>gnunetd</tt> from the local datastore.");
+W("The format of the message is:");
 EP();
+LAYOUT("RequestDelete",
+       F(ARRAY(N("message size (4+X)", NBO_()) => 2,
+               V("request type", 12, NBO_()) => 2,
+              N("data (ECRS encoded)", "") => 0)));
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("32", "20");
-rowIntEntry("filesize");
-fiveRowIntEntries("Hash of the file (used to create the filename)");
-echo "</table>\n";
 
-ANCHOR("CS_INDEX_SUPER");H4("INDEX_SUPER");
+ANCHOR("CS_UNINDEX");H4("UNINDEX");
 BP();
-W("This message adds a hash-code to one of the bloom filters, making the 
content effectively available.");
-W("The format of the INDEX_SUPER is:");
+W("This message is used to request the removal of an entire indexed file from 
the database of <tt>gnunetd</tt>.");
+W("<tt>gnunetd</tt> will use the original file to reconstruct the individual 
blocks stored in the index.");
+W("For that, <tt>gnunetd</tt> needs to know the <tt>blocksize</tt> that was 
used during the construction of the original index.");
+W("The format of the message is:");
 EP();
+LAYOUT("RequestUnindex",
+       F(ARRAY(N("message size (72)", NBO_()) => 2,
+               V("request type", 13, NBO_()) => 2,
+               N("blocksize", NBO_()) => 4,
+               N("file ID (SHA-512 of entire file)", "") => 64)));
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("24", "15");
-fiveRowIntEntries("proof (super hash)");
-echo "</table>\n";
 
-ANCHOR("CS_DELETE_CHK");H4("DELETE_CHK");
+ANCHOR("CS_TESTINDEX");H4("TESTINDEX");
 BP();
-W("The CS_DELETE_CHK message uses the same format as the %s message, only that 
the type is set to 16.",
-  extlink_("#CS_INSERT_CHK","CS_INSERT_CHK"));
-W("The AFS module then deletes the corresponding CHK block.");
-W("A %s is send back to indicate success or failure.",
-   extlink_("#CS_RETURN_VALUE","RETURN_VALUE"));
+W("This message is used by the client to test if a given file is already 
indexed.");
+W("The server replies with a %s containing <tt>YES</tt> or <tt>NO</tt>.",
+  intlink_("protocol_cs_core.php3","RETURN_VALUE"));
+W("The format of the message is:");
 EP();
-
-ANCHOR("CS_DELETE_3HASH");H4("DELETE_3HASH");
-BP();
-W("The CS_DELETE_3HASH message uses the same format as the %s message, only 
that the type is set to 17.",
-  extlink_("#CS_INSERT_CHK","CS_INSERT_CHK"));
-W("The AFS module then deletes the corresponding block.");
-W("A %s is send back to indicate success or failure.",
-   extlink_("#CS_RETURN_VALUE","RETURN_VALUE"));
-W("CS_DELETE_3HASH is not currently used by the code since there is no good 
way to establish the RBlocks that correspond to a given file when facing 
user-supplied keywords and meta-data.");
+LAYOUT("RequestTestindex",
+       F(ARRAY(V("message size", 72, NBO_()) => 2,
+               V("request type", 14, NBO_()) => 2,
+               V("reserved", 0, NBO_()) => 4,
+               N("file ID (SHA-512 of entire file)", "") => 64)));
 EP();
 
-ANCHOR("CS_UNINDEX_BLOCK");H4("UNINDEX_BLOCK");
-BP();
-W("The CS_UNINDEX_BLOCK message uses the same format as the %s message, only 
that the type is set to 18.",
-  extlink_("#CS_INDEX_BLOCK","CS_INDEX_BLOCK"));
-W("The AFS module then removes the corresponding index entry from the 
database.");
-W("A %s is send back to indicate success or failure.",
-   extlink_("#CS_RETURN_VALUE","RETURN_VALUE"));
-EP();
 
-ANCHOR("CS_UNINDEX_FILE");H4("UNINDEX_FILE");
-BP();
-W("The CS_UNINDEX_BLOCK message uses the same format as the %s message, only 
that the type is set to 19.",
-  extlink_("#CS_INDEX_FILE","CS_INDEX_FILE"));
-W("The AFS module then removes the corresponding file from the file list.");
-W("A %s is send back to indicate success or failure.",
-   extlink_("#CS_RETURN_VALUE","RETURN_VALUE"));
-EP();
+ANCHOR("CS_GET_AVG_PRIORITY"); H4("GET_AVG_PRIORITY");
 
-ANCHOR("CS_UNINDEX_SUPER");H4("UNINDEX_SUPER");
 BP();
-W("The CS_UNINDEX_SUPER message uses the same format as the %s message, only 
that the type is set to 20.",
-  extlink_("#CS_INDEX_FILE","CS_INDEX_FILE"));
-W("The AFS module then deletes the corresponding hash from the bloomfilter for 
super-hashes.");
-W("A %s is send back to indicate success or failure.",
-   extlink_("#CS_RETURN_VALUE","RETURN_VALUE"));
+W("This query is used by the client to determine the current average priority 
of requests from OTHER peers that are in the routing table.");
+W("The server replies with a %s containing that average priority (or SYSERR on 
error).",
+  intlink_("protocol_cs_core.php3","RETURN_VALUE"));
+W("The format of the message is:");
 EP();
+LAYOUT("CS_HEADER",
+       F(ARRAY(V("message size", 4, NBO_()) => 2,
+               V("request type", 15, NBO_()) => 2)));
 
-ANCHOR("CS_NSQUERY");H4("NSQUERY");
-BP();
-W("This message is used by clients to initiate a namespace query.");
-W("It differs from ordinary queries in that it also contains the identifier of 
the namespace N.");
-W("Furthermore, an NSQUERY can only contain one identifier that is 
requested.");
-W("The SBlock identifier R that is used in an NSQUERY is derived from the 
namespace identifier N and the key K that is used to encrypt the corresponding 
SBlock by the following formula:");
-EP();
-PRE("R := H(K) XOR N");
-BP();
-W("The format is:");
-EP();
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("52","21");
-rowIntEntryNBO("priority");
-rowIntEntryNBO("time-to-live");
-fiveRowIntEntries("N (namespace id)");
-fiveRowIntEntries("R (SBlock identifier)");
-echo "</table>\n";
 
-ANCHOR("CS_INSERT_SBLOCK");H4("INSERT_SBLOCK");
-BP();
-W("This message is used by clients to insert an SBlock into the network.");
-W("The format is:");
-EP();
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("1032","22");
-rowIntEntryNBO("priority");
-rowIntEntry("encrypted data (484 bytes)");
-fiveRowIntEntries("R (routing identifier)");
-rowIntEntryVerbatim(extlink_("doxygen/html/structSignature.html",
-                             "RSA signature (256 octets)"));
-row(shortEntryVerbatim_(extlink_("doxygen/html/structPublicKey.html","Public 
Key") .
-                       " " . W_("length of N + E + 2 (256+2+2 = 260)") . 
NBO_()),
-    shortEntryVerbatim_(W_("Public Key, length of N (256)") . NBO_()));
-rowIntEntry("Public Key, N (256 octets)");
-row(shortEntry_("Public Key, E"),
-    shortEntry_("padding (must be 0)"));
-echo "</table>\n";
+ANCHOR("CS_INIT_INDEX"); H4("INIT_INDEX");
 
 BP();
-W("Note that there is currently no corresponding message to delete an 
SBlock.");
-EP();
+W("This message is used by the client to initiate the indexing process of a 
file.");
+W("The file is identified by its SHA-512 hash.");
 
-ANCHOR("CS_RESULT_SBLOCK");H4("RESULT_SBLOCK");
-BP();
-W("This message is send from the server to the client whenever a response to 
an %s is found.",
-  extlink_("#CS_NSQUERY","NSQUERY"));
-W("The format is:");
-EP();
-
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("1028","23");
-rowIntEntry("encrypted data (484 bytes)");
-fiveRowIntEntries("R (routing identifier)");
-rowIntEntryVerbatim(extlink_("doxygen/html/structSignature.html",
-                             "RSA signature (256 octets)"));
-row(shortEntryVerbatim_(extlink_("doxygen/html/structPublicKey.html","Public 
Key") .
-                       " " . W_("length of N + E + 2 (256+2+2 = 260)") . 
NBO_()),
-    shortEntryVerbatim_(W_("Public Key, length of N (256)") . NBO_()));
-rowIntEntry("Public Key, N (256 octets)");
-row(shortEntry_("Public Key, E"),
-    shortEntry_("padding (must be 0)"));
-echo "</table>\n";
-
-BP();
-W("Note that there is currently no corresponding message to delete an 
SBlock.");
-EP();
-
-
-ANCHOR("CS_UPLOAD_FILE"); H4("UPLOAD_FILE");
-
-BP();
-W("This message is used by the client to upload (part of) a file being 
indexed.");
-W("The file is identified by its RIPE160MD hash.");
-W("Each upload message contains a variable number of bytes starting at a 
certain offset.");
-W("<tt>gnunetd</tt> will store the respective block of the file in the 
index-directory.");
-W("Note that the client still must send the indexing requests for the 
individual blocks.");
-W("<tt>gnunetd</tt> signals success or error with a RETURN_VALUE of OK or 
SYSERR.");
+W("The message is used to give <tt>gnunetd</tt> a chance to create a symbolic 
link instead of creating a copy.");
+W("The given filename is the target name on the machine where the client is 
running.");
+W("In other words, the file may not exist on the machine where 
<tt>gnunetd</tt> is running.");
+W("Also, file permissions maybe set such that <tt>gnunetd</tt> cannot access 
the file.");
+W("<tt>gnunetd</tt> must verify that the file is accessible AND that the 
contents match the provided SHA-512 hash.");
+W("<tt>gnunetd</tt> signals success or error with a %s_VALUE of OK or SYSERR.",
+  intlink_("protocol_cs_core.php3","RETURN_VALUE"));
+// FIXME: what does "success" mean? Not always symlinking, right?
 W("The format of the message is:");
-EP();
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("variable, &gt; 28", "24");
-rowIntEntry("position in the file");
-fiveRowIntEntries("Hash code identifying the file");
-rowIntEntry("data (size - 28 bytes)");
-echo "</table>\n";
 
 
-ANCHOR("CS_LINK_FILE"); H4("LINK_FILE");
-BP();
-W("Instead of creating a copy, try to create a symbolic link.");
-W("The given filename is the target name.");
-W("<tt>gnunetd</tt> must verify that the file is accessible AND that the 
contents match the provided RIPE160MD hash.");
-W("<tt>gnunetd</tt> signals success or error with a RETURN_VALUE of OK or 
SYSERR.");
-W("The format of the message is:");
-EP();
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("variable, &gt; 24", "25");
-fiveRowIntEntries("Hash code identifying the file");
-rowIntEntry("0-terminated filename");
-echo "</table>\n";
+LAYOUT("RequestInitIndex",
+       F(ARRAY(N("message size (72+X)", NBO_()) => 2,
+               V("request type", 16, NBO_()) => 2,
+              V("reserved", 0, NBO_())=>4,
+              N("file ID (SHA-512 of the file)", "")=> 64,
+              N("filename", "") => 0)));
 
 
-ANCHOR("CS_GET_AVG_PRIORITY"); H4("GET_AVG_PRIORITY");
-
-BP();
-W("This query is used by the client to determine the current average priority 
of requests from OTHER peers that are in the routing table.");
-W("The server responds with a RETURN_VALUE message containing that average 
priority (or SYSERR on error).");
-W("The format of the message is:");
-EP();
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("4", "26");
-echo "</table>\n";
-
-
 include("html_footer.php3");
 ?>

Modified: GNUnet-docs/WWW/protocol_cs_index.inc
===================================================================
--- GNUnet-docs/WWW/protocol_cs_index.inc       2005-07-13 14:51:18 UTC (rev 
1464)
+++ GNUnet-docs/WWW/protocol_cs_index.inc       2005-07-13 15:21:33 UTC (rev 
1465)
@@ -7,5 +7,5 @@
 <!-- li><?php intlink("protocol_cs_chat.php3","chat"); ?></li -->
 <!-- li><?php intlink("protocol_cs_tbench.php3","tbench"); ?></li -->
 <!-- li><?php intlink("protocol_cs_tracekit.php3","tracekit"); ?></li -->
-<li><?php intlink("protocol_cs_testbed.php3","testbed"); ?></li>
+<!-- li><?php intlink("protocol_cs_testbed.php3","testbed"); ?></li -->
 </ol>

Modified: GNUnet-docs/WWW/protocol_cs_stats.php3
===================================================================
--- GNUnet-docs/WWW/protocol_cs_stats.php3      2005-07-13 14:51:18 UTC (rev 
1464)
+++ GNUnet-docs/WWW/protocol_cs_stats.php3      2005-07-13 15:21:33 UTC (rev 
1465)
@@ -23,7 +23,7 @@
 W("The server always replies with a %s message.",
   extlink_("#CS_STATISTICS","STATISTICS"));
 P();
-W("The format of the GET_STATISTICS message is:");
+W("The format of the message is:");
 EP();
 LAYOUT("CS_HEADER",
        F(ARRAY(V("message size", 4, NBO_()) => 2,
@@ -34,7 +34,7 @@
 BP();
 W("The available statistical information may change between GNUnet versions.");
 W("It also depends on which modules are loaded.");
-W("The format of this message is:");
+W("The format of the message is:");
 EP();
 
 LAYOUT("STATS_CS_MESSAGE",
@@ -54,5 +54,21 @@
 
 
 
+ANCHOR("CS_GET_MESSAGE_SUPPORTED");H4("GET_MESSAGE_SUPPORTED");
+BP();
+W("This message can be used to test if <tt>gnunetd</tt> currently supports a 
certain type of P2P or CS message.");
+W("The <tt>type</tt> specifies which type of message the question is about.");
+W("The <tt>category</tt> specifies if it is about P2P (0: plaintext, 1: 
ciphertext, 2: either) or CS (3) messages.");
+W("<tt>gnunetd</tt> responds with a %s message with the answer YES or NO.",
+  intlink_("protocol_cs_core.php3", "RETURN_VALUE"));
+W("The format of the message is:");
+EP();
+LAYOUT("STATS_CS_MESSAGE",
+       F(ARRAY(V("message size", 8, NBO_()) => 2,
+               V("request type", 38, NBO_()) => 2,
+               N("type", NBO_()) => 2,
+               N("category", NBO_()) => 2)));
+
+
 include("html_footer.php3");
 ?>

Modified: GNUnet-docs/WWW/protocol_cs_traffic.php3
===================================================================
--- GNUnet-docs/WWW/protocol_cs_traffic.php3    2005-07-13 14:51:18 UTC (rev 
1464)
+++ GNUnet-docs/WWW/protocol_cs_traffic.php3    2005-07-13 15:21:33 UTC (rev 
1465)
@@ -10,57 +10,48 @@
   ARRAY("TRAFFIC", "traffic"));
 EP();
 echo "<ul><li>";
-extlink("#CS_TRAFFIC_QUERY","TRAFFIC_QUERY");
+extlink("#CS_TRAFFIC_REQUEST","TRAFFIC_REQUEST");
 echo "</li><li>";
 extlink("#CS_TRAFFIC_INFO","TRAFFIC_INFO");
 echo "</li></ul>";
 
 
-ANCHOR("CS_TRAFFIC_QUERY");H4("TRAFFIC_QUERY");
+ANCHOR("CS_TRAFFIC_REQUEST");H4("TRAFFIC_REQUEST");
 BP();
-W("With this message, the client can request traffic statistics from 
gnunetd.");
+W("With this message, the client can request traffic statistics from 
<tt>gnunetd</tt>.");
 W("The time period specfied in the message specifies which traffic is 
interesting for the request (in terms of not older than time period time 
units).");
-W("The format of the TRAFFIC_QUERY message is:");
-EP();
-
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("4", "2");
-rowIntEntryNBO("time period (in CU)");
-echo "</table>\n";
-BP();
 W("The server responds with a TRAFFIC_INFO message.");
+W("The format of the message is:");
 EP();
+LAYOUT("CS_TRAFFIC_REQUEST",
+       F(ARRAY(V("message size", 8, NBO_()) => 2,
+               V("request type", 33, NBO_()) => 2,
+               N("time interval", NBO_()) => 4)));
 
 
 ANCHOR("CS_TRAFFIC_INFO");H4("TRAFFIC_INFO");
 BP();
 W("With this message, the server sends traffic information to the client.");
-W("The format of the TRAFFIC_INFO message is:");
+W("The format of the message is:");
 EP();
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-rowSizeType("4", "3");
-rowIntEntryNBO("number of traffic counters that follow");
-echo "</table>\n";
-
+LAYOUT("CS_TRAFFIC_INFO",
+       F(ARRAY(N("message size", NBO_()) => 2,
+               V("request type", 34, NBO_()) => 2,
+               N("count", NBO_()) => 4,
+               N("&quot;count&quot; traffic counters") => 0)));
 BP();
 W("The traffic counters have the following format:");
 EP();
 
-echo "<table class=\"border\" border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\">\n";
-include("bittable.inc");
-row(shortEntry_("flags (see TC_ constants)", NBO_()),
-    shortEntry_("number of messages of this type that were processed", 
NBO_()));
-row(shortEntry_("message type", NBO_()),
-    shortEntry_("average message size", NBO_()));
-rowIntEntryNBO("bitmask indicating in which of the last 32 time units a 
message was received");
-echo "</table>\n";
+LAYOUT("TRAFFIC_COUNTER",
+       F(ARRAY(N("flags (see TC_ constants)", NBO_()) => 2,
+               N("message type", NBO_()) => 2,
+               N("number of messages of this type that were processed", 
NBO_()) => 4,
+               N("average message size", NBO_()) => 4,
+               N("bitmask indicating in which of the last 32 time units a 
message was processed", NBO_()) => 4)));
 
 
 
-
-
 include("html_footer.php3");
 ?>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]