From: Russ Combs Date: Thu, 16 Jul 2015 12:55:22 +0000 (-0400) Subject: update documentation X-Git-Tag: 3.0.0-233~907 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dd6d2a72a30e3dab6bbb893b349676efe52fc69;p=thirdparty%2Fsnort3.git update documentation --- diff --git a/doc/extending.txt b/doc/extending.txt index 4f7bdf062..fac4165d1 100644 --- a/doc/extending.txt +++ b/doc/extending.txt @@ -322,3 +322,9 @@ Then, run the following command: The test runner will generate a check-like output, indicating the the results of each test script. + +=== Developers Guide + +Run doc/dev_guide.sh to generate /tmp/dev_guide.html, an annotated guide to +the source tree. + diff --git a/doc/start.txt b/doc/start.txt index 2c0a50996..ddb0e857a 100644 --- a/doc/start.txt +++ b/doc/start.txt @@ -41,6 +41,9 @@ Optional: * w3m from http://sourceforge.net/projects/w3m/ to build the plain text manual +* source-highlight from http://www.gnu.org/software/src-highlite/ to + generate the dev guide. + === Building diff --git a/doc/style.txt b/doc/style.txt index 4abc3cbe9..39b57cf8d 100644 --- a/doc/style.txt +++ b/doc/style.txt @@ -7,6 +7,10 @@ yet firm so feedback is welcome to get something we can live with. http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml, but there are a few differences. +* Each source directory should have a dev_notes.txt file summarizing the + key points for the code in that directory. These are built into the + developers guide. + === Naming * Use camel case for namespaces, classes, and types like WhizBangPdfChecker. @@ -42,6 +46,11 @@ yet firm so feedback is welcome to get something we can live with. * Put author, description, etc. in separate comment(s) following the license. Do not put such comments in the middle of the license foo. + Be sure to put the author line ahead of the header guard to exclude them + from the developers guide. + +* Each header should have a comment immediately after the header guard to + give an overview of the file so the user knows what's going on. === Logging @@ -90,7 +99,6 @@ yet firm so feedback is welcome to get something we can live with. the various errors anyway or needlessly and ineffectively tries to do something aobut them. - === Macros (aka defines) * In many cases, even in C++, use #define name "value" instead of a @@ -184,6 +192,8 @@ yet firm so feedback is welcome to get something we can live with. // in foo.cc #include "bar/bar.h" +* Includes within installed headers should specify parent directory. + * Just because it is a #define doesn't mean it goes in a header. Everything should be scoped as tightly as possible. Shared implementation declarations should go in a separate header from the diff --git a/src/managers/codec_manager.h b/src/managers/codec_manager.h index 6162e8e5a..b08e6bf5f 100644 --- a/src/managers/codec_manager.h +++ b/src/managers/codec_manager.h @@ -79,7 +79,7 @@ class CodecManager public: friend class PacketManager; - // global plugin initializer. Called by LUA to add register codecs + // global plugin initializer static void add_plugin(const struct CodecApi*); // instantiate a specific codec with a codec specific Module static void instantiate(const CodecApi*, Module*, SnortConfig*);