summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-04 10:23:49 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-06-04 10:23:49 +0200
commit829456efb34ab796f7aa743fa7f37a5ecd8b3455 (patch)
treed7b8ad70c4f2615ce6ef912abd75af4a45b715de
parent78a23a4d5ab27c8af26c0e232c099a0c16907649 (diff)
xio: rename xio to ioops and reduce its includes
Rename xio to ioops (io-ops) and boil its include files down to a minimum. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r--astraceroute.c2
-rw-r--r--astraceroute/Makefile2
-rw-r--r--ct_client.c2
-rw-r--r--ct_server.c2
-rw-r--r--ct_usermgmt.c2
-rw-r--r--curve.c2
-rw-r--r--curve.h2
-rw-r--r--curvetun.c2
-rw-r--r--curvetun/Makefile2
-rw-r--r--flowtop.c2
-rw-r--r--flowtop/Makefile2
-rw-r--r--geoip.c2
-rw-r--r--ifpps.c2
-rw-r--r--ifpps/Makefile2
-rw-r--r--ioops.c (renamed from xio.c)17
-rw-r--r--ioops.h (renamed from xio.h)6
-rw-r--r--netsniff-ng.c2
-rw-r--r--netsniff-ng/Makefile2
-rw-r--r--pcap_io.h2
-rw-r--r--pcap_mm.c2
-rw-r--r--pcap_rw.c2
-rw-r--r--pcap_sg.c2
-rw-r--r--trafgen.c2
-rw-r--r--trafgen/Makefile2
24 files changed, 27 insertions, 40 deletions
diff --git a/astraceroute.c b/astraceroute.c
index d526bfa..c0f317f 100644
--- a/astraceroute.c
+++ b/astraceroute.c
@@ -37,7 +37,7 @@
#include "pkt_buff.h"
#include "proto.h"
#include "xmalloc.h"
-#include "xio.h"
+#include "ioops.h"
#include "csum.h"
#include "geoip.h"
#include "xutils.h"
diff --git a/astraceroute/Makefile b/astraceroute/Makefile
index 4cf9a3e..82e5b5b 100644
--- a/astraceroute/Makefile
+++ b/astraceroute/Makefile
@@ -3,7 +3,7 @@ astraceroute-libs = -lGeoIP \
-lz
astraceroute-objs = xmalloc.o \
- xio.o \
+ ioops.o \
xutils.o \
proto_none.o \
tprintf.o \
diff --git a/ct_client.c b/ct_client.c
index 9ca72df..1b3057b 100644
--- a/ct_client.c
+++ b/ct_client.c
@@ -28,7 +28,7 @@
#include "built_in.h"
#include "die.h"
#include "str.h"
-#include "xio.h"
+#include "ioops.h"
#include "xutils.h"
#include "curve.h"
#include "xmalloc.h"
diff --git a/ct_server.c b/ct_server.c
index 8aed17f..565eb1f 100644
--- a/ct_server.c
+++ b/ct_server.c
@@ -30,7 +30,7 @@
#include "die.h"
#include "xutils.h"
-#include "xio.h"
+#include "ioops.h"
#include "xmalloc.h"
#include "curvetun.h"
#include "curve.h"
diff --git a/ct_usermgmt.c b/ct_usermgmt.c
index e21675f..2642986 100644
--- a/ct_usermgmt.c
+++ b/ct_usermgmt.c
@@ -19,7 +19,7 @@
#include "locking.h"
#include "xmalloc.h"
#include "ioexact.h"
-#include "xio.h"
+#include "ioops.h"
#include "str.h"
#include "curvetun.h"
#include "xutils.h"
diff --git a/curve.c b/curve.c
index 2b390b1..243e833 100644
--- a/curve.c
+++ b/curve.c
@@ -20,7 +20,7 @@
#include "xmalloc.h"
#include "curve.h"
#include "xutils.h"
-#include "xio.h"
+#include "ioops.h"
#include "rnd.h"
#include "die.h"
#include "str.h"
diff --git a/curve.h b/curve.h
index 8750b70..b7aebcb 100644
--- a/curve.h
+++ b/curve.h
@@ -12,7 +12,7 @@
#include "locking.h"
#include "built_in.h"
-#include "xio.h"
+#include "ioops.h"
#include "rnd.h"
#include "crypto_box_curve25519xsalsa20poly1305.h"
diff --git a/curvetun.c b/curvetun.c
index d5b95e4..0e7bb83 100644
--- a/curvetun.c
+++ b/curvetun.c
@@ -35,7 +35,7 @@
#include "curve.h"
#include "ct_usermgmt.h"
#include "ct_servmgmt.h"
-#include "xio.h"
+#include "ioops.h"
#include "tprintf.h"
#include "crypto_verify_32.h"
#include "crypto_box_curve25519xsalsa20poly1305.h"
diff --git a/curvetun/Makefile b/curvetun/Makefile
index 3d60064..289aa72 100644
--- a/curvetun/Makefile
+++ b/curvetun/Makefile
@@ -2,7 +2,6 @@ curvetun-libs = -lnacl \
-lpthread
curvetun-objs = xmalloc.o \
- xio.o \
xutils.o \
str.o \
stun.o \
@@ -14,6 +13,7 @@ curvetun-objs = xmalloc.o \
curve.o \
cookie.o \
ioexact.o \
+ ioops.o \
cpusched.o \
ct_usermgmt.o \
ct_servmgmt.o \
diff --git a/flowtop.c b/flowtop.c
index 4703dc8..2319a68 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -29,7 +29,7 @@
#include "die.h"
#include "xmalloc.h"
-#include "xio.h"
+#include "ioops.h"
#include "str.h"
#include "geoip.h"
#include "xutils.h"
diff --git a/flowtop/Makefile b/flowtop/Makefile
index 2446832..915301f 100644
--- a/flowtop/Makefile
+++ b/flowtop/Makefile
@@ -6,7 +6,7 @@ flowtop-libs = -lGeoIP \
-lz
flowtop-objs = xmalloc.o \
- xio.o \
+ ioops.o \
xutils.o \
oui.o \
str.o \
diff --git a/geoip.c b/geoip.c
index 85c425c..bef35fb 100644
--- a/geoip.c
+++ b/geoip.c
@@ -19,7 +19,7 @@
#include "built_in.h"
#include "die.h"
#include "xutils.h"
-#include "xio.h"
+#include "ioops.h"
#include "str.h"
#include "xmalloc.h"
#include "zlib.h"
diff --git a/ifpps.c b/ifpps.c
index d3e4fa2..e835660 100644
--- a/ifpps.c
+++ b/ifpps.c
@@ -20,7 +20,7 @@
#include "die.h"
#include "xmalloc.h"
#include "xutils.h"
-#include "xio.h"
+#include "ioops.h"
#include "cpus.h"
#include "built_in.h"
diff --git a/ifpps/Makefile b/ifpps/Makefile
index ef26a71..8b055b4 100644
--- a/ifpps/Makefile
+++ b/ifpps/Makefile
@@ -1,7 +1,7 @@
ifpps-libs = $(shell pkg-config --libs ncurses)
ifpps-objs = xmalloc.o \
- xio.o \
+ ioops.o \
xutils.o \
str.o \
ifpps.o
diff --git a/xio.c b/ioops.c
index be9d4cc..1bcb2d7 100644
--- a/xio.c
+++ b/ioops.c
@@ -1,28 +1,15 @@
-/*
- * netsniff-ng - the packet sniffing beast
- * Copyright 2009, 2010 Daniel Borkmann.
- * Subject to the GPL, version 2.
- */
-
#define _GNU_SOURCE
-#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <syslog.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <fcntl.h>
#include <linux/if.h>
#include <linux/if_tun.h>
#include "die.h"
-#include "xio.h"
+#include "ioops.h"
#include "str.h"
#include "xutils.h"
diff --git a/xio.h b/ioops.h
index e443122..eed3e3d 100644
--- a/xio.h
+++ b/ioops.h
@@ -1,5 +1,5 @@
-#ifndef XIO_H
-#define XIO_H
+#ifndef IOOPS_H
+#define IOOPS_H
extern int open_or_die(const char *file, int flags);
extern int open_or_die_m(const char *file, int flags, mode_t mode);
@@ -9,4 +9,4 @@ extern void pipe_or_die(int pipefd[2], int flags);
extern ssize_t read_or_die(int fd, void *buf, size_t count);
extern ssize_t write_or_die(int fd, const void *buf, size_t count);
-#endif /* XIO_H */
+#endif /* IOOPS_H */
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 40580b8..28ebda7 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -30,7 +30,7 @@
#include "built_in.h"
#include "pcap_io.h"
#include "bpf.h"
-#include "xio.h"
+#include "ioops.h"
#include "die.h"
#include "irq.h"
#include "str.h"
diff --git a/netsniff-ng/Makefile b/netsniff-ng/Makefile
index f397b92..7f5a490 100644
--- a/netsniff-ng/Makefile
+++ b/netsniff-ng/Makefile
@@ -35,7 +35,7 @@ netsniff-ng-objs = dissector.o \
str.o \
irq.o \
iosched.o \
- xio.o \
+ ioops.o \
xutils.o \
xmalloc.o \
hash.o \
diff --git a/pcap_io.h b/pcap_io.h
index 98f16cf..7739868 100644
--- a/pcap_io.h
+++ b/pcap_io.h
@@ -17,7 +17,7 @@
#include "built_in.h"
#include "die.h"
-#include "xio.h"
+#include "ioops.h"
#define TCPDUMP_MAGIC 0xa1b2c3d4
#define ORIGINAL_TCPDUMP_MAGIC TCPDUMP_MAGIC
diff --git a/pcap_mm.c b/pcap_mm.c
index 122b7ef..848f7e0 100644
--- a/pcap_mm.c
+++ b/pcap_mm.c
@@ -14,7 +14,7 @@
#include <sys/mman.h>
#include "pcap_io.h"
-#include "xio.h"
+#include "ioops.h"
#include "xutils.h"
#include "built_in.h"
#include "iosched.h"
diff --git a/pcap_rw.c b/pcap_rw.c
index 29d11c5..6c9601f 100644
--- a/pcap_rw.c
+++ b/pcap_rw.c
@@ -14,9 +14,9 @@
#include "pcap_io.h"
#include "built_in.h"
#include "xutils.h"
-#include "xio.h"
#include "die.h"
#include "iosched.h"
+#include "ioops.h"
static ssize_t pcap_rw_write(int fd, pcap_pkthdr_t *phdr, enum pcap_type type,
const uint8_t *packet, size_t len)
diff --git a/pcap_sg.c b/pcap_sg.c
index 012fb1b..ea4a709 100644
--- a/pcap_sg.c
+++ b/pcap_sg.c
@@ -13,10 +13,10 @@
#include "pcap_io.h"
#include "xmalloc.h"
-#include "xio.h"
#include "xutils.h"
#include "built_in.h"
#include "iosched.h"
+#include "ioops.h"
static struct iovec iov[1024] __cacheline_aligned;
static off_t iov_off_rd = 0, iov_slot = 0;
diff --git a/trafgen.c b/trafgen.c
index 0a03f86..c161a1e 100644
--- a/trafgen.c
+++ b/trafgen.c
@@ -39,7 +39,7 @@
#include "lockme.h"
#include "mac80211.h"
#include "xutils.h"
-#include "xio.h"
+#include "ioops.h"
#include "irq.h"
#include "built_in.h"
#include "trafgen_conf.h"
diff --git a/trafgen/Makefile b/trafgen/Makefile
index 75a9c09..6942843 100644
--- a/trafgen/Makefile
+++ b/trafgen/Makefile
@@ -3,7 +3,7 @@ trafgen-libs = $(shell pkg-config --libs libnl-3.0) \
-lm
trafgen-objs = xmalloc.o \
- xio.o \
+ ioops.o \
xutils.o \
irq.o \
str.o \