0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 08:54:02 +01:00
construct/servlink
2008-04-02 19:37:50 +04:00
..
.cvsignore Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
.indent.pro Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
control.c Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
control.h Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
io.c Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
io.h Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
Makefile.in Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
README Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
servlink.c Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
servlink.h Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00
TODO Reverting some changed related not to moving on libratbox3 but using ratbox3 source! 2008-04-02 19:37:50 +04:00

Servlink protocol documentation.
$Id: README 1285 2006-05-05 15:03:53Z nenolod $
--------------

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 - START_ZIP_IN
	data: no
	description:
		all data not yet read from the slink program will be
		decompressed before reading

004 - 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.

005 - INJECT_SENDQ
	data: sendq

	As above, but sent to remote server without processing.

006 - INIT

007 - ZIPSTATS
	request to send ziplinks statistics reply.

replies

001 - ERROR
	data: u32 len/char error[len]

	fatal error message.

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

	ziplinks commpression statistics