From 2fd8624cc612e946f593b2c9e9031c46f862562e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 27 Apr 2015 11:13:19 -0500 Subject: Some infrastructure hexedit needs. (Poor man's curses.) --- lib/net.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/net.c') 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"); +} -- cgit v1.2.3