Updated the Readme.txt file, completing several sections that were missing.
authorcrh <crh@ubiqx.org>
Wed, 13 Jun 2012 02:44:48 +0000 (21:44 -0500)
committercrh <crh@ubiqx.org>
Wed, 13 Jun 2012 02:44:48 +0000 (21:44 -0500)
 * Minor change to the wording in preqeld.conf.

src/daemon/PD_peerdist1.c
src/daemon/PD_peerdist1.h
src/daemon/PD_read_config.c
src/daemon/PD_read_config.h
src/daemon/PD_sha2_oSSL.c
src/daemon/PD_sha2_oSSL.h
src/daemon/PD_utils.c
src/daemon/PD_utils.h
src/daemon/Readme.txt
src/daemon/prequeld.conf

index 34a956b048c2862a1f0bae94a9ea36df86a50b58..440134a5d048b0669a60359bc975f8c0793e834d 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Email: crh@ubiqx.mn.org
  *
- * $Id: PD_peerdist1.c 2012-06-12 21:40:25 -0500 crh$
+ * $Id: PD_peerdist1.c 2012-06-12 21:44:48 -0500 crh$
  *
  * -------------------------------------------------------------------------- **
  *
index c387bc3ea81c2130422a164add2f18892930515f..a0384ab356301d3860fbd89e47a085f4aa56ee29 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Email: crh@ubiqx.mn.org
  *
- * $Id: PD_peerdist1.h 2012-06-12 21:40:25 -0500 crh$
+ * $Id: PD_peerdist1.h 2012-06-12 21:44:48 -0500 crh$
  *
  * -------------------------------------------------------------------------- **
  *
index 3302710cce0d84124aae6cf0f84462f9b2e8849a..212d1e8bfeb1c11dd785d252560f0d5533af3431 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Email: crh@ubiqx.mn.org
  *
- * $Id: PD_read_config.c 2012-06-12 21:40:25 -0500 crh$
+ * $Id: PD_read_config.c 2012-06-12 21:44:48 -0500 crh$
  *
  * -------------------------------------------------------------------------- **
  *
index 318fbd321ad1f0e38335a8705eb6bb2cf60c28da..b561dd62abf692e28f6a0ff5bf001d67d5c4c5c2 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Email: crh@ubiqx.mn.org
  *
- * $Id: PD_read_config.h 2012-06-12 21:40:25 -0500 crh$
+ * $Id: PD_read_config.h 2012-06-12 21:44:48 -0500 crh$
  *
  * -------------------------------------------------------------------------- **
  *
index dc3a20d48d031d3b02cb8e64f9b04cd872696f3e..72450fb09297321b50554a10be22d298f8733290 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Email: crh@ubiqx.mn.org
  *
- * $Id: PD_sha2_oSSL.c 2012-06-12 21:40:25 -0500 crh$
+ * $Id: PD_sha2_oSSL.c 2012-06-12 21:44:48 -0500 crh$
  *
  * -------------------------------------------------------------------------- **
  *
index ab630659334c04ef5cab3258613caf9f5d7a69d5..09ff20e8f30e92422642769fbd444ac5bf6babff 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Email: crh@ubiqx.mn.org
  *
- * $Id: PD_sha2_oSSL.h 2012-06-12 21:40:25 -0500 crh$
+ * $Id: PD_sha2_oSSL.h 2012-06-12 21:44:48 -0500 crh$
  *
  * -------------------------------------------------------------------------- **
  *
index 28c576b83f61d9688463869161cbdcfa36a5f91a..c7b55f2e40715ce821ee257170b96d6582326eda 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Email: crh@ubiqx.mn.org
  *
- * $Id: PD_utils.c 2012-06-12 21:40:25 -0500 crh$
+ * $Id: PD_utils.c 2012-06-12 21:44:48 -0500 crh$
  *
  * -------------------------------------------------------------------------- **
  *
index 9d429fd8038de37876bb86b1afdca21844ee244f..b94fa213b424a0dd44999a6e1baa22754f5cef0a 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Email: crh@ubiqx.mn.org
  *
- * $Id: PD_utils.h 2012-06-12 21:40:25 -0500 crh$
+ * $Id: PD_utils.h 2012-06-12 21:44:48 -0500 crh$
  *
  * -------------------------------------------------------------------------- **
  *
index e5d2ccb06bdb5ff265f01e68e2c27e0da25cf4bc..890c8dce9a2416cfb3f7cb4bcd6528902e881c8e 100644 (file)
@@ -2,6 +2,7 @@ PrequelD
 
  Author:  Christopher R. Hertel
 License:  GNU GPL version 3 or above
+          Some modules released under the LGPL v3.0 or above.
 
 Acknowledgements:
  This code was developed in participation with the Protocol Freedom
@@ -13,14 +14,13 @@ PrequelD is the Prequel PeerDist Daemon.
 
   PeerDist
     is a distributed content caching system that Microsoft threw together
-    for Windows 7 and Windows 2008r2.  The commercial name for the
-    distributed caching system is "BranchCache", but if you get into the
-    guts of their documentation they refer to the underlying protocols as
-    PeerDist.
+    for Windows 7 and Windows 2008r2.  The commercial name for the system is
+    "BranchCache", but if you get into the guts of their documentation they
+    refer to the underlying protocols as PeerDist.
 
   Prequel
-    is an Open Source project dedicated to implementing PeerDist protocols
-    for Linux (and, eventually, *BSD and other Unix-like systems).
+    is an Open Source project aimed at implementing PeerDist protocols for
+    Linux (and, eventually, *BSD and other Unix-like systems).
 
 Overview
 
