After negotiating an incoming/outgoing server connection, the ircd will
fork, then execve servlink, with fd 0 as one end of a control pipe and
fd 1 as one end of a data pipe. fd 2 will be the socket connected to
the remote server.

The data pipe is used by the ircd to send/receive normal, decrypted,
uncompressed IRC commands to/from the remote server.  The socket is used to
send the (processed) data to the remote server, and receive the data from
the remote server.

The control pipe is used to activate encryption/compression and to set the
encryption key/algorithm to be used.

Format of control messages:

<u8 command><optional data>

data format:
<u16 len><data>

Commands:

001 - SET_ZIP_OUT_LEVEL
	data: yes
	description:
		set compression level (0 [use default, 6], or 1-9)

002 - START_ZIP_OUT
	data: no
	description:
		all data written to the data pipe will be compressed
		prior to being sent to the remote server.

003 - END_ZIP_OUT - unimplemented
	data: no
	description:
		any compressed data will be flushed
		all data written will no longer be compressed
		
004 - START_ZIP_IN
	data: no
	description:
		all data not yet read from the slink program will be
		decompressed before reading

005 - END_ZIP_IN - unimplemented
	data: no
	description:
		data read will no longer be decompressed

006 - SET_CRYPT_IN_CIPHER
	data: <u8 cipher id>

	001 - BLOWFISH
	002 -     CAST
	003 -      DES
	004 -     3DES
	005 -     IDEA
	006 -      RC5 ( 8 rounds)
	007 -      RC5 (12 rounds)
	008 -      RC5 (16 rounds)

	cannot be called whilst decryption is active.

007 - SET_CRYPT_IN_KEY
	data: <key>

	cannot be called whilst decryption is active.
	
008 - START_CRYPT_IN

009 - END_CRYPT_IN - unimplemented

010 - SET_CRYPT_OUT_CIPHER
	data: <u8 cipher id>

        001 - BLOWFISH
        002 -     CAST
        003 -      DES
        004 -     3DES
        005 -     IDEA
        006 -      RC5 ( 8 rounds)
        007 -      RC5 (12 rounds)
        008 -      RC5 (16 rounds)

	cannot be called whilst encryption is active.

011 - SET_CRYPT_OUT_KEY
	data: <key>

	cannot be called whilst encryption is active.

012 - START_CRYPT_OUT

013 - END_CRYPT_OUT - unimplemented

014 - INJECT_RECVQ
	data: recvq

	Used before INIT to inject any data read from the server fd which
	should be pre-processed by servlink before being sent back
	to the LOCAL_FD through the data fd.

015 - INJECT_SENDQ
	data: sendq

	As above, but sent to remote server without processing.

016 - INIT

017 - ZIPSTATS
	data: u32 in/u32 in_wire/u32 out/u32 out_wire

	ziplinks statistics.
