X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=net.c;h=2ec3f03e546b3b1f3c038b7eea2e9cf8cf8a3438;hp=92b43065ba4363c9d7ef4099303fd1074ca16f1e;hb=eec23a69402951596dfcd81825c79d355f7bba0c;hpb=748d1368bc96dd7e1af879df1ea41b4d52842f7e diff --git a/net.c b/net.c index 92b43065..2ec3f03e 100644 --- a/net.c +++ b/net.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2012 Andre Noll + * Copyright (C) 2005-2013 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -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) {