From: Russ Combs Date: Fri, 3 Oct 2014 00:34:26 +0000 (-0400) Subject: fixed warnings and updated manual X-Git-Tag: 3.0.0-233~1397^2~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2024bbf3ca61ef0cffd12c03e2323c5928c7aa9;p=thirdparty%2Fsnort3.git fixed warnings and updated manual --- diff --git a/ChangeLog b/ChangeLog index 76e7e07da..ca80d9933 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,8 @@ -- updated config_changes.txt -- fixed doc format and added errors.txt -- revised help options (again) to be more consistent with other (gnu style) programs +-- added overview page to documentation +-- pulled in latest from Josh 121 -- valgrind fixes diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 5577f056a..0dc489d56 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -28,11 +28,12 @@ set(BUILT_SOURCES set (UNBUILT_SOURCES snort_manual.txt + overview.txt errors.txt differences.txt + plugins.txt style.txt tips.txt - plugins.txt # config_changes.txt If ruby executable is NOT found ) diff --git a/doc/Makefile.am b/doc/Makefile.am index 4c559b6a2..a89bb2d81 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -13,6 +13,7 @@ version.txt unbuilt_sources = \ snort_manual.txt \ +overview.txt \ config_changes.txt \ errors.txt \ differences.txt \ @@ -54,7 +55,7 @@ config.txt: $(snort) $(snort) --markup --help-config | sort -k 3 > $@ gids.txt: $(snort) - $(snort) --markup --help-gids | sort -n -k 1.4 > $@ + $(snort) --markup --list-gids | sort -n -k 1.4 > $@ modules.txt: $(snort) for m in `$(snort) --list-modules` ; do \ diff --git a/doc/plugins.txt b/doc/plugins.txt index 2bcc314f4..954c984fb 100644 --- a/doc/plugins.txt +++ b/doc/plugins.txt @@ -1,4 +1,4 @@ -Snort++ uses a variety of plugins to accomplish much of its processing +Snort\++ uses a variety of plugins to accomplish much of its processing objectives, including: * Codec - to decode and encode packets @@ -19,7 +19,7 @@ The BaseApi includes type, name, API version, plugin version, and function pointers for constructing and destructing a Module. The specific API add various other data and functions for their given roles. -The Module is pervasive in Snort\+\+. It is how everything, including +The Module is pervasive in Snort++. It is how everything, including plugins, are configured. It also provides access to builtin rules. And as the glue that binds functionality to Snort++, the capabilities of a Module are expected to grow to include statistics support, etc. diff --git a/doc/snort_manual.txt b/doc/snort_manual.txt index d7afc4abb..ac646ff91 100644 --- a/doc/snort_manual.txt +++ b/doc/snort_manual.txt @@ -10,6 +10,10 @@ include::version.txt[] toc::[] +== Overview + +include::overview.txt[] + == Getting Started include::tips.txt[] diff --git a/doc/tips.txt b/doc/tips.txt index f4a938a77..bcd5caf69 100644 --- a/doc/tips.txt +++ b/doc/tips.txt @@ -1,15 +1,39 @@ The following pointers will help you get started: -=== Building +=== Dependencies + +Required: + +* autotools or cmake to build from source. + +* daq from snort.org for packet IO. + +* luajit from luajit.org for configuration and scripting. + +* pcap from http://www.tcpdump.org for tcpdump logging. + +* pcre from http://www.pcre.org for regex pattern matching. + +* dnet from http://code.google.com/p/libdnet/ for network utility + functions. -* You need luajit from luajit.org; build from source. +* zlib from http://www.zlib.net for decompression. + +Optional: + +* asciidoc from http://www.methods.co.nz/asciidoc/ to build the html + manual. + +* dblatex from http://dblatex.sourceforge.net to build the pdf manual (in + addition to asciidoc). + +* check from http://check.sourceforge.net to build unit tests. + +=== Building * You should build Snort++ with --prefix $install_dir where install_dir is something you can easily delete. -* If you want to build the documentation, you will need to install - asciidoc. You will also need dblatex to build the pdf manual. - * To build with cmake and make, first create a separate directory for the build and cd into that directory. Then: diff --git a/src/helpers/markup.cc b/src/helpers/markup.cc index be463b365..30ab86498 100644 --- a/src/helpers/markup.cc +++ b/src/helpers/markup.cc @@ -51,6 +51,7 @@ const string& Markup::emphasis(const string& s) const string& Markup::sanitize(const char* const c) { return sanitize(string(c)); } +// FIXIT-L these escapes are emitted directly by asciidoc 8.6.9. const string& Markup::sanitize(const string& s) { const char* const asciidoc_chars = "~*<>^'"; diff --git a/src/packet_io/active.cc b/src/packet_io/active.cc index 17a781685..2bdbdd9e5 100644 --- a/src/packet_io/active.cc +++ b/src/packet_io/active.cc @@ -351,6 +351,8 @@ int Active_ForceDropAction(Packet *p) case PktType::UDP: Active_DropSession(); _Active_ForceIgnoreSession(p); + default: + break; } return 0; } diff --git a/src/stream/icmp/icmp_session.cc b/src/stream/icmp/icmp_session.cc index af4f3ca5d..06cb79877 100644 --- a/src/stream/icmp/icmp_session.cc +++ b/src/stream/icmp/icmp_session.cc @@ -166,6 +166,8 @@ static int ProcessIcmpUnreach(Packet *p) /* Lookup a ICMP session */ ssn = Stream::get_session(&skey); break; + default: + break; } if (ssn) diff --git a/src/stream/ip/ip_defrag.cc b/src/stream/ip/ip_defrag.cc index a71802cb9..245cc53e5 100644 --- a/src/stream/ip/ip_defrag.cc +++ b/src/stream/ip/ip_defrag.cc @@ -1253,6 +1253,8 @@ int fragGetApplicationProtocolId(Packet *p) case PktType::ICMP: ft->ipprotocol = protocolReferenceICMP; break; + default: + break; } host_entry = SFAT_LookupHostEntryBySrc(p); diff --git a/src/stream/stream_api.cc b/src/stream/stream_api.cc index ac0c0c624..ca3f25ac6 100644 --- a/src/stream/stream_api.cc +++ b/src/stream/stream_api.cc @@ -749,6 +749,9 @@ void Stream::set_ip_protocol(Flow* flow) case PktType::ICMP: flow->s5_state.ipprotocol = protocolReferenceICMP; break; + + default: + break; } }