]> git.tuebingen.mpg.de Git - paraslash.git/commit
Add sideband implementation.
authorAndre Noll <maan@systemlinux.org>
Sun, 18 Dec 2011 19:18:49 +0000 (20:18 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 5 May 2012 10:54:53 +0000 (12:54 +0200)
commit2830b9f881898aaec073d5ba19e33482e30190bd
tree1d0ead23afa9195434aae4be6545d7703feb8032
parente151dbb79eac16326585ec0a33cf48029f5f22f4
Add sideband implementation.

This adds the new source files sideband.[ch] to the repository and
links the corresponding object file into para_server, para_audiod
and para_client.

The sideband API enables the command handlers of para_server to send a
multiplexed output stream. The client side (para_client or para_audiod)
demultiplex the received stream afterwards.

The design is as simple as it can be: Each data buffer is preceded
by a 5-byte header containing the length and the band designator,
a one-byte number which specifies the type of the data which follows.

The server-side and the client-side implement their own variant of the
send_sb() and recv_sb() functions for sending and receiving sideband
packets. Two implementations are necessary because the underlying
file descriptor is blocking on the server side (command handlers of
para_server) while it is non-blocking on the client side (para_client
and para_audiod).

The sideband API allows to optionally filter all data (including the
sideband header) through an arbitrary transformation. This patch adds
a suitable transformation as a new public function performs RC4 to
the crypto API.

To keep the patch within reasonable size, this commit does not contain
any users of the new sideband API yet. Subsequent commits will teach
the authentication handshake code and the command handlers to send
and receive data as sideband packets.
19 files changed:
afs.c
afs.cmd
aft.c
attribute.c
blob.c
client_common.c
command.c
command.h
configure.ac
crypt.c
crypt.h
crypt_common.c
error.h
gcc-compat.h
gcrypt.c
para.h
server.cmd
sideband.c [new file with mode: 0644]
sideband.h [new file with mode: 0644]