X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=net.c;h=2ec3f03e546b3b1f3c038b7eea2e9cf8cf8a3438;hp=4d52e4a4e98bd53b3099f7cf8535372a4a270cff;hb=eec23a69402951596dfcd81825c79d355f7bba0c;hpb=9c5fbc5dd8b53604d7e73fb6714ee2b5e3458866 diff --git a/net.c b/net.c index 4d52e4a4..2ec3f03e 100644 --- a/net.c +++ b/net.c @@ -264,6 +264,12 @@ struct flowopts { struct list_head sockopts; }; +/** + * Allocate and initialize a flowopt queue. + * + * \return A new structure to be passed to \ref flowopt_add(). It is + * automatically deallocated in \ref makesock(). + */ struct flowopts *flowopt_new(void) { struct flowopts *new = para_malloc(sizeof(*new)); @@ -305,14 +311,6 @@ void flowopt_add(struct flowopts *fo, int lev, int opt, list_add_tail(&new->node, &fo->sockopts); } -void flowopt_add_bool(struct flowopts *fo, int lev, int opt, - const char *optname, bool on_or_off) -{ - int on = on_or_off; /* kernel takes 'int' */ - - flowopt_add(fo, lev, opt, optname, &on, sizeof(on)); -} - /** Set the entire bunch of pre-connection options at once. */ static void flowopt_setopts(int sockfd, struct flowopts *fo) {