diff --git a/bin/fly/Makefile.am b/bin/fly/Makefile.am index 6a7c490..cdfac0a 100644 --- a/bin/fly/Makefile.am +++ b/bin/fly/Makefile.am @@ -1,5 +1,5 @@ AM_CPPFLAGS = -I$(top_srcdir)/include sbin_PROGRAMS = fly fly_SOURCES = fly.c -fly_LDADD = $(top_builddir)/lib/libfc/libfc.a +fly_LDADD = $(top_builddir)/lib/libft/libfc.a dist_man1_MANS = fly.1 diff --git a/bin/fly/fly.c b/bin/fly/fly.c index 7369f21..b4257ba 100644 --- a/bin/fly/fly.c +++ b/bin/fly/fly.c @@ -42,9 +42,9 @@ #include #include -#include -#include -#include +#include +#include +#include #define FLY_DEFAULT_PORT 80 static const char data[] = "GET / HTTP/0.9\r\n\r\n"; diff --git a/configure.ac b/configure.ac index 57aa69b..11b6521 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.59]) AC_INIT([Flycatcher], [0.20160915], [d.e.smorgrav@usit.uio.no], [flycatcher], [https://www.github.com/unioslo/flycatcher]) -AC_CONFIG_SRCDIR([sbin/flycatcher/flycatcher.c]) +AC_CONFIG_SRCDIR([sbin/flytrap/flycatcher.c]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) AM_CONFIG_HEADER(include/config.h) @@ -93,11 +93,11 @@ AC_CONFIG_FILES([ Makefile include/Makefile lib/Makefile - lib/libfc/Makefile + lib/libft/Makefile bin/Makefile bin/fly/Makefile sbin/Makefile - sbin/flycatcher/Makefile + sbin/flytrap/Makefile rc/Makefile rc/flycatcher.logrotate rc/flycatcher.systemd diff --git a/include/Makefile.am b/include/Makefile.am index 4ac5488..9df8b69 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,11 +1,11 @@ noinst_HEADERS = -noinst_HEADERS += fc/assert.h -noinst_HEADERS += fc/ctype.h -noinst_HEADERS += fc/dict.h -noinst_HEADERS += fc/endian.h -noinst_HEADERS += fc/flopen.h -noinst_HEADERS += fc/hash.h -noinst_HEADERS += fc/log.h -noinst_HEADERS += fc/pidfile.h -noinst_HEADERS += fc/sbuf.h -noinst_HEADERS += fc/strutil.h +noinst_HEADERS += ft/assert.h +noinst_HEADERS += ft/ctype.h +noinst_HEADERS += ft/dict.h +noinst_HEADERS += ft/endian.h +noinst_HEADERS += ft/flopen.h +noinst_HEADERS += ft/hash.h +noinst_HEADERS += ft/log.h +noinst_HEADERS += ft/pidfile.h +noinst_HEADERS += ft/sbuf.h +noinst_HEADERS += ft/strutil.h diff --git a/include/fc/assert.h b/include/ft/assert.h similarity index 100% rename from include/fc/assert.h rename to include/ft/assert.h diff --git a/include/fc/ctype.h b/include/ft/ctype.h similarity index 100% rename from include/fc/ctype.h rename to include/ft/ctype.h diff --git a/include/fc/dict.h b/include/ft/dict.h similarity index 100% rename from include/fc/dict.h rename to include/ft/dict.h diff --git a/include/fc/endian.h b/include/ft/endian.h similarity index 100% rename from include/fc/endian.h rename to include/ft/endian.h diff --git a/include/fc/flopen.h b/include/ft/flopen.h similarity index 100% rename from include/fc/flopen.h rename to include/ft/flopen.h diff --git a/include/fc/hash.h b/include/ft/hash.h similarity index 100% rename from include/fc/hash.h rename to include/ft/hash.h diff --git a/include/fc/log.h b/include/ft/log.h similarity index 100% rename from include/fc/log.h rename to include/ft/log.h diff --git a/include/fc/pidfile.h b/include/ft/pidfile.h similarity index 100% rename from include/fc/pidfile.h rename to include/ft/pidfile.h diff --git a/include/fc/sbuf.h b/include/ft/sbuf.h similarity index 100% rename from include/fc/sbuf.h rename to include/ft/sbuf.h diff --git a/include/fc/strutil.h b/include/ft/strutil.h similarity index 100% rename from include/fc/strutil.h rename to include/ft/strutil.h diff --git a/lib/Makefile.am b/lib/Makefile.am index 831e40c..9984602 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1 +1 @@ -SUBDIRS = libfc +SUBDIRS = libft diff --git a/lib/libfc/Makefile.am b/lib/libft/Makefile.am similarity index 100% rename from lib/libfc/Makefile.am rename to lib/libft/Makefile.am diff --git a/lib/libfc/fc_assert.c b/lib/libft/fc_assert.c similarity index 97% rename from lib/libfc/fc_assert.c rename to lib/libft/fc_assert.c index 16826b9..e90ddbf 100644 --- a/lib/libfc/fc_assert.c +++ b/lib/libft/fc_assert.c @@ -34,9 +34,9 @@ #include #include -#include +#include #define FC_LOGV_REQUIRED -#include +#include void fc_abort(const char *fmt, ...) diff --git a/lib/libfc/fc_dict.c b/lib/libft/fc_dict.c similarity index 99% rename from lib/libfc/fc_dict.c rename to lib/libft/fc_dict.c index 7af652e..da18a7e 100644 --- a/lib/libfc/fc_dict.c +++ b/lib/libft/fc_dict.c @@ -38,8 +38,8 @@ #include #include -#include -#include +#include +#include struct fc_dict_ent { const char *key; diff --git a/lib/libfc/fc_flopen.c b/lib/libft/fc_flopen.c similarity index 99% rename from lib/libfc/fc_flopen.c rename to lib/libft/fc_flopen.c index b0c313a..b025f7e 100644 --- a/lib/libfc/fc_flopen.c +++ b/lib/libft/fc_flopen.c @@ -41,7 +41,7 @@ #include #include -#include "fc/flopen.h" +#include "ft/flopen.h" int fc_flopen(const char *path, int flags, ...) diff --git a/lib/libfc/fc_hash.c b/lib/libft/fc_hash.c similarity index 99% rename from lib/libfc/fc_hash.c rename to lib/libft/fc_hash.c index 1b5fccc..248def4 100644 --- a/lib/libfc/fc_hash.c +++ b/lib/libft/fc_hash.c @@ -34,7 +34,7 @@ #include #include -#include +#include /* * Implementation of the hash function described in Pearson, Peter diff --git a/lib/libfc/fc_log.c b/lib/libft/fc_log.c similarity index 98% rename from lib/libfc/fc_log.c rename to lib/libft/fc_log.c index 6669074..736192d 100644 --- a/lib/libfc/fc_log.c +++ b/lib/libft/fc_log.c @@ -39,8 +39,8 @@ #include #define FC_LOGV_REQUIRED -#include -#include +#include +#include static char fc_prog_name[16]; fc_log_level_t fc_log_level; diff --git a/lib/libfc/fc_pidfile.c b/lib/libft/fc_pidfile.c similarity index 99% rename from lib/libfc/fc_pidfile.c rename to lib/libft/fc_pidfile.c index 40a97ea..52f97ae 100644 --- a/lib/libfc/fc_pidfile.c +++ b/lib/libft/fc_pidfile.c @@ -45,8 +45,8 @@ #include #include -#include "fc/flopen.h" -#include "fc/pidfile.h" +#include "ft/flopen.h" +#include "ft/pidfile.h" struct fc_pidfh { int pf_fd; diff --git a/lib/libfc/fc_readlinev.c b/lib/libft/fc_readlinev.c similarity index 99% rename from lib/libfc/fc_readlinev.c rename to lib/libft/fc_readlinev.c index 6489cc0..a72f5e9 100644 --- a/lib/libfc/fc_readlinev.c +++ b/lib/libft/fc_readlinev.c @@ -36,7 +36,7 @@ #include #include -#include +#include #define MIN_WORDV_SIZE 32 diff --git a/lib/libfc/fc_readword.c b/lib/libft/fc_readword.c similarity index 98% rename from lib/libfc/fc_readword.c rename to lib/libft/fc_readword.c index b119253..9824d7c 100644 --- a/lib/libfc/fc_readword.c +++ b/lib/libft/fc_readword.c @@ -36,8 +36,8 @@ #include #include -#include -#include "fc/strutil.h" +#include +#include "ft/strutil.h" #define MIN_WORD_SIZE 32 diff --git a/lib/libfc/fc_sbuf.c b/lib/libft/fc_sbuf.c similarity index 99% rename from lib/libfc/fc_sbuf.c rename to lib/libft/fc_sbuf.c index 60f5ef3..61372ec 100644 --- a/lib/libfc/fc_sbuf.c +++ b/lib/libft/fc_sbuf.c @@ -39,7 +39,7 @@ #include #include -#include +#include #define KASSERT(e, m) assert(e) #define SBMALLOC(size) malloc(size) diff --git a/lib/libfc/fc_strlcat.c b/lib/libft/fc_strlcat.c similarity index 98% rename from lib/libfc/fc_strlcat.c rename to lib/libft/fc_strlcat.c index 2bba323..e44707b 100644 --- a/lib/libfc/fc_strlcat.c +++ b/lib/libft/fc_strlcat.c @@ -36,7 +36,7 @@ #include -#include +#include /* * Like strcat(3), but always NUL-terminates; returns strlen(src) diff --git a/lib/libfc/fc_strlcpy.c b/lib/libft/fc_strlcpy.c similarity index 98% rename from lib/libfc/fc_strlcpy.c rename to lib/libft/fc_strlcpy.c index 7626987..11e0248 100644 --- a/lib/libfc/fc_strlcpy.c +++ b/lib/libft/fc_strlcpy.c @@ -36,7 +36,7 @@ #include -#include +#include /* * Like strcpy(3), but always NUL-terminates; returns strlen(src) diff --git a/sbin/Makefile.am b/sbin/Makefile.am index 3dd0510..01b606c 100644 --- a/sbin/Makefile.am +++ b/sbin/Makefile.am @@ -1 +1 @@ -SUBDIRS = flycatcher +SUBDIRS = flytrap diff --git a/sbin/flycatcher/.gitignore b/sbin/flytrap/.gitignore similarity index 100% rename from sbin/flycatcher/.gitignore rename to sbin/flytrap/.gitignore diff --git a/sbin/flycatcher/Makefile.am b/sbin/flytrap/Makefile.am similarity index 91% rename from sbin/flycatcher/Makefile.am rename to sbin/flytrap/Makefile.am index 5c06bae..e8855e8 100644 --- a/sbin/flycatcher/Makefile.am +++ b/sbin/flytrap/Makefile.am @@ -20,7 +20,7 @@ flycatcher_SOURCES += ip4.c flycatcher_SOURCES += tcp4.c flycatcher_SOURCES += udp4.c -flycatcher_LDADD = $(LIBPCAP) $(top_builddir)/lib/libfc/libfc.a +flycatcher_LDADD = $(LIBPCAP) $(top_builddir)/lib/libft/libfc.a noinst_HEADERS = noinst_HEADERS += ethernet.h diff --git a/sbin/flycatcher/arp.c b/sbin/flytrap/arp.c similarity index 99% rename from sbin/flycatcher/arp.c rename to sbin/flytrap/arp.c index 02ae255..fcc0c9d 100644 --- a/sbin/flycatcher/arp.c +++ b/sbin/flytrap/arp.c @@ -39,9 +39,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "flycatcher.h" #include "ethernet.h" diff --git a/sbin/flycatcher/crc32.c b/sbin/flytrap/crc32.c similarity index 100% rename from sbin/flycatcher/crc32.c rename to sbin/flytrap/crc32.c diff --git a/sbin/flycatcher/ether.c b/sbin/flytrap/ether.c similarity index 98% rename from sbin/flycatcher/ether.c rename to sbin/flytrap/ether.c index dda3bd6..913ff3d 100644 --- a/sbin/flycatcher/ether.c +++ b/sbin/flytrap/ether.c @@ -38,8 +38,8 @@ #include #include -#include -#include +#include +#include #include "flycatcher.h" #include "ethernet.h" diff --git a/sbin/flycatcher/ethernet.h b/sbin/flytrap/ethernet.h similarity index 100% rename from sbin/flycatcher/ethernet.h rename to sbin/flytrap/ethernet.h diff --git a/sbin/flycatcher/flycatcher.8 b/sbin/flytrap/flycatcher.8 similarity index 100% rename from sbin/flycatcher/flycatcher.8 rename to sbin/flytrap/flycatcher.8 diff --git a/sbin/flycatcher/flycatcher.c b/sbin/flytrap/flycatcher.c similarity index 99% rename from sbin/flycatcher/flycatcher.c rename to sbin/flytrap/flycatcher.c index b5b4d93..66ead65 100644 --- a/sbin/flycatcher/flycatcher.c +++ b/sbin/flytrap/flycatcher.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include "flycatcher.h" diff --git a/sbin/flycatcher/flycatcher.h b/sbin/flytrap/flycatcher.h similarity index 100% rename from sbin/flycatcher/flycatcher.h rename to sbin/flytrap/flycatcher.h diff --git a/sbin/flycatcher/icmp4.c b/sbin/flytrap/icmp4.c similarity index 98% rename from sbin/flycatcher/icmp4.c rename to sbin/flytrap/icmp4.c index 6657950..20af6bb 100644 --- a/sbin/flycatcher/icmp4.c +++ b/sbin/flytrap/icmp4.c @@ -41,9 +41,9 @@ #include -#include -#include -#include +#include +#include +#include #include "flycatcher.h" #include "ethernet.h" diff --git a/sbin/flycatcher/iface.c b/sbin/flytrap/iface.c similarity index 98% rename from sbin/flycatcher/iface.c rename to sbin/flytrap/iface.c index c0ad240..c78b4af 100644 --- a/sbin/flycatcher/iface.c +++ b/sbin/flytrap/iface.c @@ -47,9 +47,9 @@ #error pcap library required #endif -#include -#include -#include +#include +#include +#include #include "flycatcher.h" #include "ethernet.h" diff --git a/sbin/flycatcher/iface.h b/sbin/flytrap/iface.h similarity index 100% rename from sbin/flycatcher/iface.h rename to sbin/flytrap/iface.h diff --git a/sbin/flycatcher/ip4.c b/sbin/flytrap/ip4.c similarity index 98% rename from sbin/flycatcher/ip4.c rename to sbin/flytrap/ip4.c index 6fef246..a7d6f56 100644 --- a/sbin/flycatcher/ip4.c +++ b/sbin/flytrap/ip4.c @@ -41,10 +41,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "flycatcher.h" #include "ethernet.h" diff --git a/sbin/flycatcher/log.c b/sbin/flytrap/log.c similarity index 100% rename from sbin/flycatcher/log.c rename to sbin/flytrap/log.c diff --git a/sbin/flycatcher/main.c b/sbin/flytrap/main.c similarity index 98% rename from sbin/flycatcher/main.c rename to sbin/flytrap/main.c index 67f1daa..91ed584 100644 --- a/sbin/flycatcher/main.c +++ b/sbin/flytrap/main.c @@ -38,8 +38,8 @@ #include #include -#include -#include +#include +#include #include "flycatcher.h" #include "ethernet.h" diff --git a/sbin/flycatcher/packet.c b/sbin/flytrap/packet.c similarity index 100% rename from sbin/flycatcher/packet.c rename to sbin/flytrap/packet.c diff --git a/sbin/flycatcher/packet.h b/sbin/flytrap/packet.h similarity index 100% rename from sbin/flycatcher/packet.h rename to sbin/flytrap/packet.h diff --git a/sbin/flycatcher/tcp4.c b/sbin/flytrap/tcp4.c similarity index 99% rename from sbin/flycatcher/tcp4.c rename to sbin/flytrap/tcp4.c index 7cfe80a..1ab6466 100644 --- a/sbin/flycatcher/tcp4.c +++ b/sbin/flytrap/tcp4.c @@ -38,8 +38,8 @@ #include #include -#include -#include +#include +#include #include "flycatcher.h" #include "ethernet.h" diff --git a/sbin/flycatcher/udp4.c b/sbin/flytrap/udp4.c similarity index 98% rename from sbin/flycatcher/udp4.c rename to sbin/flytrap/udp4.c index 4a0554d..ffe69e3 100644 --- a/sbin/flycatcher/udp4.c +++ b/sbin/flytrap/udp4.c @@ -36,8 +36,8 @@ #include #include -#include -#include +#include +#include #include "flycatcher.h" #include "ethernet.h"