summaryrefslogtreecommitdiff
path: root/src/network/sockatmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/sockatmark.c')
-rw-r--r--src/network/sockatmark.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/network/sockatmark.c b/src/network/sockatmark.c
new file mode 100644
index 00000000..5328a855
--- /dev/null
+++ b/src/network/sockatmark.c
@@ -0,0 +1,11 @@
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include "socketcall.h"
+
+int sockatmark(int s)
+{
+ int ret;
+ if (ioctl(s, SIOCATMARK, &ret) < 0)
+ return -1;
+ return ret;
+}