# ntop - Burton M. Strauss III - Dec2004 BEGIN { print "" print "" print "" print "" print "" print "" print "" print "" while (getline < "version.c" > 0) { if($3 == "version") { gsub(/["; ]/, "", $5) print "" } } print "ntop FAQ" print "" print "" print "" print "" print "" print "" print "

ntop FAQ...

" print "

This is an unsophisticated, automated conversion of the source file, docs/FAQ into html." print "Please report problems to the ntop-dev mailing list." print "But remember, it's not about making it look good, it's about making the content available.

" print "
" pastHeader="No" pclose="

" lines=0 allDash=0 allEquals=0 header=0 empty1=0 empty2=0 section=0 q=0 a=0 text=0 pre=0 updated=0 added=0 } { lines++ sub(/[\r\n]$/, "") } /^\-+$/ { allDash++ pastHeader="Yes" next } /^=+$/ { allEquals++ next } /^\-\-\-\-\-/ { gsub(/^\-*/, "", $0) gsub(/\-*$/, "", $0) print "

" $0 "

" next } pastHeader == "No" { header++ next } $0 == "" { empty1++ if (pclose != "") { print pclose } pclose="" next } /^ +$/ { empty2++ if (pclose != "") { print pclose } pclose="" next } /^TOP *10/ { section++ if (pclose != "") { print pclose } pclose="" print "

" $0 "

" next } /^Section/ { section++ if (pclose != "") { print pclose } pclose="" print "

" $0 "

" next } $1 == "(Added" { added++ if (pclose != "") { print pclose } pclose="" print "
" $0 "
" next } $1 == "(Updated" { updated++ if (pclose != "") { print pclose } pclose="" print "
" $0 "
" next } # /^[Qq]([0-9]*[\(\)abc]*)?\. / { /^[Qq]([0-9]*[^\.]*)?\. / { q++ if (pclose != "") { print pclose } print "
" w1 = $1 $1 = "" printf("

%s %s", w1, $0) pclose="

" next } /^[Aa]\. / { a++ if (pclose != "") { print pclose } w1 = $1 $1 = "" printf("

%s %s", w1, $0) pclose="

" next } (substr($0, 1, 3) == " " && substr($0, 4, 1) != " ") { text++ if (pclose == "") { print "

" $0 pclose="

" } else { print $0 } next } { pre++ if (pclose != "") { print pclose print "
"
        pclose="
" } print $0 next } END { if (pclose != "") { print pclose } printf("\n\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n", lines, allDash, allEquals, header, empty1, empty2, section, q, a, text, pre, updated, added, (allDash + allEquals + header + empty1 + empty2 + section + q + a + text + pre + updated + added)) print "" print "" } #Q. What is ntop? #A. ntop is an open source network top - the official website can be found at # http://www.ntop.org/