]> git.tuebingen.mpg.de Git - paraslash.git/commit
07_flow-opt-support.diff
authorGerrit Renker <grenker@cscs.ch>
Thu, 25 Feb 2010 16:05:45 +0000 (17:05 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 25 Feb 2010 16:05:45 +0000 (17:05 +0100)
commited0c68b07ddbc130e033035baa1cc0862e511b46
tree1a9277908efc2122b9b574a7652c7f8170a6a1da
parent85d8b1b48ef832eaf485709f38cb443e5ecfbb7b
07_flow-opt-support.diff

In order to support a class of socket options which have to be set
before commiting a socket to a connection, this patch adds an API
for "pre-connection" socket options, called "flowopts" here.

The API is used as follows:
 * to provide queue storage, a new head is allocated using flowopt_new();
 * this queue is then populated with pre-connection socket options via
   - generic 'add' method flowopt_add(),
   - a specific variant for adding Boolean options - flowopt_add_bool(),
   - convenience macros - OPT_ADD(), OPT_ENABLE(), OPT_DISABLE();
 * the rest is then dealt with automatically by makesock():
   - any provided flowopts are set before making the connection,
   - due to using a queue, the order of invocation is preserved,
   - after making the connection, makesock() frees storage that has been
     previously allocated by flowopt_new() and flowopt_add.*().
client_common.c
dccp_recv.c
http_recv.c
net.c
net.h
udp_recv.c
udp_send.c