aboutsummaryrefslogtreecommitdiff
path: root/lib/net.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-04-27 11:13:19 -0500
committerRob Landley <rob@landley.net>2015-04-27 11:13:19 -0500
commit2fd8624cc612e946f593b2c9e9031c46f862562e (patch)
treeb8ab47e7f83175f4045e9a40ae27688213a78dbf /lib/net.c
parented753aaa5481e487a23c9e0e6a855c09612eb7ce (diff)
downloadtoybox-2fd8624cc612e946f593b2c9e9031c46f862562e.tar.gz
Some infrastructure hexedit needs. (Poor man's curses.)
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");
+}