diff --git a/src/BroDoc.cc b/src/BroDoc.cc index ea5277bea3..4f103e4516 100644 --- a/src/BroDoc.cc +++ b/src/BroDoc.cc @@ -128,18 +128,6 @@ void BroDoc::WriteDocFile() const WriteInterface("Public Interface", '-', '~', true, false); - BroDocObjList::const_iterator it; - bool hasPrivateIdentifiers = false; - for ( it = all.begin(); it != all.end(); ++it ) - if ( ! IsPublicAPI(*it) ) - { - hasPrivateIdentifiers = true; - break; - } - - if ( hasPrivateIdentifiers ) - WriteInterface("Private Interface", '-', '~', false, false); - if ( ! port_analysis.empty() ) { WriteSectionHeading("Port Analysis", '-'); @@ -154,6 +142,18 @@ void BroDoc::WriteDocFile() const WriteToDoc("Filters added::\n\n"); WriteToDoc("%s\n", packet_filter.c_str()); } + + BroDocObjList::const_iterator it; + bool hasPrivateIdentifiers = false; + for ( it = all.begin(); it != all.end(); ++it ) + if ( ! IsPublicAPI(*it) ) + { + hasPrivateIdentifiers = true; + break; + } + + if ( hasPrivateIdentifiers ) + WriteInterface("Private Interface", '-', '~', false, false); } void BroDoc::WriteInterface(const char* heading, char underline, diff --git a/testing/btest/Baseline/doc.autogen-reST-example/example.rst b/testing/btest/Baseline/doc.autogen-reST-example/example.rst index a2851404a7..25daeb9460 100644 --- a/testing/btest/Baseline/doc.autogen-reST-example/example.rst +++ b/testing/btest/Baseline/doc.autogen-reST-example/example.rst @@ -227,6 +227,26 @@ Redefinitions document the "SimpleEnum" redef here +Port Analysis +------------- +:ref:`More Information ` + +SSL:: + + [ports={ + 443/tcp, + 563/tcp + }] + +Packet Filter +------------- +:ref:`More Information ` + +Filters added:: + + [ssl] = tcp port 443, + [nntps] = tcp port 563 + Private Interface ----------------- State Variables @@ -260,23 +280,3 @@ Functions :Type: :bro:type:`function` (tag: :bro:type:`string`) : :bro:type:`string` -Port Analysis -------------- -:ref:`More Information ` - -SSL:: - - [ports={ - 443/tcp, - 563/tcp - }] - -Packet Filter -------------- -:ref:`More Information ` - -Filters added:: - - [ssl] = tcp port 443, - [nntps] = tcp port 563 -