aboutsummaryrefslogtreecommitdiff
path: root/lib/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net.c')
-rw-r--r--lib/net.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/net.c b/lib/net.c
index c12eff43..5d3ea4a8 100644
--- a/lib/net.c
+++ b/lib/net.c
@@ -7,3 +7,8 @@ int xsocket(int domain, int type, int protocol)
if (fd < 0) perror_exit("socket %x %x", type, protocol);
return fd;
}
+
+void xsetsockopt(int fd, int level, int opt, void *val, socklen_t len)
+{
+ if (-1 == setsockopt(fd, level, opt, val, len)) perror_exit("setsockopt");
+}