@@ -35,13 +35,12 @@ Overview
 Compiling
 
   Current Requirements:
-    * Linux 2.6 and 3.0 based system (see below for other platforms)
+    * Linux 2.6 or above (see below for other platforms)
     * OpenSSL (again, see the notes below)
 
-  The initial release of PrequelD was written for and tested on Linux.
-  It should compile and run on most 2.6/3.0 kernel systems.  It has been
-  tested on 32-bit Linux for ARM (Arch Linux), and both 32-bit and 64-bit
-  x86 platforms.
+  The initial release of PrequelD was written for and tested on Linux.  It
+  should compile and run on most 2.6+ kernel systems.  It has been tested on
+  32-bit Linux for ARM (Arch Linux), and both 32-bit and 64-bit x86 platforms.
 
   The plan is to port PrequelD to OpenBSD, with the goal of making it work
   nicely on FreeBSD and NetBSD as well.
@@ -50,11 +49,23 @@ Compiling
   shown below.  The only external requirement is OpenSSL, but the code is
   written to make it easy to replace OpenSSL with another hashing library.
 
-  cc FIX FIX FIX:
+  cc -I.. -o PrequelD PrequelD.c Gstr.c PD_peerdist1.c PD_read_config.c \
+     PD_sha2_oSSL.c PD_utils.c ../ubi_sLinkList.c -lcrypto -lpthread
 
-  DEFAULT_CONFIG_FILE
-  DEFAULT_SOCK_FILE
-  DEFAULT_KEY_FILE
+  You can also add command-line definitions for the following constants:
+
+  * DEFAULT_CONFIG_FILE
+    Defaults to: /etc/prequeld/pd.conf
+
+  * DEFAULT_SOCK_FILE
+    Defaults to: /var/run/prequeld.sock
+
+  * DEFAULT_KEY_FILE
+    Defaults to: /etc/prequeld/pd.key
+
+  The above are all default values that are compiled into the program. An
+  alternate configuration file can be specified on the command-line, and the
+  socket and key file pathnames can be changed in the configuration file.
 
 Configuration File Syntax and Semantics
 
@@ -92,8 +103,8 @@ Configuration File Syntax and Semantics
     the sourcedir.
 
   * You can also put key/value pairs within a cachedir block, but remember
-    that they only apply to sourcedir entries that appear later in the same
-    block.
+    that they only apply to sourcedir entries that appear *later* in the
+    same block.
 
   * Comments are introduced using a hash character ('#') and continue to the
     end of the line.  Whitespace is anything recognized as such by the
@@ -188,7 +199,12 @@ Client Command Syntax and Semantics
   PrequelD socket file (a "unix domain socket") and sending a request.
 
   Request format:
-    "Gimme " pathname '\n' [ "Range " start '-' end '\n'] '\n'
+    message   :== gimme [range] [peerdist] '\n'
+    gimme     :== "Gimme " pathname '\n'
+    range     :== "Range: " start '-' end '\n'
+    peerdist  :== "Peerdist: " major '.' minor '\n'
+
+    ...where start, end, major, and minor are all strings of numeric digits.
 
     Yes, the command being sent is "Gimme".  It must be followed by a space
     and a pathname.  The pathname identifies the original (source) file,
@@ -200,9 +216,14 @@ Client Command Syntax and Semantics
     original file that is being requested.  The hash segments returned will
     cover at least the requested range.
 
+    The optional "Peerdist: " clause is used to specify the version of
+    PeerDist that the client is requesting.  If this clause is ommitted, the
+    server will return Content Information using the lowest available
+    version format.
+
     Whitespace (particularly spaces and oddities such as carriage returns
-    ('\r')) are ignored.  Other control characters will cause an error to
-    be returned.
+    ('\r')) are ignored.  Control characters are also handled as whitespace.
+    PrequelD tries to be forgiving.
 
   Responses:
     Responses come in two forms:  Negative and positive.
@@ -222,17 +243,17 @@ Client Command Syntax and Semantics
                 have been requested, but not yet hashed.  These files
                 get priority treatment.
 
-      "Error" - An internal error caused PrequelD to fail the request.
-                Sorry.  Error messages are always logged.
+      "Error" - An internal error caused PrequelD to fail the request,
+                sorry.  Error messages are always logged.
 
     A positive response looks more like this:
-      "Size " bytecount '\n' raw_bytes
+      "Size: " bytecount '\n' '\n' raw_bytes
 
     That is, the keyword "Size", followed by a space, followed by the number
     of bytes (given as a text string) that follow.  The response line is
-    terminated by a newline ('\n').  The raw_bytes are the requested
-    PeerDist Content Information.  See [MS-PCCRC] for a definition of the
-    format.
+    terminated by a newline ('\n') and the response header is terminated by
+    a blank line.  The raw_bytes are the requested PeerDist Content
+    Information.  See [MS-PCCRC] for a definition of the format.
 
 ToDo:
 
index a60562675b71d370bf9d2b7e4e2f13f83128d1d1..83a94a7e94e4e80376376053ef46f29a32bd90d4 100644 (file)
@@ -94,7 +94,7 @@ cachedir /var/prequel
   sourcedir /data/music
     {
     # My wife likes Queen a whole lot more than I do, so I'll be obnoxious and
-    # not cache those music files (for example purposes only).
+    # not cache those files (for example purposes only).
     #
     verbosity 0;
     exclude /src, /Album-Covers, /Queen/*;