2f8dfd1
diff -up ./contrib/doc/cjdns-online.md.man ./contrib/doc/cjdns-online.md
2f8dfd1
--- ./contrib/doc/cjdns-online.md.man	2016-03-08 18:57:49.297123587 -0500
2f8dfd1
+++ ./contrib/doc/cjdns-online.md	2016-03-08 18:56:28.344871576 -0500
2f8dfd1
@@ -0,0 +1,33 @@
2f8dfd1
+cjdns-online(1) -- check whether cjdns tunnel devices are available
2f8dfd1
+=============================================
2f8dfd1
+
2f8dfd1
+## SYNOPSIS
2f8dfd1
+
2f8dfd1
+`cjdns-online` [<options>...]
2f8dfd1
+
2f8dfd1
+## DESCRIPTION
2f8dfd1
+
2f8dfd1
+Cjdns-online waits for cjdns to make its tunnel device available so 
2f8dfd1
+that services that listen on the cjdns IP can start.  If you have
2f8dfd1
+configured services to listen on the cjdns IP, then you can use:
2f8dfd1
+
2f8dfd1
+    systemctl enable cjdns-wait-online
2f8dfd1
+
2f8dfd1
+to wait until this IP is available before starting network services.
2f8dfd1
+This will increase your boot time somewhat, but is needed to launch
2f8dfd1
+thttpd at boot, for example.
2f8dfd1
+
2f8dfd1
+##OPTIONS
2f8dfd1
+
2f8dfd1
+  * `-t`, `--timeout` <timeout_value>:	
2f8dfd1
+    time to wait in seconds, default 30
2f8dfd1
+
2f8dfd1
+  * `-x`, `--exit`:		
2f8dfd1
+    Exit immediately if cjdns is not online
2f8dfd1
+
2f8dfd1
+  * `-q`, `--quiet`:
2f8dfd1
+    Don't print anything
2f8dfd1
+
2f8dfd1
+  * `-s`, `--wait-for-startup`:
2f8dfd1
+    Wait for full startup instead of just tun dev.  This is not implemented.
2f8dfd1
+
2f8dfd1
diff -up ./contrib/doc/cjdroute.md.man ./contrib/doc/cjdroute.md
2f8dfd1
--- ./contrib/doc/cjdroute.md.man	2016-03-08 18:47:02.960143140 -0500
2f8dfd1
+++ ./contrib/doc/cjdroute.md	2016-03-08 18:47:02.960143140 -0500
2f8dfd1
@@ -0,0 +1,76 @@
2f8dfd1
+cjdroute(1) -- Cjdns packet switch
2f8dfd1
+=============================================
2f8dfd1
+
2f8dfd1
+## SYNOPSIS
2f8dfd1
+
2f8dfd1
+`/usr/sbin/cjdroute` [<options>...]
2f8dfd1
+
2f8dfd1
+## DESCRIPTION
2f8dfd1
+
2f8dfd1
+Cjdns implements an encrypted IPv6 network using public-key cryptography for
2f8dfd1
+address allocation and a distributed hash table for routing. This provides
2f8dfd1
+near-zero-configuration networking, and prevents many of the security and
2f8dfd1
+scalability issues that plague existing networks.
2f8dfd1
+
2f8dfd1
+cjdroute runs in the background and either decrypts packets addressed to
2f8dfd1
+this node, or sends them on to the next node in the route.
2f8dfd1
+
2f8dfd1
+##OPTIONS
2f8dfd1
+
2f8dfd1
+  * `--help`:
2f8dfd1
+    Print usage summary.
2f8dfd1
+
2f8dfd1
+  * `--genconf` [--no-eth]:
2f8dfd1
+    Generate a configuration file, write it to stdout.
2f8dfd1
+    If --no-eth is specified then ethernet beaconing will be disabled.
2f8dfd1
+
2f8dfd1
+  * `--bench`:
2f8dfd1
+    Run some cryptography performance benchmarks.
2f8dfd1
+
2f8dfd1
+  * `--version`:             
2f8dfd1
+    Print cjdroute version and the protocol version which this node speaks.
2f8dfd1
+
2f8dfd1
+  * `--cleanconf` < conf:
2f8dfd1
+    Print a clean (valid json) version of the config.
2f8dfd1
+
2f8dfd1
+  * `--nobg`                
2f8dfd1
+    Never fork to the background no matter the config.
2f8dfd1
+
2f8dfd1
+##USAGE
2f8dfd1
+
2f8dfd1
+To get the router up and running:
2f8dfd1
+
2f8dfd1
+  * Step 1:
2f8dfd1
+    Generate a new configuration file if one doesn't already exist.
2f8dfd1
+
2f8dfd1
+      cjdroute --genconf > /etc/cjdroute.conf
2f8dfd1
+
2f8dfd1
+    You can also simply:
2f8dfd1
+
2f8dfd1
+      systemctl start cjdns
2f8dfd1
+
2f8dfd1
+    which will tell cjdroute to generate a new config if needed.
2f8dfd1
+
2f8dfd1
+  * Step 2:
2f8dfd1
+    Find somebody to connect to.
2f8dfd1
+    Check out the IRC channel or http://hyperboria.net/
2f8dfd1
+    for information about how to meet new people and make connect to them.
2f8dfd1
+    Read more here: https://github.com/cjdelisle/cjdns/#2-find-a-friend
2f8dfd1
+
2f8dfd1
+    By default, cjdroute will find any cjdns nodes on your local LAN
2f8dfd1
+    without any configuration.
2f8dfd1
+
2f8dfd1
+  * Step 3:
2f8dfd1
+    Add that somebody's node to your cjdroute.conf file.
2f8dfd1
+    https://github.com/cjdelisle/cjdns/#3-connect-your-node-to-your-friends-node
2f8dfd1
+
2f8dfd1
+  * Step 4:
2f8dfd1
+    Fire it up!
2f8dfd1
+
2f8dfd1
+      systemctl start cjdns
2f8dfd1
+
2f8dfd1
+    Or if you had already started cjdns:
2f8dfd1
+
2f8dfd1
+      systemctl restart cjdns
2f8dfd1
+
2f8dfd1
+For more information about other functions and non-standard setups, see README.md
2f8dfd1
diff -up ./contrib/doc/makekeys.md.man ./contrib/doc/makekeys.md
2f8dfd1
--- ./contrib/doc/makekeys.md.man	2016-03-08 18:47:02.960143140 -0500
2f8dfd1
+++ ./contrib/doc/makekeys.md	2016-03-08 18:47:02.960143140 -0500
2f8dfd1
@@ -0,0 +1,18 @@
2f8dfd1
+makekeys(1) -- write cjdns keys generated via libnacl to stdout
2f8dfd1
+=============================================
2f8dfd1
+
2f8dfd1
+## SYNOPSIS
2f8dfd1
+
2f8dfd1
+`makekeys`
2f8dfd1
+
2f8dfd1
+## DESCRIPTION
2f8dfd1
+
2f8dfd1
+Generates cjdns private keys and writes them to stdout forever with
2f8dfd1
+corresponding IP6 address and public key.  Sample:
2f8dfd1
+
2f8dfd1
+    9b5520e11b4e1aac4e54cf8382ca219b6942f75519dbe7cc71fc6c4bb636a2db fca1:43dc:9e20:68dc:df3f:6bf1:fbf9:37ab x70u0x6sfh0yuushlq7wvcdxj8rgb8lvss9t6f42zp60ftq71cm0.k
2f8dfd1
+    579db68cfdeaeda1ff7f365c73e620bedb0f68cb443a0cd7ef6bae16d0e1e12e fc68:b272:3aa3:cb4a:a686:dab0:7df5:2fb5 fmurp2qrb0yqmcjmbjtuhuxuf6v3rgmdn9hgsfh47k20h68y2lz0.k
2f8dfd1
+
2f8dfd1
+## SEE ALSO
2f8dfd1
+
2f8dfd1
+publictoip6(1)
2f8dfd1
diff -up ./contrib/doc/privatetopublic.md.man ./contrib/doc/privatetopublic.md
2f8dfd1
--- ./contrib/doc/privatetopublic.md.man	2016-03-08 18:47:02.961143168 -0500
2f8dfd1
+++ ./contrib/doc/privatetopublic.md	2016-03-08 22:34:30.532757463 -0500
2f8dfd1
@@ -0,0 +1,25 @@
2f8dfd1
+privatetopublic(8) -- convert cjdns private keys to public keys and IP6
2f8dfd1
+=============================================
2f8dfd1
+
2f8dfd1
+## SYNOPSIS
2f8dfd1
+
2f8dfd1
+`/usr/libexec/cjdns/privatetopublic`
2f8dfd1
+
2f8dfd1
+## DESCRIPTION
2f8dfd1
+
2f8dfd1
+As private keys are very sensitive, /usr/libexec/cjdns/privatetopublic reads
2f8dfd1
+them from stdin.  If your shell, terminal, or other program keeps history,
2f8dfd1
+please avoid `echo 'key' | /usr/libexec/cjdns/privatetopublic`, or similar
2f8dfd1
+constructs.  A heredoc is suitable for use in scripts, and will avoid
2f8dfd1
+unwanted revealing of the key in process lists, like so:
2f8dfd1
+
2f8dfd1
+    /usr/libexec/cjdns/privatetopublic <
2f8dfd1
+    key
2f8dfd1
+    EOF
2f8dfd1
+
2f8dfd1
+Key should be in hex form, maximum 64 characters.  Extra characters will be
2f8dfd1
+silently ignored.
2f8dfd1
+
2f8dfd1
+## SEE ALSO
2f8dfd1
+
2f8dfd1
+publictoip6(1)
2f8dfd1
diff -up ./contrib/doc/publictoip6.md.man ./contrib/doc/publictoip6.md
2f8dfd1
--- ./contrib/doc/publictoip6.md.man	2016-03-08 18:47:02.961143168 -0500
2f8dfd1
+++ ./contrib/doc/publictoip6.md	2016-03-08 18:47:02.961143168 -0500
2f8dfd1
@@ -0,0 +1,14 @@
2f8dfd1
+publictoip6(1) -- write random bytes generated via libnacl to stdout
2f8dfd1
+=============================================
2f8dfd1
+
2f8dfd1
+## SYNOPSIS
2f8dfd1
+
2f8dfd1
+`publictoip6` <public key>
2f8dfd1
+
2f8dfd1
+## DESCRIPTION
2f8dfd1
+Get a cjdns IPv6 address from a public key and write to stdout.
2f8dfd1
+The key should be in Base32 and end in '.k'.
2f8dfd1
+
2f8dfd1
+## SEE ALSO
2f8dfd1
+
2f8dfd1
+randombytes(1)
2f8dfd1
diff -up ./contrib/doc/randombytes.md.man ./contrib/doc/randombytes.md
2f8dfd1
--- ./contrib/doc/randombytes.md.man	2016-03-08 18:47:02.961143168 -0500
2f8dfd1
+++ ./contrib/doc/randombytes.md	2016-03-08 18:47:02.961143168 -0500
2f8dfd1
@@ -0,0 +1,16 @@
2f8dfd1
+randombytes(1) -- write random bytes generated via libnacl to stdout
2f8dfd1
+=============================================
2f8dfd1
+
2f8dfd1
+## SYNOPSIS
2f8dfd1
+
2f8dfd1
+`randombytes`
2f8dfd1
+
2f8dfd1
+## DESCRIPTION
2f8dfd1
+
2f8dfd1
+Writes random bytes to stdout forever using the cryptographically secure
2f8dfd1
+random generator in libnacl.  In practice, the output is piped
2f8dfd1
+to a program like dd(1) or base64(1).
2f8dfd1
+
2f8dfd1
+## SEE ALSO
2f8dfd1
+
2f8dfd1
+makekeys(1)
2f8dfd1
diff -up ./contrib/doc/sybilsim.md.man ./contrib/doc/sybilsim.md
2f8dfd1
--- ./contrib/doc/sybilsim.md.man	2016-03-08 18:47:02.962143196 -0500
2f8dfd1
+++ ./contrib/doc/sybilsim.md	2016-03-08 18:47:02.962143196 -0500
2f8dfd1
@@ -0,0 +1,43 @@
2f8dfd1
+sybilsim(8) -- Cjdns packet switch
2f8dfd1
+=============================================
2f8dfd1
+
2f8dfd1
+## SYNOPSIS
2f8dfd1
+
2f8dfd1
+`/usr/libexec/cjdns/sybilsim < config.json`
2f8dfd1
+
2f8dfd1
+## DESCRIPTION
2f8dfd1
+
2f8dfd1
+Sybilsim reads a list of nodes and peers from stdin and simulates the
2f8dfd1
+corresponding mesh without any actual networking using the same code
2f8dfd1
+as cjdroute.  This is useful for testing and optimizing cjdroute.
2f8dfd1
+Every node must have a valid cjdns private key. The makekeys(1) utility can be
2f8dfd1
+useful for scripts that generate the config.  
2f8dfd1
+
2f8dfd1
+##USAGE
2f8dfd1
+
2f8dfd1
+Example config:
2f8dfd1
+
2f8dfd1
+    {
2f8dfd1
+      "nodes": {
2f8dfd1
+	"alice": {
2f8dfd1
+	  "privateKey":
2f8dfd1
+	    "5e2295679394e5e1db67c238abbc10292ad9b127904394c52cc5fff39383e920",
2f8dfd1
+	  "peers": []
2f8dfd1
+	},
2f8dfd1
+	"bob": {
2f8dfd1
+	  "privateKey":
2f8dfd1
+	    "6569bf3f0d168faa6dfb2912f8ee5ee9b938319e97618fdf06caed73b1aad1cc",
2f8dfd1
+	  "peers": [ "alice" ]
2f8dfd1
+	}
2f8dfd1
+      }
2f8dfd1
+    }
2f8dfd1
+
2f8dfd1
+Example use:
2f8dfd1
+
2f8dfd1
+    makekeys | head -20 >keys.txt
2f8dfd1
+    node /usr/libexec/cjdns/tools/lib/makesim.js keys.txt |
2f8dfd1
+    /usr/libexec/cjdns/sybilsim
2f8dfd1
+
2f8dfd1
+## SEE ALSO
2f8dfd1
+
2f8dfd1
+makekeys(1), cjdroute(1)