AC_INIT([snort], [2.10.075])
AC_PREREQ([2.68])
-AC_CONFIG_SRCDIR([src/snort.cc])
+AC_CONFIG_SRCDIR([src/main.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
# enables
#--------------------------------------------------------------------------
+AM_CONDITIONAL(LINUX, [test "x$linux" = "xyes"])
+
AC_ARG_ENABLE(static-inspectors,
[ --disable-static-inspectors do not include inspectors in binary ],
static_inspectors="$enableval", static_inspectors="yes")
echo "$AM_CFLAGS $CFLAGS" > cflags.out
echo "$AM_CPPFLAGS $CPPFLAGS" > cppflags.out
-AM_CPPFLAGS='-I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/parser -I$(top_srcdir)/src/utils -I$(top_srcdir)/src/loggers -I$(top_srcdir)/src/network_inspectors -I$(top_srcdir)/src/service_inspectors -I$(top_srcdir)/src/time -I$(top_srcdir)/src/protocols -I$(top_srcdir)/src/log -I$(top_srcdir)/src/events -I$(top_srcdir)/src/sfip -I$(top_srcdir)/src/rules -I$(top_srcdir)/src/detection -I$(top_srcdir)/src/hash'
+AM_CPPFLAGS='-I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/main -I$(top_srcdir)/src/parser -I$(top_srcdir)/src/utils -I$(top_srcdir)/src/loggers -I$(top_srcdir)/src/time -I$(top_srcdir)/src/protocols -I$(top_srcdir)/src/network_inspectors -I$(top_srcdir)/src/log -I$(top_srcdir)/src/events -I$(top_srcdir)/src/sfip -I$(top_srcdir)/src/rules -I$(top_srcdir)/src/detection -I$(top_srcdir)/src/hash'
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_CXXFLAGS)
src/ips_options/Makefile \
src/log/Makefile \
src/loggers/Makefile \
+src/main/Makefile \
src/managers/Makefile \
src/mempool/Makefile \
src/network_inspectors/Makefile \
.
clean-local:
+ rm -f $(BUILT_SOURCES)
rm -f *.tgz
rm -f snort_manual.{fo,xml,html,pdf}
rm -rf snort_manual.chunked/
bin_PROGRAMS = snort
-snort_includedir = $(pkgincludedir)
-
-snort_include_HEADERS = \
-thread.h \
-snort_debug.h \
-snort_types.h
-
snort_SOURCES = \
-snort.cc snort.h \
-snort_debug.cc \
-snort_config.cc snort_config.h \
-analyzer.cc analyzer.h \
-policy.cc policy.h \
-main.cc main.h \
-build.h
+main.cc \
+main.h
if STATIC_INSPECTORS
lib_list = \
endif
# order libs to avoid undefined symbols
+# from gnu linker
snort_LDADD = \
+main/libmain.a \
target_based/libtarget_based.a \
file_api/libfile_api.a \
file_api/libs/libfile.a \
ips_options \
log \
loggers \
+main \
managers \
mempool \
network_inspectors \
#include <dnet.h>
#endif
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "decode.h"
#include "snort.h"
#include "snort_debug.h"
#include "snort_types.h"
#include "protocols/packet.h"
#include "snort.h"
-#include "snort_config.h"
+#include "main/snort_config.h"
#include "packet_io/active.h"
#include "protocols/ipv6.h"
#include "protocols/teredo.h"
#include <stdlib.h>
-#include "thread.h"
+#include "main/thread.h"
#include "util.h"
typedef struct _IDLE_HANDLER_ELEMENT
#include "snort_types.h"
#include "snort_debug.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "snort.h"
#include "util.h"
#include "mstring.h"
#include "profiler.h"
#include "filters/detection_filter.h"
#include "encode.h"
-#include "thread.h"
+#include "main/thread.h"
#include "framework/ips_option.h"
#include "managers/ips_manager.h"
#endif
#include "snort_types.h"
-#include "thread.h"
+#include "main/thread.h"
extern THREAD_LOCAL uint16_t event_id;
#include "file_mime_process.h"
#include "file_resume_block.h"
-#include "http_inspect/hi_main.h" // FIXIT bad dependency
+#include "service_inspectors/http_inspect/hi_main.h" // FIXIT bad dependency
#include "detection_util.h"
#include "target_based/sftarget_protocol_reference.h"
#include "sflsq.h"
#include "sfghash.h"
#include "sfxhash.h"
-#include "policy.h"
+#include "main/policy.h"
#include "detection/rules.h"
// define to use over rate threshold
#include "sflsq.h"
#include "sfghash.h"
#include "sfxhash.h"
-#include "policy.h"
+#include "main/policy.h"
/*!
Max GEN_ID value - Set this to the Max Used by Snort, this is used for the
#include <stdlib.h>
#include <string.h>
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "mstring.h"
#include "util.h"
#include "parser.h"
#include <bitset>
typedef std::bitset<65536> PortList;
+typedef std::bitset<4096> VlanList;
typedef std::bitset<256> ByteList;
#endif
#define INSPECTOR_H
#include "snort_types.h"
-#include "thread.h"
+#include "main/thread.h"
#include "framework/base_api.h"
struct Packet;
#endif
#include "snort_types.h"
-#include "thread.h"
+#include "main/thread.h"
#include "framework/base_api.h"
#include "time/profiler.h"
#include "value.h"
+#include <assert.h>
#include <iostream>
#include <sstream>
#include <string>
{
list.reset();
unsigned len = str.size();
+ assert(len == list.size());
+
+ for ( unsigned n = 0; n < len; ++n )
+ {
+ if ( str[n] == '1' )
+ list.set(n);
+ }
+}
+
+void Value::get_bits(VlanList& list) const
+{
+ list.reset();
+ unsigned len = str.size();
+ assert(len == list.size());
for ( unsigned n = 0; n < len; ++n )
{
{
list.reset();
unsigned len = str.size();
+ assert(len == list.size());
for ( unsigned n = 0; n < len; ++n )
{
{ return str.c_str(); };
void get_bits(PortList&) const;
+ void get_bits(VlanList&) const;
void get_bits(ByteList&) const;
void lower()
#endif
#include "utils/util.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "snort.h"
#include "utils/ring.h"
#include "fpdetect.h"
#include "sfhashfcn.h"
#include "detection/detection_defines.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "framework/ips_option.h"
#define SESSION_PRINTABLE 1
#include <assert.h>
#include "ips_content.h"
-#include "thread.h"
+#include "main/thread.h"
void PayloadReplaceInit(PatternMatchData*, char*, OptTreeNode*);
using namespace std;
#include "log_text.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "snort.h"
#define DEFAULT_DAEMON_ALERT_FILE "alert"
#include <fcntl.h>
#include "snort.h"
-#include "snort_config.h"
+#include "main/snort_config.h"
#include "packet_io/sfdaq.h"
#include "time/packet_time.h"
#include "decode.h"
#include "stream5/stream_api.h"
#include "snort_bounds.h"
-#include "thread.h"
+#include "main/thread.h"
#include "util.h"
#ifdef OBFUSCATION_TEST_STANDALONE
alert_csv.cc \
alert_fast.cc \
alert_full.cc \
-alert_sf_socket.cc \
alert_syslog.cc \
alert_test.cc \
alert_unixsock.cc \
if STATIC_LOGGERS
libloggers_a_SOURCES += $(plugin_list)
+
+if LINUX
+libloggers_a_SOURCES += alert_sf_socket.cc
+endif
+
else
ehlibdir = $(pkglibdir)/loggers
libalert_full_la_LDFLAGS = -export-dynamic -shared
libalert_full_la_SOURCES = alert_full.cc
+if LINUX
ehlib_LTLIBRARIES += libalert_sf_socket.la
libalert_sf_socket_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
libalert_sf_socket_la_LDFLAGS = -export-dynamic -shared
libalert_sf_socket_la_SOURCES = alert_sf_socket.cc
+endif
ehlib_LTLIBRARIES += libalert_syslog.la
libalert_syslog_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
#include "snort_debug.h"
#include "util.h"
#include "snort.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "packet_io/sfdaq.h"
#include "stream5/stream_api.h"
#include "framework/module.h"
#include "decode.h" /* for struct in6_addr -- maybe move to snort_types.h? */
#include "snort_types.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "decode.h"
#include "rules.h"
#include "treenodes.h"
#include "snort.h"
#include "helpers/process.h"
-#include "snort_config.h"
+#include "main/snort_config.h"
#include "framework/module.h"
#include "managers/module_manager.h"
#include "managers/plugin_manager.h"
#include "control/idle_processing.h"
#include "target_based/sftarget_reader.h"
#include "flow/flow_control.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "helpers/swapper.h"
#include "time/periodic.h"
--- /dev/null
+AUTOMAKE_OPTIONS=foreign no-dependencies
+
+x_includedir = $(pkgincludedir)/main
+
+noinst_LIBRARIES = libmain.a
+
+x_include_HEADERS = \
+snort_debug.h \
+snort_types.h \
+thread.h
+
+libmain_a_SOURCES = \
+analyzer.cc \
+analyzer.h \
+binder.cc \
+binder.h \
+build.h \
+modules.cc \
+modules.h \
+policy.cc \
+policy.h \
+snort.cc \
+snort.h \
+snort_config.cc \
+snort_config.h \
+snort_debug.cc
+
+AM_CXXFLAGS = @AM_CXXFLAGS@
using namespace std;
#include "tag.h"
-#include "thread.h"
+#include "main/thread.h"
#include "helpers/swapper.h"
#include "packet_io/active.h"
#include "packet_io/sfdaq.h"
--- /dev/null
+/*
+** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License Version 2 as
+** published by the Free Software Foundation. You may not use, modify or
+** distribute this program under any other version of the GNU General
+** Public License.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+// binder.cc author Russ Combs <rucombs@cisco.com>
+
+#include "binder.h"
+
--- /dev/null
+/*
+** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License Version 2 as
+** published by the Free Software Foundation. You may not use, modify or
+** distribute this program under any other version of the GNU General
+** Public License.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+// binder.cc author Russ Combs <rucombs@cisco.com>
+
+#ifndef BINDER_H
+#define BINDER_H
+
+#include <string>
+
+#include "framework/bits.h"
+
+enum BindRole
+{
+ BR_EITHER,
+ BR_CLIENT,
+ BR_SERVER
+};
+
+enum BindAction
+{
+ BA_INSPECT,
+ BA_ALLOW,
+ BA_BLOCK
+};
+
+struct Binding
+{
+ // when
+ std::string id;
+ VlanList vlans;
+ std::string nets;
+ ByteList protos;
+ PortList ports;
+ BindRole role;
+
+ // use
+ std::string type;
+ std::string name;
+
+ // action
+ BindAction action;
+
+ Binding()
+ { role = BR_EITHER; action = BA_INSPECT; };
+};
+
+#endif
+
#include <assert.h>
#include <string.h>
+
#include <string>
+#include <vector>
using namespace std;
#include "framework/module.h"
#include "main.h"
#include "snort.h"
#include "snort_config.h"
+#include "binder.h"
#include "parser/parser.h"
#include "parser/parse_conf.h"
#include "parser/config_file.h"
//-------------------------------------------------------------------------
// network module
//-------------------------------------------------------------------------
+
static const Parameter network_params[] =
{
{ "checksum_drop", Parameter::PT_MULTI,
// bindings module
//-------------------------------------------------------------------------
-static const Parameter bindings_match_params[] =
+static const Parameter bindings_when_params[] =
{
- { "id", Parameter::PT_INT, "1:", nullptr,
+ { "id", Parameter::PT_STRING, nullptr, nullptr,
"unique ID for selection of this config by external logic" },
{ "vlans", Parameter::PT_STRING, nullptr, nullptr,
"list of VLAN IDs" },
- { "networks", Parameter::PT_ADDR_LIST, nullptr, nullptr,
- "list of CIDRs" },
+ { "nets", Parameter::PT_ADDR_LIST, nullptr, nullptr,
+ "list of networks" },
+
+ { "protos", Parameter::PT_SELECT, "ip | icmp | tcp | udp", nullptr,
+ "list of protocols" },
{ "ports", Parameter::PT_BIT_LIST, "65535", nullptr,
"list of ports" },
- { "protocol", Parameter::PT_SELECT, "ip | icmp | tcp | udp", nullptr,
- "list of protocols" },
+ { "role", Parameter::PT_ENUM, "client | server | any", "any",
+ "use the given configuration on one or any end of a session" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
};
-static const Parameter bindings_config_params[] =
+static const Parameter bindings_use_params[] =
{
{ "type", Parameter::PT_STRING, nullptr, nullptr,
"select module for binding" },
{ "name", Parameter::PT_STRING, nullptr, "defaults to type",
"symbol name" },
- { "direction", Parameter::PT_SELECT, "to_client | to_server | any", nullptr,
- "direction" },
-
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
};
static const Parameter bindings_params[] =
{
- { "match", Parameter::PT_TABLE, nullptr, bindings_match_params,
+ { "when", Parameter::PT_TABLE, nullptr, bindings_when_params,
"match criteria" },
- { "config", Parameter::PT_TABLE, nullptr, bindings_config_params,
+ { "use", Parameter::PT_TABLE, nullptr, bindings_use_params,
"target configuration" },
- { "action", Parameter::PT_ENUM, "inspect | allow | block", "block",
- "what to do with matching traffic (no config needed for allow and block)" },
+ { "action", Parameter::PT_ENUM, "inspect | allow | block", "inspect",
+ "what to do with matching traffic (use not needed for allow and block)" },
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
};
class BindingsModule : public Module
{
public:
- BindingsModule() : Module("bindings", bindings_params) { };
+ BindingsModule() : Module("bindings", bindings_params) { work = nullptr; };
bool set(const char*, Value&, SnortConfig*);
bool begin(const char*, int, SnortConfig*);
+ bool end(const char*, int, SnortConfig*);
private:
- string type;
- string name;
- unsigned ignore; // FIXIT only using type and name for now
+ vector<Binding*> bindings;
+ Binding* work;
};
bool BindingsModule::set(const char*, Value& v, SnortConfig*)
{
- if ( v.is("type") )
- type = v.get_string();
-
- else if ( v.is("name") )
- name = v.get_string();
-
- else if ( v.is("direction") )
- ignore++;
+ if ( v.is("role") )
+ work->role = (BindRole)v.get_long();
else if ( v.is("id") )
- ignore++;
+ work->id = v.get_string();
else if ( v.is("vlans") )
- ignore++;
+ v.get_bits(work->vlans);
- else if ( v.is("networks") )
- ignore++;
+ else if ( v.is("nets") )
+ work->nets = v.get_string();
+ else if ( v.is("protos") )
+ {
+ //v.get_bits(work->protos); FIXIT ?
+ }
else if ( v.is("ports") )
- ignore++;
+ v.get_bits(work->ports);
+
+ else if ( v.is("type") )
+ work->type = v.get_string();
- else if ( v.is("protocol") )
- ignore++;
+ else if ( v.is("name") )
+ work->name = v.get_string();
else if ( v.is("action") )
- ignore++;
+ work->action = (BindAction)v.get_long();
else
return false;
return true;
}
-bool BindingsModule::begin(const char*, int, SnortConfig*)
+bool BindingsModule::begin(const char* fqn, int, SnortConfig*)
+{
+ if ( !strcmp(fqn, "bindings") )
+ work = new Binding;
+
+ return true;
+}
+
+bool BindingsModule::end(const char* fqn, int, SnortConfig*)
{
- type.clear();
- name.clear();
- ignore = 0;
+ if ( !strcmp(fqn, "bindings") )
+ {
+ bindings.push_back(work);
+ work = nullptr;
+ }
return true;
}
// modules.cc author Russ Combs <rucombs@cisco.com>
-// prototype of parsing approach
-
#ifndef MODULES_H
#define MODULES_H
DECODE_EVENT_FLAG__DEFAULT = 0x00000001
};
-// this is the nap post ac-split
-// really it is a decoder policy
-// similar to inspector policy
+// Snort ac-split creates the nap
+// Snort++ breaks that into network and inspection
struct NetworkPolicy
{
public:
#include "rules.h"
#include "treenodes.h"
#include "snort_debug.h"
-#include "snort_config.h"
+#include "main/snort_config.h"
#include "util.h"
#include "parser.h"
#include "packet_io/trough.h"
#include "control/idle_processing.h"
#include "file_api/file_service.h"
#include "flow/flow_control.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "log/sf_textlog.h"
#include "log/log_text.h"
#include "time/periodic.h"
#include "snort_types.h"
#include "protocols/decode.h"
#include "sfip/sf_ipvar.h"
-#include "snort_config.h"
+#include "main/snort_config.h"
SnortConfig* reload_config();
void snort_setup(int argc, char *argv[]);
#include "hash/sfxhash.h"
#include "utils/sfportobject.h"
#include "hash/sfghash.h"
-#include "policy.h"
+#include "main/policy.h"
#define MAX_PIDFILE_SUFFIX 11 /* uniqueness extension to PID file, see '-R' */
#include "framework/base_api.h"
#include "framework/module.h"
#include "managers/plugin_manager.h"
-#include "snort_config.h"
+#include "main/snort_config.h"
+#include "main/modules.h"
#include "parser/parser.h"
#include "parser/parse_conf.h"
-#include "parser/modules.h"
#include "parser/vars.h"
using namespace std;
#include "packet_manager.h"
#include "framework/codec.h"
#include "snort.h"
-#include "thread.h"
+#include "main/thread.h"
#include "log/messages.h"
#include "packet_io/sfdaq.h"
#include <errno.h>
#include "defrag_module.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "snort_bounds.h"
#include "log_text.h"
#include "detect.h"
#include <unistd.h>
#include <string>
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "util.h"
#include "snort_types.h"
#include "decode.h"
#include "perf.h"
#include "perf_base.h"
#include "perf_module.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "snort_types.h"
#include "mstring.h"
#include "util.h"
#include "ps_inspect.h"
#include "ps_module.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "decode.h"
#include "encode.h"
#include "event_wrapper.h"
#include <string>
using namespace std;
-#include "snort_config.h"
+#include "main/snort_config.h"
#include "stream_common.h"
#include "ip_config.h"
#include <errno.h>
#include <assert.h>
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "perf_monitor/perf.h"
#include "snort_types.h"
#include "snort_debug.h"
parse_otn.cc parse_otn.h \
cmd_line.cc cmd_line.h \
config_file.cc config_file.h \
-modules.cc modules.h \
keywords.h \
ip_addr_set.cc ip_addr_set.h \
mstring.cc mstring.h \
#include "config_file.h"
#include "parser.h"
#include "vars.h"
-#include "analyzer.h"
+#include "main/analyzer.h"
#include "managers/shell.h"
#include "managers/event_manager.h"
#include "managers/ips_manager.h"
# include "config.h"
#endif
-#include "snort_config.h"
+#include "main/snort_config.h"
#include "snort_types.h"
#include "snort.h"
#include "rules.h"
#include "treenodes.h"
#include "decode.h"
-#include "policy.h"
+#include "main/policy.h"
#include "sflsq.h"
#include "snort.h"
#include "util.h"
#ifndef VARS_H
#define VARS_H
-#include "snort_config.h"
+#include "main/snort_config.h"
#include "sfip/sf_vartable.h"
//-------------------------------------------------------------------------
#include "snort_debug.h"
#include "util.h"
-#include "thread.h"
+#include "main/thread.h"
#define MEMASSERT(p,s) if(!p){fprintf(stderr,"ACSM-No Memory: %s!\n",s);exit(0);}
#define PAT_STATS_H
#include "snort_types.h"
-#include "thread.h"
+#include "main/thread.h"
#include "utils/stats.h"
// pattern matcher queue statistics
#include <stdlib.h>
#include <ctype.h>
-#include "thread.h"
+#include "main/thread.h"
#include "framework/mpse.h"
#include "managers/mpse_manager.h"
#include "ftp_module.h"
#include <sstream>
-#include "snort_config.h"
+#include "main/snort_config.h"
using namespace std;
#include <time.h>
#include <sys/types.h>
-#include "thread.h"
+#include "main/thread.h"
//#define MDEBUG
#include "telnet_module.h"
#include <sstream>
-#include "snort_config.h"
+#include "main/snort_config.h"
using namespace std;
#include "snort_types.h"
#include "snort_debug.h"
#include "ipv6_port.h"
-#include "thread.h"
+#include "main/thread.h"
#include "utils/stats.h"
#define HI_UNKNOWN_METHOD 1
#include "mempool/mempool.h"
#include "hi_paf.h"
-#include "thread.h"
+#include "main/thread.h"
static THREAD_LOCAL bool simple_response = false;
#include <time.h>
#include <sys/types.h>
-#include "thread.h"
+#include "main/thread.h"
//#define MDEBUG
#include <sys/types.h>
#include <arpa/inet.h>
-#include "thread.h"
+#include "main/thread.h"
#include "protocols/ipv6.h"
#if 0
*/
#include "packet_time.h"
-#include "thread.h"
+#include "main/thread.h"
static THREAD_LOCAL struct timeval s_recent_packet = { 0, 0 };
static THREAD_LOCAL uint32_t s_first_packet = 0;
#ifdef PPM_MGR
#include "snort_types.h"
-#include "thread.h"
+#include "main/thread.h"
#include "cpuclock.h"
#include "detection/detection_options.h"
#endif
#include "ppm.h"
-#include "snort_config.h"
+#include "main/snort_config.h"
//-------------------------------------------------------------------------
// ppm attributes
#endif
#ifdef PERF_PROFILING
-#include "thread.h"
+#include "main/thread.h"
#include "time/cpuclock.h"
/* Sort preferences for rule profiling */
#include <string.h>
#include "snort_types.h"
-#include "thread.h"
+#include "main/thread.h"
#include "sfip/sf_ipvar.h"
#include "sfip/ipv6_port.h"
#include "utils/sflsq.h"
*/
#include"util_jsnorm.h"
-#include"thread.h"
+#include"main/thread.h"
#define INVALID_HEX_VAL -1
#define MAX_BUF 8
/* for inet_ntoa */
#include <arpa/inet.h>
-#include "thread.h"
+#include "main/thread.h"
#include "util.h"
/**