LTPlib documentation and test

This page has stuff about the Licklider Transmission Protocol (LTP), which is a delay/disruption tolerant protocol being developed by the IRTF's Delay Tolerant Networking Research Grpup (DTNRG).

LTPlib is my implementation of LTP and a bit more. There's some doxygen stuff and the test pages. (The test pages are password protected for now so that I'm less likely to bring down my own server that way. There's not that much there though, except stuff for other LTP coders and then not much of that yet.)

If you want to take a copy of the very latest source code there's a tarball of the CVS snapshot from the last hour or so, but it mightn't work at all, depending on what I've been doing, so caveat downloader! I'm currently re-integrating the sendt scheduling stuff into the standalone library, not the xml variant yet, but a text file one with a few new wrinkles. Seems to work now.

That version also has the changes needed to interop with Scott Burleigh's ION LTP implementation. Those aren't documented, but there's a new "-I" flag for ltpd that's needed, and, if running in server mode, you need to set "-S <>" with the host:port of the ION sender. (The ION code doesn't include the host:port in the LTP segments and sends from any old port.)

If you care about such things, all this code is under the Mozilla Public License, v1.1. To get going with that use "./bootstrap" for now - I've still to properly fix up the configure script for the various platforms, but bootstrap works ok once you've autoconf etc installed.

Note that the current configuration ( has internal error generation turned off (its for testing purposes), so if you turn that on, things will seem very peculiar.

The main program to run is ltpd which can be a sender or receiver (or an LTP-T router). "ltpd -?" gives about as much info as you'll get (its current output is below). There are client (sender), server (receiver) and, (for LTP-T only) router directories that contain the sample configuration files and test scripts.

I've added some new pretty printing stuff to my logging which may be almost understandable. Here's a log file extract that shows the exchanges during a nominal (no errors) loopback ( session, with cookies and signatures enabled. The file shows the ascii hex dumps of each segment exchanged followed by a pretty(-ish) print version of the same thing. The exchange in question is transferring an ~12Kb block in ~1500 byte segments and LTP was run over UDP. There are of course, no guarantees here as to correctness!

And lastly, in case you somehow got here by accident, here're the current Internet drafts describing LTP and here's a link to Mani's page where you can find his LTP Java code.

"ltpd -?" output

ltpd is the LTP and LTP-T ltp_daemon.
ltpd [-2 l2mtu] [-b buffersize] [-c crypto-cfg] [-d] [-g [fname]] [-i input] [-l log] [-m mode] [-o output] [-r routes-cfg] [-s] [-t LTP-T-cfg] [-v] [-w sleeptime]
		[-A ciphersuite] [-C cookielen] [-D dest[:port]] [-G cookie-grace-period] [-L listener[:port]] [-K keyid] [-S source[:port]] [-R redlen] [-I]
Local parameters:
	[-2 l2mtu] sets the layer 2 maximum transmission unit (packet size) via a sockopt() call (min=500,max=1048576)
	[-b buffersize] specifies the size of receive buffer for the application to allocate (def=65536)
	[-c crypto-cfg] sets the crypto-configuration file name to crypto-cfg [ltpd.crypt]
	[-d] instructs ltpd to sync state information to disk and re-load state on start-up
	[-g [file]] instructs ltpd to act as a file server or to ask the server for a named file. [def: ltpd.fetch]
	[-i input] sets the input file name []
	[-l log] sets the log file name [ltpd.log]
	[-m mode] the operational mode - Client, Server or Router [Client]
	[-o output] sets the output file name(s) [ltpd.out]
	[-r routes-cfg] specifies where LTP-T routing configuration file [ltpt.routes]
	[-s] instructs ltpd to spawn a process to run as a daemon - the 
		initial process exits leaving one behind [false]
	[-t [LTP-T-cfg]] use LTP-T & optionally specify configuration file to use (default: ltpt.cfg)
	[-v] requests verbose output (to stdio) [false]
	[-w [sleeptime]] when operating as a client, instructs ltpd to exit without waiting for the user to hit a character [10]
		  - a value of "b" makes the sending socket block until the session is complete, i.e. "-w b"
Protocol parameters:
	[-A ciphersuite] specifies which LTP-Auth ciphersuite to use ["Off"/0; "MAC"/1, "Signature"/2, "NULL",3 ] default is none
	[-C len] turn on cookies of len bytes (cookies are off by default, same as len=0)
	[-D dest[:port]] sets the destination IP address or DNS name []
	[-G cookie-grace-period] specifies the number of seconds before cookies must be seen in responses [5]
	[-I] forces the stack to use very short numbers, suitable for interoperating with the ION LTP code [false]
	[-K keyid] specifies the key id to use if some LTP Auth stuff is wanted.
	[-L listener[:port]] sets the host IP address and more commonly, port on which to listen as a server
	[-R redlen] sets the red/green length (default:allred=-1;allgreen=0,max=16777216)
	[-S source[:port]] sets the source IP address or DNS name
- The "Router" mode of operation is only meaningful for LTP-T of course.
- Options using uppercase (e.g. D,G,S) relate to protocol parameters, 
  others are local
- Protocol parameters all default to
- See the ltp extension document for ciphersuite descriptions but note that NULL is not "off" its a test mode
- If you set a source (-S) while in server mode (-m S) then all responses will be forced to go to that address:port