forked from osmocom/wireshark
Docs+Packaging: Convert our man pages to Asciidoctor.
Convert doc/*.pod to Asciidoctor. This: * Means we use the same markup for our man pages, the guides, and release notes. * Lets us add versions to our man pages. * Gives us more formatting options, e.g. AsciiDoc supports `commands`, nested lists and makes it easy to include version information. The manpage backend doesn't seem to support tables very well, unfortunately. Convert our CMake configuration to produce *roff and html man pages using Asciidoctor. Add a "manarg" block macro which makes our synopses wrap correctly. Similar to the release notes, guides, and FAQ, if Asciidoctor isn't found the man pages won't be generated or installed. Move Asciidoctor to the list of package build dependencies in various places. This commit includes the conversion script (pod2adoc.py), which will be removed later. Line count sanity check: Man page .pod .adoc androiddump 260 280 asn2deb 93 105 capinfos 401 471 captype 54 55 ciscodump 241 269 dftest 42 42 dpauxmon 153 169 dumpcap 464 534 editcap 528 583 etwdump 136 156 extcap 157 181 idl2deb 91 103 idl2wrs 120 100 mergecap 206 207 mmdbresolve 75 75 randpkt 107 111 randpktdump 158 184 rawshark 558 610 reordercap 76 78 sdjournal 145 157 sshdump 272 302 text2pcap 274 312 tshark 2135 2360 udpdump 133 151 wireshark-filter 486 479 wireshark 2967 3420pespin/rlcmac
parent
9f1607ab47
commit
84ab55cf75
|
@ -1345,8 +1345,6 @@ ws_find_package(WinSparkle ENABLE_WINSPARKLE HAVE_SOFTWARE_UPDATE)
|
|||
|
||||
find_package( Asciidoctor 1.5 )
|
||||
|
||||
find_package(POD REQUIRED)
|
||||
|
||||
find_package(DOXYGEN)
|
||||
|
||||
# The SpeexDSP resampler is required iff building wireshark or sharkd.
|
||||
|
@ -1939,41 +1937,45 @@ set(INSTALL_FILES
|
|||
smi_modules
|
||||
wka
|
||||
docbook/ws.css
|
||||
${CMAKE_BINARY_DIR}/doc/AUTHORS-SHORT
|
||||
${CMAKE_BINARY_DIR}/doc/androiddump.html
|
||||
${CMAKE_BINARY_DIR}/doc/udpdump.html
|
||||
${CMAKE_BINARY_DIR}/doc/capinfos.html
|
||||
${CMAKE_BINARY_DIR}/doc/captype.html
|
||||
${CMAKE_BINARY_DIR}/doc/ciscodump.html
|
||||
${CMAKE_BINARY_DIR}/doc/dftest.html
|
||||
${CMAKE_BINARY_DIR}/doc/dumpcap.html
|
||||
${CMAKE_BINARY_DIR}/doc/editcap.html
|
||||
${CMAKE_BINARY_DIR}/doc/extcap.html
|
||||
${CMAKE_BINARY_DIR}/doc/mergecap.html
|
||||
${CMAKE_BINARY_DIR}/doc/randpkt.html
|
||||
${CMAKE_BINARY_DIR}/doc/randpktdump.html
|
||||
${CMAKE_BINARY_DIR}/doc/etwdump.html
|
||||
${CMAKE_BINARY_DIR}/doc/rawshark.html
|
||||
${CMAKE_BINARY_DIR}/doc/reordercap.html
|
||||
${CMAKE_BINARY_DIR}/doc/sshdump.html
|
||||
${CMAKE_BINARY_DIR}/doc/text2pcap.html
|
||||
${CMAKE_BINARY_DIR}/doc/tshark.html
|
||||
${CMAKE_BINARY_DIR}/doc/wireshark.html
|
||||
${CMAKE_BINARY_DIR}/doc/wireshark-filter.html
|
||||
)
|
||||
|
||||
if(MAXMINDDB_FOUND)
|
||||
list(APPEND INSTALL_FILES ${CMAKE_BINARY_DIR}/doc/mmdbresolve.html)
|
||||
endif()
|
||||
|
||||
if (BUILD_corbaidl2wrs)
|
||||
list(APPEND INSTALL_FILES ${CMAKE_BINARY_DIR}/doc/idl2wrs.html)
|
||||
endif()
|
||||
if (BUILD_xxx2deb)
|
||||
if (ASCIIDOCTOR_FOUND)
|
||||
list(APPEND INSTALL_FILES
|
||||
${CMAKE_BINARY_DIR}/doc/asn2deb.html
|
||||
${CMAKE_BINARY_DIR}/doc/idl2deb.html
|
||||
${CMAKE_BINARY_DIR}/doc/AUTHORS-SHORT
|
||||
${CMAKE_BINARY_DIR}/doc/androiddump.html
|
||||
${CMAKE_BINARY_DIR}/doc/udpdump.html
|
||||
${CMAKE_BINARY_DIR}/doc/capinfos.html
|
||||
${CMAKE_BINARY_DIR}/doc/captype.html
|
||||
${CMAKE_BINARY_DIR}/doc/ciscodump.html
|
||||
${CMAKE_BINARY_DIR}/doc/dftest.html
|
||||
${CMAKE_BINARY_DIR}/doc/dumpcap.html
|
||||
${CMAKE_BINARY_DIR}/doc/editcap.html
|
||||
${CMAKE_BINARY_DIR}/doc/extcap.html
|
||||
${CMAKE_BINARY_DIR}/doc/mergecap.html
|
||||
${CMAKE_BINARY_DIR}/doc/randpkt.html
|
||||
${CMAKE_BINARY_DIR}/doc/randpktdump.html
|
||||
${CMAKE_BINARY_DIR}/doc/etwdump.html
|
||||
${CMAKE_BINARY_DIR}/doc/rawshark.html
|
||||
${CMAKE_BINARY_DIR}/doc/reordercap.html
|
||||
${CMAKE_BINARY_DIR}/doc/sshdump.html
|
||||
${CMAKE_BINARY_DIR}/doc/text2pcap.html
|
||||
${CMAKE_BINARY_DIR}/doc/tshark.html
|
||||
${CMAKE_BINARY_DIR}/doc/wireshark.html
|
||||
${CMAKE_BINARY_DIR}/doc/wireshark-filter.html
|
||||
)
|
||||
if(MAXMINDDB_FOUND)
|
||||
list(APPEND INSTALL_FILES ${CMAKE_BINARY_DIR}/doc/mmdbresolve.html)
|
||||
endif()
|
||||
|
||||
if (BUILD_corbaidl2wrs)
|
||||
list(APPEND INSTALL_FILES ${CMAKE_BINARY_DIR}/doc/idl2wrs.html)
|
||||
endif()
|
||||
if (BUILD_xxx2deb)
|
||||
list(APPEND INSTALL_FILES
|
||||
${CMAKE_BINARY_DIR}/doc/asn2deb.html
|
||||
${CMAKE_BINARY_DIR}/doc/idl2deb.html
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
|
|
|
@ -39,12 +39,14 @@ if(ASCIIDOCTOR_EXECUTABLE)
|
|||
set (_asciidoctor_common_args
|
||||
# Doesn't work with AsciidoctorJ?
|
||||
# --failure-level=WARN
|
||||
# --trace
|
||||
--attribute build_dir=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--require ${CMAKE_CURRENT_SOURCE_DIR}/asciidoctor-macros/ws_utils.rb
|
||||
--require ${CMAKE_CURRENT_SOURCE_DIR}/asciidoctor-macros/commaize-block.rb
|
||||
--require ${CMAKE_CURRENT_SOURCE_DIR}/asciidoctor-macros/cveidlink-inline-macro.rb
|
||||
--require ${CMAKE_CURRENT_SOURCE_DIR}/asciidoctor-macros/wsbuglink-inline-macro.rb
|
||||
--require ${CMAKE_CURRENT_SOURCE_DIR}/asciidoctor-macros/wssalink-inline-macro.rb
|
||||
--require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/ws_utils.rb
|
||||
--require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/commaize-block.rb
|
||||
--require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/cveidlink-inline-macro.rb
|
||||
--require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/manarg-block.rb
|
||||
--require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/wsbuglink-inline-macro.rb
|
||||
--require ${CMAKE_SOURCE_DIR}/docbook/asciidoctor-macros/wssalink-inline-macro.rb
|
||||
)
|
||||
|
||||
set(_asciidoctor_common_command
|
||||
|
@ -83,7 +85,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
|
|||
unset(_output_xml)
|
||||
ENDMACRO()
|
||||
|
||||
# Currently single page only.
|
||||
# Single page only, for the release notes and man pages.
|
||||
MACRO( ASCIIDOCTOR2HTML _asciidocsource )
|
||||
GET_FILENAME_COMPONENT( _source_base_name ${_asciidocsource} NAME_WE )
|
||||
set( _output_html ${_source_base_name}.html )
|
||||
|
@ -124,6 +126,27 @@ if(ASCIIDOCTOR_EXECUTABLE)
|
|||
unset(_output_txt)
|
||||
ENDMACRO()
|
||||
|
||||
# Single page only, for the release notes and man pages.
|
||||
MACRO( ASCIIDOCTOR2MAN _asciidocsource _man_section)
|
||||
GET_FILENAME_COMPONENT( _source_base_name ${_asciidocsource} NAME_WE )
|
||||
set( _output_man ${_source_base_name}.${_man_section} )
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT
|
||||
${_output_man}
|
||||
COMMAND ${_asciidoctor_common_command}
|
||||
--backend manpage
|
||||
--out-file ${_output_man}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
|
||||
${ARGN}
|
||||
)
|
||||
add_custom_target(generate_${_output_man} DEPENDS ${_output_man})
|
||||
set_asciidoctor_target_properties(generate_${_output_man})
|
||||
unset(_output_man)
|
||||
ENDMACRO()
|
||||
|
||||
# news: release-notes.txt
|
||||
# ${CMAKE_COMMAND} -E copy_if_different release-notes.txt ../NEWS
|
||||
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
#
|
||||
# - Find pod2man and pod2html.
|
||||
#
|
||||
|
||||
find_program(POD2MAN_EXECUTABLE
|
||||
NAMES
|
||||
pod2man
|
||||
pod2man.bat
|
||||
PATHS
|
||||
/bin
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
/sbin
|
||||
)
|
||||
|
||||
find_program(POD2HTML_EXECUTABLE
|
||||
NAMES
|
||||
pod2html
|
||||
pod2html.bat
|
||||
PATHS
|
||||
/bin
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
/sbin
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set POD2HTML_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(POD DEFAULT_MSG POD2MAN_EXECUTABLE POD2HTML_EXECUTABLE)
|
||||
|
||||
mark_as_advanced(
|
||||
POD2MAN_EXECUTABLE
|
||||
POD2HTML_EXECUTABLE
|
||||
)
|
||||
|
||||
# run pod2man and pod2html
|
||||
macro(pod2manhtml _sourcefile _manext)
|
||||
get_filename_component(_basefile ${_sourcefile} NAME)
|
||||
set(_outman ${_basefile}.${_manext})
|
||||
set(_outhtml ${_basefile}.html)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${_outman}
|
||||
COMMAND
|
||||
${PERL_EXECUTABLE} ${POD2MAN_EXECUTABLE}
|
||||
--section=${_manext}
|
||||
--center=\"The Wireshark Network Analyzer\"
|
||||
--release=${PROJECT_VERSION}
|
||||
${_sourcefile}.pod
|
||||
> ${_outman}
|
||||
DEPENDS
|
||||
${_sourcefile}.pod
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${_outhtml}
|
||||
COMMAND
|
||||
${PERL_EXECUTABLE} ${POD2HTML_EXECUTABLE}
|
||||
--title=\"${_basefile} - The Wireshark Network Analyzer ${CPACK_PACKAGE_VERSION}\"
|
||||
--css=ws.css
|
||||
--noindex
|
||||
${_sourcefile}.pod
|
||||
> ${_outhtml}
|
||||
DEPENDS
|
||||
${_sourcefile}.pod
|
||||
${CMAKE_SOURCE_DIR}/docbook/ws.css
|
||||
)
|
||||
endmacro(pod2manhtml)
|
||||
|
||||
#
|
||||
# Editor modelines - https://www.wireshark.org/tools/modelines.html
|
||||
#
|
||||
# Local variables:
|
||||
# c-basic-offset: 8
|
||||
# tab-width: 8
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
#
|
||||
# vi: set shiftwidth=8 tabstop=8 noexpandtab:
|
||||
# :indentSize=8:tabSize=8:noTabs=false:
|
||||
#
|
|
@ -7,6 +7,8 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
|
||||
find_package( Asciidoctor 1.5 )
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT AUTHORS-SHORT
|
||||
COMMAND ${PERL_EXECUTABLE}
|
||||
|
@ -18,98 +20,69 @@ add_custom_command(
|
|||
${CMAKE_SOURCE_DIR}/AUTHORS
|
||||
)
|
||||
|
||||
set(MAN1_INSTALL_FILES)
|
||||
set(MAN4_INSTALL_FILES)
|
||||
set(HTML_INSTALL_FILES)
|
||||
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/wireshark 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/androiddump 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/capinfos 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/captype 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/ciscodump 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/dftest 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/dumpcap 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/editcap 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/mergecap 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/randpkt 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/randpktdump 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/etwdump 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/rawshark 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/reordercap 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/sshdump 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/text2pcap 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/tshark 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/udpdump 1)
|
||||
macro (ASCIIDOCTOR2MANHTML _page_name _man_section)
|
||||
if(ASCIIDOCTOR_FOUND)
|
||||
ASCIIDOCTOR2HTML(${_page_name}.adoc)
|
||||
ASCIIDOCTOR2MAN(${_page_name}.adoc ${_man_section})
|
||||
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/extcap 4)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/wireshark-filter 4)
|
||||
list(APPEND HTML_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_page_name}.html)
|
||||
if (${_man_section} EQUAL 1)
|
||||
list(APPEND MAN1_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_page_name}.${_man_section})
|
||||
elseif (${_man_section} EQUAL 4)
|
||||
list(APPEND MAN4_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_page_name}.${_man_section})
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported manual page section ${_man_section} for ${_page_name}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
ASCIIDOCTOR2MANHTML(wireshark 1)
|
||||
ASCIIDOCTOR2MANHTML(androiddump 1)
|
||||
ASCIIDOCTOR2MANHTML(capinfos 1)
|
||||
ASCIIDOCTOR2MANHTML(captype 1)
|
||||
ASCIIDOCTOR2MANHTML(ciscodump 1)
|
||||
ASCIIDOCTOR2MANHTML(dftest 1)
|
||||
ASCIIDOCTOR2MANHTML(dumpcap 1)
|
||||
ASCIIDOCTOR2MANHTML(editcap 1)
|
||||
ASCIIDOCTOR2MANHTML(mergecap 1)
|
||||
ASCIIDOCTOR2MANHTML(randpkt 1)
|
||||
ASCIIDOCTOR2MANHTML(randpktdump 1)
|
||||
ASCIIDOCTOR2MANHTML(etwdump 1)
|
||||
ASCIIDOCTOR2MANHTML(rawshark 1)
|
||||
ASCIIDOCTOR2MANHTML(reordercap 1)
|
||||
ASCIIDOCTOR2MANHTML(sshdump 1)
|
||||
ASCIIDOCTOR2MANHTML(text2pcap 1)
|
||||
ASCIIDOCTOR2MANHTML(tshark 1)
|
||||
ASCIIDOCTOR2MANHTML(udpdump 1)
|
||||
|
||||
ASCIIDOCTOR2MANHTML(extcap 4)
|
||||
ASCIIDOCTOR2MANHTML(wireshark-filter 4)
|
||||
|
||||
if(BUILD_dpauxmon AND HAVE_LIBNL3)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/dpauxmon 1)
|
||||
ASCIIDOCTOR2MANHTML(dpauxmon 1)
|
||||
endif()
|
||||
|
||||
if(BUILD_sdjournal AND SYSTEMD_FOUND)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/sdjournal 1)
|
||||
ASCIIDOCTOR2MANHTML(sdjournal 1)
|
||||
endif()
|
||||
|
||||
if(MAXMINDDB_FOUND)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/mmdbresolve 1)
|
||||
ASCIIDOCTOR2MANHTML(mmdbresolve 1)
|
||||
endif()
|
||||
|
||||
if (BUILD_corbaidl2wrs)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/idl2wrs 1)
|
||||
ASCIIDOCTOR2MANHTML(idl2wrs 1)
|
||||
endif()
|
||||
|
||||
if (BUILD_xxx2deb)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/asn2deb 1)
|
||||
pod2manhtml(${CMAKE_CURRENT_SOURCE_DIR}/idl2deb 1)
|
||||
ASCIIDOCTOR2MANHTML(asn2deb 1)
|
||||
ASCIIDOCTOR2MANHTML(idl2deb 1)
|
||||
endif()
|
||||
|
||||
set(MAN1_INSTALL_FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/androiddump.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/capinfos.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/captype.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ciscodump.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ciscodump.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/dftest.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/dumpcap.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/editcap.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/mergecap.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/randpkt.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/randpktdump.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/etwdump.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rawshark.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/reordercap.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sshdump.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/text2pcap.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tshark.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/udpdump.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/wireshark.1
|
||||
)
|
||||
|
||||
if(BUILD_dpauxmon AND HAVE_LIBNL3)
|
||||
list(APPEND MAN1_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/dpauxmon.1)
|
||||
endif()
|
||||
|
||||
if(BUILD_sdjournal AND SYSTEMD_FOUND)
|
||||
list(APPEND MAN1_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/sdjournal.1)
|
||||
endif()
|
||||
|
||||
if(MAXMINDDB_FOUND)
|
||||
list(APPEND MAN1_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/mmdbresolve.1)
|
||||
endif()
|
||||
|
||||
if (BUILD_corbaidl2wrs)
|
||||
list(APPEND MAN1_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/idl2wrs.1)
|
||||
endif()
|
||||
if (BUILD_xxx2deb)
|
||||
list(APPEND MAN1_INSTALL_FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/asn2deb.1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/idl2deb.1
|
||||
)
|
||||
endif()
|
||||
|
||||
set(MAN4_INSTALL_FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/extcap.4
|
||||
${CMAKE_CURRENT_BINARY_DIR}/wireshark-filter.4
|
||||
)
|
||||
|
||||
set(BUNDLE_RESOURCE_SHARE_MAN1_FILES ${MAN1_INSTALL_FILES} PARENT_SCOPE)
|
||||
set(BUNDLE_RESOURCE_SHARE_MAN4_FILES ${MAN4_INSTALL_FILES} PARENT_SCOPE)
|
||||
|
||||
|
@ -118,52 +91,6 @@ add_custom_target(manpages DEPENDS
|
|||
${MAN4_INSTALL_FILES}
|
||||
)
|
||||
|
||||
set(HTML_INSTALL_FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/androiddump.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/capinfos.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/captype.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ciscodump.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ciscodump.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/dftest.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/dumpcap.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/editcap.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/extcap.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/mergecap.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/randpkt.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/randpktdump.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/etwdump.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rawshark.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/reordercap.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sshdump.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/text2pcap.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tshark.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/udpdump.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/wireshark-filter.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/wireshark.html
|
||||
)
|
||||
|
||||
if(BUILD_dpauxmon AND HAVE_LIBNL3)
|
||||
list(APPEND HTML_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/dpauxmon.html)
|
||||
endif()
|
||||
|
||||
if(BUILD_sdjournal AND SYSTEMD_FOUND)
|
||||
list(APPEND HTML_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/sdjournal.html)
|
||||
endif()
|
||||
|
||||
if(MAXMINDDB_FOUND)
|
||||
list(APPEND HTML_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/mmdbresolve.html)
|
||||
endif()
|
||||
|
||||
if (BUILD_corbaidl2wrs)
|
||||
list(APPEND HTML_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/idl2wrs.html)
|
||||
endif()
|
||||
if (BUILD_xxx2deb)
|
||||
list(APPEND HTML_INSTALL_FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/asn2deb.html
|
||||
${CMAKE_CURRENT_BINARY_DIR}/idl2deb.html
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_target(
|
||||
docs ALL
|
||||
DEPENDS
|
||||
|
@ -174,19 +101,21 @@ add_custom_target(
|
|||
)
|
||||
set_target_properties(docs PROPERTIES FOLDER "Docs")
|
||||
|
||||
install(
|
||||
FILES
|
||||
${MAN1_INSTALL_FILES}
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_MANDIR}/man1
|
||||
)
|
||||
if(ASCIIDOCTOR_FOUND)
|
||||
install(
|
||||
FILES
|
||||
${MAN1_INSTALL_FILES}
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_MANDIR}/man1
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
${MAN4_INSTALL_FILES}
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_MANDIR}/man4
|
||||
)
|
||||
install(
|
||||
FILES
|
||||
${MAN4_INSTALL_FILES}
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_MANDIR}/man4
|
||||
)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Installation of HTML manuals is done
|
||||
|
|
|
@ -1,55 +1,61 @@
|
|||
=begin man
|
||||
= androiddump(1)
|
||||
:doctype: manpage
|
||||
include::../docbook/attributes.adoc[]
|
||||
:stylesheet: ws.css
|
||||
:linkcss:
|
||||
:copycss: ../docbook/{stylesheet}
|
||||
|
||||
=encoding utf8
|
||||
|
||||
=end man
|
||||
|
||||
=head1 NAME
|
||||
== NAME
|
||||
|
||||
androiddump - Provide interfaces to capture from Android devices
|
||||
|
||||
=head1 SYNOPSIS
|
||||
== SYNOPSIS
|
||||
|
||||
B<androiddump>
|
||||
S<[ B<--help> ]>
|
||||
S<[ B<--version> ]>
|
||||
S<[ B<--extcap-version> ]>
|
||||
S<[ B<--debug> ]>
|
||||
S<[ B<--extcap-interfaces> ]>
|
||||
S<[ B<--extcap-dlts> ]>
|
||||
S<[ B<--extcap-interface>=E<lt>interfaceE<gt> ]>
|
||||
S<[ B<--extcap-config> ]>
|
||||
S<[ B<--capture> ]>
|
||||
S<[ B<--fifo>=E<lt>path to file or pipeE<gt> ]>
|
||||
S<[ B<--adb-server-ip>=E<lt>IP addressE<gt> ]>
|
||||
S<[ B<--adb-server-tcp-port>=E<lt>TCP portE<gt> ]>
|
||||
S<[ B<--logcat-text>=E<lt>TRUE or FALSEE<gt> ]>
|
||||
S<[ B<--bt-server-tcp-port>=E<lt>TCP portE<gt> ]>
|
||||
S<[ B<--bt-forward-socket>=E<lt>TRUE or FALSEE<gt> ]>
|
||||
S<[ B<--bt-local-ip>=E<lt>IP addressE<gt> ]>
|
||||
S<[ B<--bt-local-tcp-port>=E<lt>TCP portE<gt> ]>
|
||||
[manarg]
|
||||
*androiddump*
|
||||
[ *--help* ]
|
||||
[ *--version* ]
|
||||
[ *--extcap-version* ]
|
||||
[ *--debug* ]
|
||||
[ *--extcap-interfaces* ]
|
||||
[ *--extcap-dlts* ]
|
||||
[ *--extcap-interface*=<interface> ]
|
||||
[ *--extcap-config* ]
|
||||
[ *--capture* ]
|
||||
[ *--fifo*=<path to file or pipe> ]
|
||||
[ *--adb-server-ip*=<IP address> ]
|
||||
[ *--adb-server-tcp-port*=<TCP port> ]
|
||||
[ *--logcat-text*=<TRUE or FALSE> ]
|
||||
[ *--bt-server-tcp-port*=<TCP port> ]
|
||||
[ *--bt-forward-socket*=<TRUE or FALSE> ]
|
||||
[ *--bt-local-ip*=<IP address> ]
|
||||
[ *--bt-local-tcp-port*=<TCP port> ]
|
||||
|
||||
B<androiddump>
|
||||
S< B<--extcap-interfaces> >
|
||||
S<[ B<--adb-server-ip>=E<lt>IP addressE<gt> ]>
|
||||
S<[ B<--adb-server-tcp-port>=E<lt>TCP portE<gt> ]>
|
||||
[manarg]
|
||||
*androiddump*
|
||||
*--extcap-interfaces*
|
||||
[ *--adb-server-ip*=<IP address> ]
|
||||
[ *--adb-server-tcp-port*=<TCP port> ]
|
||||
|
||||
B<androiddump>
|
||||
S< B<--extcap-interface>=E<lt>interfaceE<gt> >
|
||||
S<[ B<--extcap-dlts> ]>
|
||||
[manarg]
|
||||
*androiddump*
|
||||
*--extcap-interface*=<interface>
|
||||
[ *--extcap-dlts* ]
|
||||
|
||||
B<androiddump>
|
||||
S< B<--extcap-interface>=E<lt>interfaceE<gt> >
|
||||
S<[ B<--extcap-config> ]>
|
||||
[manarg]
|
||||
*androiddump*
|
||||
*--extcap-interface*=<interface>
|
||||
[ *--extcap-config* ]
|
||||
|
||||
B<androiddump>
|
||||
S< B<--extcap-interface>=E<lt>interfaceE<gt> >
|
||||
S< B<--fifo>=E<lt>path to file or pipeE<gt> >
|
||||
S< B<--capture> >
|
||||
[manarg]
|
||||
*androiddump*
|
||||
*--extcap-interface*=<interface>
|
||||
*--fifo*=<path to file or pipe>
|
||||
*--capture*
|
||||
|
||||
=head1 DESCRIPTION
|
||||
== DESCRIPTION
|
||||
|
||||
B<Androiddump> is a extcap tool that provide interfaces to capture from
|
||||
*Androiddump* is a extcap tool that provide interfaces to capture from
|
||||
Android device. There is only two requirements:
|
||||
|
||||
1. You must have Android SDK and add it PATH environment variable.
|
||||
|
@ -60,115 +66,132 @@ https://developer.android.com/sdk/index.html#Other
|
|||
2. You must have permission to Android devices. Some Android devices requires
|
||||
on-screen authentication.
|
||||
|
||||
|
||||
Supported interfaces:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 1. Logcat Main (binary [<=Jelly Bean] or text)
|
||||
|
||||
=item 2. Logcat System (binary [<=Jelly Bean] or text)
|
||||
|
||||
=item 3. Logcat Events (binary [<=Jelly Bean] or text)
|
||||
|
||||
=item 4. Logcat Radio (binary [<=Jelly Bean] or text)
|
||||
|
||||
=item 5. Logcat Crash (text; from Lollipop)
|
||||
|
||||
=item 6. Bluetooth Hcidump [<=Jelly Bean]
|
||||
|
||||
=item 7. Bluetooth Bluedroid External Parser [Kitkat]
|
||||
|
||||
=item 8. Bluetooth BtsnoopNet [>=Lollipop]
|
||||
|
||||
=item 9. WiFi tcpdump [need tcpdump on phone]
|
||||
|
||||
=back
|
||||
1. Logcat Main (binary [++<=++Jelly Bean] or text)
|
||||
2. Logcat System (binary [++<=++Jelly Bean] or text)
|
||||
3. Logcat Events (binary [++<=++Jelly Bean] or text)
|
||||
4. Logcat Radio (binary [++<=++Jelly Bean] or text)
|
||||
5. Logcat Crash (text; from Lollipop)
|
||||
6. Bluetooth Hcidump [++<=++Jelly Bean]
|
||||
7. Bluetooth Bluedroid External Parser [Kitkat]
|
||||
8. Bluetooth BtsnoopNet [>=Lollipop]
|
||||
9. WiFi tcpdump [need tcpdump on phone]
|
||||
|
||||
Please note that it will work also for FirefoxOS or other Android-based stuffs.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item --help
|
||||
== OPTIONS
|
||||
|
||||
--help::
|
||||
+
|
||||
--
|
||||
Print program arguments.
|
||||
--
|
||||
|
||||
=item --version
|
||||
|
||||
--version::
|
||||
+
|
||||
--
|
||||
Print program version.
|
||||
--
|
||||
|
||||
=item --extcap-version
|
||||
|
||||
--extcap-version::
|
||||
+
|
||||
--
|
||||
Print extcapized version.
|
||||
--
|
||||
|
||||
=item --debug
|
||||
|
||||
--debug::
|
||||
+
|
||||
--
|
||||
Print additional messages.
|
||||
--
|
||||
|
||||
=item --extcap-interfaces
|
||||
|
||||
--extcap-interfaces::
|
||||
+
|
||||
--
|
||||
List available interfaces.
|
||||
--
|
||||
|
||||
=item --extcap-interface=E<lt>interfaceE<gt>
|
||||
|
||||
--extcap-interface=<interface>::
|
||||
+
|
||||
--
|
||||
Use specified interfaces.
|
||||
--
|
||||
|
||||
=item --extcap-dlts
|
||||
|
||||
--extcap-dlts::
|
||||
+
|
||||
--
|
||||
List DLTs of specified interface.
|
||||
--
|
||||
|
||||
=item --extcap-config
|
||||
|
||||
--extcap-config::
|
||||
+
|
||||
--
|
||||
List configuration options of specified interface.
|
||||
--
|
||||
|
||||
=item --capture
|
||||
|
||||
--capture::
|
||||
+
|
||||
--
|
||||
Start capturing from specified interface save saved it in place specified by --fifo.
|
||||
--
|
||||
|
||||
=item --fifo=E<lt>path to file or pipeE<gt>
|
||||
|
||||
--fifo=<path to file or pipe>::
|
||||
+
|
||||
--
|
||||
Save captured packet to file or send it through pipe.
|
||||
--
|
||||
|
||||
=item --adb-server-ip=E<lt>IP addressE<gt>
|
||||
|
||||
--adb-server-ip=<IP address>::
|
||||
+
|
||||
--
|
||||
Use other then default (127.0.0.1) ADB daemon's IP address.
|
||||
--
|
||||
|
||||
=item --adb-server-tcp-port=E<lt>TCP portE<gt>
|
||||
|
||||
--adb-server-tcp-port=<TCP port>::
|
||||
+
|
||||
--
|
||||
Use other then default (5037) ADB daemon's TCP port.
|
||||
--
|
||||
|
||||
=item --logcat-text=E<lt>TRUE or FALSEE<gt>
|
||||
|
||||
--logcat-text=<TRUE or FALSE>::
|
||||
+
|
||||
--
|
||||
If TRUE then use text logcat rather then binary. This option has effect only on
|
||||
Logcat interfaces. This have no effect from Lollipop where is no binary Logcat
|
||||
available.
|
||||
|
||||
Defaults to FALSE.
|
||||
--
|
||||
|
||||
=item --bt-server-tcp-port=E<lt>TCP portE<gt>
|
||||
|
||||
--bt-server-tcp-port=<TCP port>::
|
||||
+
|
||||
--
|
||||
Use other then default Bluetooth server TCP port on Android side.
|
||||
On Lollipop defaults is 8872, earlier 4330.
|
||||
--
|
||||
|
||||
=item --bt-forward-socket=E<lt>TRUE or FALSEE<gt>
|
||||
|
||||
--bt-forward-socket=<TRUE or FALSE>::
|
||||
+
|
||||
--
|
||||
If TRUE then socket from Android side is forwarded to host side.
|
||||
|
||||
Defaults to FALSE.
|
||||
--
|
||||
|
||||
=item --bt-local-ip=E<lt>IP addressE<gt>
|
||||
|
||||
--bt-local-ip=<IP address>::
|
||||
+
|
||||
--
|
||||
Use other then default (127.0.0.1) IP address on host side for forwarded socket.
|
||||
--
|
||||
|
||||
=item --bt-local-tcp-port=E<lt>TCP portE<gt>
|
||||
|
||||
--bt-local-tcp-port=<TCP port>::
|
||||
+
|
||||
--
|
||||
Specify port to be used on host side for forwarded socket.
|
||||
--
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLES
|
||||
== EXAMPLES
|
||||
|
||||
To see program arguments:
|
||||
|
||||
|
@ -220,7 +243,6 @@ To see interface DLTs:
|
|||
Example output:
|
||||
dlt {number=99}{name=BluetoothH4}{display=Bluetooth HCI UART transport layer plus pseudo-header}
|
||||
|
||||
|
||||
To see interface configuration options:
|
||||
|
||||
androiddump --extcap-interface=android-bluetooth-hcidump-MSM7627A --extcap-config
|
||||
|
@ -229,32 +251,30 @@ To see interface configuration options:
|
|||
arg {number=0}{call=--adb-server-ip}{display=ADB Server IP Address}{type=string}{default=127.0.0.1}
|
||||
arg {number=1}{call=--adb-server-tcp-port}{display=ADB Server TCP Port}{type=integer}{range=0,65535}{default=5037}
|
||||
|
||||
|
||||
To capture:
|
||||
|
||||
androiddump --extcap-interface=android-bluetooth-hcidump-MSM7627A --fifo=/tmp/bluetooth.pcapng --capture
|
||||
|
||||
NOTE: To stop capturing CTRL+C/kill/terminate application.
|
||||
|
||||
=head1 SEE ALSO
|
||||
== SEE ALSO
|
||||
|
||||
wireshark(1), tshark(1), dumpcap(1), extcap(4)
|
||||
xref:wireshark.html[wireshark](1), xref:tshark.html[tshark](1), xref:dumpcap.html[dumpcap](1), xref:extcap.html[extcap](4)
|
||||
|
||||
=head1 NOTES
|
||||
== NOTES
|
||||
|
||||
B<Androiddump> is part of the B<Wireshark> distribution. The latest version
|
||||
of B<Wireshark> can be found at L<https://www.wireshark.org>.
|
||||
*Androiddump* is part of the *Wireshark* distribution. The latest version
|
||||
of *Wireshark* can be found at https://www.wireshark.org.
|
||||
|
||||
HTML versions of the Wireshark project man pages are available at:
|
||||
L<https://www.wireshark.org/docs/man-pages>.
|
||||
https://www.wireshark.org/docs/man-pages.
|
||||
|
||||
=head1 AUTHORS
|
||||
== AUTHORS
|
||||
|
||||
Original Author
|
||||
-------- ------
|
||||
Michal Labedzki <michal.labedzki[AT]tieto.com>
|
||||
.Original Author
|
||||
[%hardbreaks]
|
||||
Michal Labedzki <michal.labedzki[AT]tieto.com>
|
||||
|
||||
|
||||
Contributors
|
||||
------------
|
||||
Roland Knall <rknall[AT]gmail.com>
|
||||
.Contributors
|
||||
[%hardbreaks]
|
||||
Roland Knall <rknall[AT]gmail.com>
|
||||
|
|
114
doc/asn2deb.adoc
114
doc/asn2deb.adoc
|
@ -1,82 +1,94 @@
|
|||
=begin man
|
||||
= asn2deb(1)
|
||||
:doctype: manpage
|
||||
include::../docbook/attributes.adoc[]
|
||||
:stylesheet: ws.css
|
||||
:linkcss:
|
||||
:copycss: ../docbook/{stylesheet}
|
||||
|
||||
=encoding utf8
|
||||
|
||||
=end man
|
||||
|
||||
=head1 NAME
|
||||
== NAME
|
||||
|
||||
asn2deb - Create a Debian package for BER monitoring from ASN.1
|
||||
|
||||
=head1 SYNOPSIS
|
||||
== SYNOPSIS
|
||||
|
||||
B<asn2deb>
|
||||
S<[ B<-a> E<lt>ASN.1 fileE<gt> ]>
|
||||
S<[ B<--asn>=E<lt>ASN.1 fileE<gt> ]>
|
||||
S<[ B<-d> E<lt>optsE<gt> ]>
|
||||
S<[ B<--dbopts>=E<lt>optsE<gt> ]>
|
||||
S<[ B<-e> E<lt>addressE<gt> ]>
|
||||
S<[ B<--email>=E<lt>addressE<gt> ]>
|
||||
S<[ B<-h> ]>
|
||||
S<[ B<--help> ]>
|
||||
S<[ B<-n> E<lt>nameE<gt> ]>
|
||||
S<[ B<--name>=E<lt>nameE<gt> ]>
|
||||
S<[ B<-p> ]>
|
||||
S<[ B<--preserve> ]>
|
||||
S<[ B<-v> ]>
|
||||
S<[ B<--version> ]>
|
||||
[manarg]
|
||||
*asn2deb*
|
||||
[ *-a* <ASN.1 file> ]
|
||||
[ *--asn*=<ASN.1 file> ]
|
||||
[ *-d* <opts> ]
|
||||
[ *--dbopts*=<opts> ]
|
||||
[ *-e* <address> ]
|
||||
[ *--email*=<address> ]
|
||||
[ *-h* ]
|
||||
[ *--help* ]
|
||||
[ *-n* <name> ]
|
||||
[ *--name*=<name> ]
|
||||
[ *-p* ]
|
||||
[ *--preserve* ]
|
||||
[ *-v* ]
|
||||
[ *--version* ]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
== DESCRIPTION
|
||||
|
||||
This manual page documents briefly the B<asn2deb> command. B<asn2deb>
|
||||
This manual page documents briefly the *asn2deb* command. *asn2deb*
|
||||
takes an ASN.1 file as input and creates a Debian package from it. The package
|
||||
contains a loadable type table file for the Wireshark network analyser.
|
||||
The type table is generated by the ASN.1 compiler B<snacc>.
|
||||
The type table is generated by the ASN.1 compiler *snacc*.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item -a E<lt>ASN.1 fileE<gt> --asn=E<lt>ASN.1 fileE<gt>
|
||||
== OPTIONS
|
||||
|
||||
-a <ASN.1 file> --asn=<ASN.1 file>::
|
||||
+
|
||||
--
|
||||
ASN.1 file to use (mandatory).
|
||||
--
|
||||
|
||||
=item -d E<lt>optsE<gt> --dbopts=E<lt>optsE<gt>
|
||||
|
||||
-d <opts> --dbopts=<opts>::
|
||||
+
|
||||
--
|
||||
options for dpkg-buildpackage.
|
||||
--
|
||||
|
||||
=item -e E<lt>addressE<gt> --email=E<lt>addressE<gt>
|
||||
|
||||
-e <address> --email=<address>::
|
||||
+
|
||||
--
|
||||
use e-mail address.
|
||||
--
|
||||
|
||||
=item -h --help
|
||||
|
||||
-h --help::
|
||||
+
|
||||
--
|
||||
print help and exit.
|
||||
--
|
||||
|
||||
=item -n E<lt>nameE<gt> --name=E<lt>nameE<gt>
|
||||
|
||||
-n <name> --name=<name>::
|
||||
+
|
||||
--
|
||||
use user name.
|
||||
--
|
||||
|
||||
=item -p --preserve
|
||||
|
||||
-p --preserve::
|
||||
+
|
||||
--
|
||||
do not overwrite files.
|
||||
--
|
||||
|
||||
=item -v --version
|
||||
|
||||
-v --version::
|
||||
+
|
||||
--
|
||||
print version and exit.
|
||||
--
|
||||
|
||||
=back
|
||||
|
||||
=head1 EXAMPLES
|
||||
== EXAMPLES
|
||||
|
||||
/usr/bin/asn2deb -e me@foo.net -a bar.asn1 \-n "My Name" -d "-rfakeroot -uc -us"-d "-rfakeroot -uc -us"
|
||||
|
||||
=head1 SEE ALSO
|
||||
== SEE ALSO
|
||||
|
||||
A lot of tools are used, which you have to B<apt-get install>: wireshark-dev, python, cdbs, autotools-dev, debhelper, dpkg-dev,
|
||||
A lot of tools are used, which you have to *apt-get install*: wireshark-dev, python, cdbs, autotools-dev, debhelper, dpkg-dev,
|
||||
snacc.
|
||||
|
||||
=head1 COPYING
|
||||
== COPYING
|
||||
|
||||
This manual page was written by W. Borgert debacle@debian.org
|
||||
for Debian GNU/Linux (but may be used by others). Permission is granted
|
||||
|
@ -84,10 +96,10 @@ to copy, distribute and/or modify this document under the terms of the
|
|||
GNU General Public License, Version 2 or any later version published by
|
||||
the Free Software Foundation.
|
||||
|
||||
=head1 AUTHOR
|
||||
== AUTHOR
|
||||
|
||||
B<W. Borgert> Author.
|
||||
*W. Borgert* Author.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
== COPYRIGHT
|
||||
|
||||
Copyright (C) 2003, 2005 W. Borger
|
||||
|
|
|
@ -1,60 +1,62 @@
|
|||
=begin man
|
||||
= capinfos(1)
|
||||
:doctype: manpage
|
||||
include::../docbook/attributes.adoc[]
|
||||
:stylesheet: ws.css
|
||||
:linkcss:
|
||||
:copycss: ../docbook/{stylesheet}
|
||||
|
||||
=encoding utf8
|
||||
|
||||
=end man
|
||||
|
||||
=head1 NAME
|
||||
== NAME
|
||||
|
||||
capinfos - Prints information about capture files
|
||||
|
||||
=head1 SYNOPSIS
|
||||
== SYNOPSIS
|
||||
|
||||
B<capinfos>
|
||||
S<[ B<-a> ]>
|
||||
S<[ B<-A> ]>
|
||||
S<[ B<-b> ]>
|
||||
S<[ B<-B> ]>
|
||||
S<[ B<-c> ]>
|
||||
S<[ B<-C> ]>
|
||||
S<[ B<-d> ]>
|
||||
S<[ B<-D> ]>
|
||||
S<[ B<-e> ]>
|
||||
S<[ B<-E> ]>
|
||||
S<[ B<-F> ]>
|
||||
S<[ B<-h> ]>
|
||||
S<[ B<-H> ]>
|
||||
S<[ B<-i> ]>
|
||||
S<[ B<-I> ]>
|
||||
S<[ B<-k> ]>
|
||||
S<[ B<-K> ]>
|
||||
S<[ B<-l> ]>
|
||||
S<[ B<-L> ]>
|
||||
S<[ B<-m> ]>
|
||||
S<[ B<-M> ]>
|
||||
S<[ B<-n> ]>
|
||||
S<[ B<-N> ]>
|
||||
S<[ B<-o> ]>
|
||||
S<[ B<-q> ]>
|
||||
S<[ B<-Q> ]>
|
||||
S<[ B<-r> ]>
|
||||
S<[ B<-R> ]>
|
||||
S<[ B<-s> ]>
|
||||
S<[ B<-S> ]>
|
||||
S<[ B<-t> ]>
|
||||
S<[ B<-T> ]>
|
||||
S<[ B<-u> ]>
|
||||
S<[ B<-v> ]>
|
||||
S<[ B<-x> ]>
|
||||
S<[ B<-y> ]>
|
||||
S<[ B<-z> ]>
|
||||
E<lt>I<infile>E<gt>
|
||||
I<...>
|
||||
[manarg]
|
||||
*capinfos*
|
||||
[ *-a* ]
|
||||
[ *-A* ]
|
||||
[ *-b* ]
|
||||
[ *-B* ]
|
||||
[ *-c* ]
|
||||
[ *-C* ]
|
||||
[ *-d* ]
|
||||
[ *-D* ]
|
||||
[ *-e* ]
|
||||
[ *-E* ]
|
||||
[ *-F* ]
|
||||
[ *-h* ]
|
||||
[ *-H* ]
|
||||
[ *-i* ]
|
||||
[ *-I* ]
|
||||
[ *-k* ]
|
||||
[ *-K* ]
|
||||
[ *-l* ]
|
||||
[ *-L* ]
|
||||
[ *-m* ]
|
||||
[ *-M* ]
|
||||
[ *-n* ]
|
||||
[ *-N* ]
|
||||
[ *-o* ]
|
||||
[ *-q* ]
|
||||
[ *-Q* ]
|
||||
[ *-r* ]
|
||||
[ *-R* ]
|
||||
[ *-s* ]
|
||||
[ *-S* ]
|
||||
[ *-t* ]
|
||||
[ *-T* ]
|
||||
[ *-u* ]
|
||||
[ *-v* ]
|
||||
[ *-x* ]
|
||||
[ *-y* ]
|
||||
[ *-z* ]
|
||||
<__infile__>
|
||||
__...__
|
||||
|
||||
=head1 DESCRIPTION
|
||||
== DESCRIPTION
|
||||
|
||||
B<Capinfos> is a program that reads one or more capture files and
|
||||
returns some or all available statistics (infos) of each E<lt>I<infile>E<gt>
|
||||
*Capinfos* is a program that reads one or more capture files and
|
||||
returns some or all available statistics (infos) of each <__infile__>
|
||||
in one of two types of output formats: long or table.
|
||||
|
||||
The long output is suitable for a human to read. The table output
|
||||
|
@ -64,41 +66,44 @@ a spreadsheet or database.
|
|||
The user specifies what type of output (long or table) and which
|
||||
statistics to display by specifying flags (options) that corresponding
|
||||
to the report type and desired infos. If no options are specified,
|
||||
B<Capinfos> will report all statistics available in "long" format.
|
||||
*Capinfos* will report all statistics available in "long" format.
|
||||
|
||||
Options are processed from left to right order with later options
|
||||
superseding or adding to earlier options.
|
||||
|
||||
B<Capinfos> is able to detect and read the same capture files that are
|
||||
supported by B<Wireshark>.
|
||||
*Capinfos* is able to detect and read the same capture files that are
|
||||
supported by *Wireshark*.
|
||||
The input files don't need a specific filename extension; the file
|
||||
format and an optional gzip, zstd or lz4 compression will be automatically detected.
|
||||
Near the beginning of the DESCRIPTION section of wireshark(1) or
|
||||
L<https://www.wireshark.org/docs/man-pages/wireshark.html>
|
||||
is a detailed description of the way B<Wireshark> handles this, which is
|
||||
the same way B<Capinfos> handles this.
|
||||
Near the beginning of the DESCRIPTION section of xref:wireshark.html[wireshark](1) or
|
||||
https://www.wireshark.org/docs/man-pages/wireshark.html
|
||||
is a detailed description of the way *Wireshark* handles this, which is
|
||||
the same way *Capinfos* handles this.
|
||||
|
||||
=head1 OPTIONS
|
||||
== OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item -a
|
||||
|
||||
Displays the start time of the capture. B<Capinfos> considers
|
||||
-a::
|
||||
+
|
||||
--
|
||||
Displays the start time of the capture. *Capinfos* considers
|
||||
the earliest timestamp seen to be the start time, so the
|
||||
first packet in the capture is not necessarily the earliest -
|
||||
if packets exist "out-of-order", time-wise, in the capture,
|
||||
B<Capinfos> detects this.
|
||||
|
||||
=item -A
|
||||
*Capinfos* detects this.
|
||||
--
|
||||
|
||||
-A::
|
||||
+
|
||||
--
|
||||
Generate all infos. By default capinfos will display
|
||||
all infos values for each input file, but enabling
|
||||
any of the individual display infos options will
|
||||
disable the generate all option.
|
||||
--
|
||||
|
||||
=item -b
|
||||
|
||||
-b::
|
||||
+
|
||||
--
|
||||
Separate infos with ASCII SPACE (0x20) characters.
|
||||
This option is only useful when generating a table
|
||||
style report (-T). The various info values will be
|
||||
|
@ -109,22 +114,28 @@ NOTE: Since some of the header labels as well as some
|
|||
of the value fields contain SPACE characters. This
|
||||
option is of limited value unless one of the quoting
|
||||
options (-q or -Q) is also specified.
|
||||
--
|
||||
|
||||
=item -B
|
||||
|
||||
-B::
|
||||
+
|
||||
--
|
||||
Separate the infos with ASCII TAB characters.
|
||||
This option is only useful when generating a table
|
||||
style report (-T). The various info values will be
|
||||
separated (delimited) from one another with a single
|
||||
ASCII TAB character. The TAB character is the default
|
||||
delimiter when -T style report is enabled.
|
||||
--
|
||||
|
||||
=item -c
|
||||
|
||||
-c::
|
||||
+
|
||||
--
|
||||
Displays the number of packets in the capture file.
|
||||
--
|
||||
|
||||
=item -C
|
||||
|
||||
-C::
|
||||
+
|
||||
--
|
||||
Cancel processing any additional files if and
|
||||
when capinfos fails to open an input file
|
||||
or gets an error reading an input file.
|
||||
|
@ -137,117 +148,155 @@ an error reading from a file regardless whether
|
|||
the -C option is specified or not.
|
||||
Upon exit, capinfos will return an error status
|
||||
if any errors occurred during processing.
|
||||
--
|
||||
|
||||
=item -d
|
||||
|
||||
-d::
|
||||
+
|
||||
--
|
||||
Displays the total length of all packets in the file, in
|
||||
bytes. This counts the size of the packets as they appeared
|
||||
in their original form, not as they appear in this file.
|
||||
For example, if a packet was originally 1514 bytes and only
|
||||
256 of those bytes were saved to the capture file (if packets
|
||||
were captured with a snaplen or other slicing option),
|
||||
B<Capinfos> will consider the packet to have been 1514 bytes.
|
||||
|
||||
=item -D
|
||||
*Capinfos* will consider the packet to have been 1514 bytes.
|
||||
--
|
||||
|
||||
-D::
|
||||
+
|
||||
--
|
||||
Displays a count of the number of decryption secrets in the file.
|
||||
--
|
||||
|
||||
=item -e
|
||||
|
||||
Displays the end time of the capture. B<Capinfos> considers
|
||||
-e::
|
||||
+
|
||||
--
|
||||
Displays the end time of the capture. *Capinfos* considers
|
||||
the latest timestamp seen to be the end time, so the
|
||||
last packet in the capture is not necessarily the latest -
|
||||
if packets exist "out-of-order", time-wise, in the capture,
|
||||
B<Capinfos> detects this.
|
||||
|
||||
=item -E
|
||||
*Capinfos* detects this.
|
||||
--
|
||||
|
||||
-E::
|
||||
+
|
||||
--
|
||||
Displays the per-file encapsulation of the capture file.
|
||||
--
|
||||
|
||||
=item -F
|
||||
|
||||
-F::
|
||||
+
|
||||
--
|
||||
Displays additional capture file information.
|
||||
--
|
||||
|
||||
=item -h
|
||||
|
||||
-h::
|
||||
+
|
||||
--
|
||||
Prints the help listing and exits.
|
||||
--
|
||||
|
||||
=item -H
|
||||
|
||||
-H::
|
||||
+
|
||||
--
|
||||
Displays the SHA256, RIPEMD160, and SHA1 hashes for the file.
|
||||
SHA1 output may be removed in the future.
|
||||
--
|
||||
|
||||
=item -i
|
||||
|
||||
-i::
|
||||
+
|
||||
--
|
||||
Displays the average data rate, in bits/sec
|
||||
--
|
||||
|
||||
=item -I
|
||||
|
||||
-I::
|
||||
+
|
||||
--
|
||||
Displays detailed capture file interface information. This information
|
||||
is not available in table format.
|
||||
--
|
||||
|
||||
=item -k
|
||||
|
||||
-k::
|
||||
+
|
||||
--
|
||||
Displays the capture comment. For pcapng files, this is the comment from the
|
||||
section header block.
|
||||
--
|
||||
|
||||
=item -K
|
||||
|
||||
-K::
|
||||
+
|
||||
--
|
||||
Use this option to suppress printing capture comments. By default capture
|
||||
comments are enabled. Capture comments are relatively freeform and might
|
||||
contain embedded new-line characters and/or other delimiting characters
|
||||
making it harder for a human or machine to easily parse the capinfos output.
|
||||
Excluding capture comments can aid in post-processing of output.
|
||||
--
|
||||
|
||||
=item -l
|
||||
|
||||
-l::
|
||||
+
|
||||
--
|
||||
Display the snaplen (if any) for a file.
|
||||
snaplen (if available) is determined from the capture file header
|
||||
and by looking for truncated records in the capture file.
|
||||
--
|
||||
|
||||
=item -L
|
||||
|
||||
-L::
|
||||
+
|
||||
--
|
||||
Generate long report. Capinfos can generate two
|
||||
different styles of reports. The "long" report is
|
||||
the default style of output and is suitable for a
|
||||
human to use.
|
||||
--
|
||||
|
||||
=item -m
|
||||
|
||||
-m::
|
||||
+
|
||||
--
|
||||
Separate the infos with comma (,) characters. This option
|
||||
is only useful when generating a table style report (-T).
|
||||
The various info values will be separated (delimited)
|
||||
from one another with a single comma "," character.
|
||||
--
|
||||
|
||||
=item -M
|
||||
|
||||
-M::
|
||||
+
|
||||
--
|
||||
Print raw (machine readable) values in long reports.
|
||||
By default capinfos prints numeric values with human-readable SI
|
||||
suffixes, and shows human-readable file type and encapsulation.
|
||||
Table reports (-T) always print raw values.
|
||||
--
|
||||
|
||||
=item -n
|
||||
|
||||
-n::
|
||||
+
|
||||
--
|
||||
Displays a count of the number of resolved IPv4 addresses and a count of
|
||||
the number of resolved IPv6 addresses in the file.
|
||||
--
|
||||
|
||||
=item -N
|
||||
|
||||
-N::
|
||||
+
|
||||
--
|
||||
Do not quote the infos. This option is only useful
|
||||
when generating a table style report (-T). Excluding
|
||||
any quoting characters around the various values and
|
||||
using a TAB delimiter produces a very "clean" table
|
||||
report that is easily parsed with CLI tools. By
|
||||
default infos are B<NOT> quoted.
|
||||
|
||||
=item -o
|
||||
default infos are *NOT* quoted.
|
||||
--
|
||||
|
||||
-o::
|
||||
+
|
||||
--
|
||||
Displays "True" if packets exist in strict chronological order
|
||||
or "False" if one or more packets in the capture exists
|
||||
"out-of-order" time-wise.
|
||||
--
|
||||
|
||||
=item -q
|
||||
|
||||
-q::
|
||||
+
|
||||
--
|
||||
Quote infos with single quotes ('). This option is
|
||||
only useful when generating a table style report (-T).
|
||||
When this option is enabled, each value will be
|
||||
|
@ -255,9 +304,11 @@ encapsulated within a pair of single quote (')
|
|||
characters. This option (when used with the -m
|
||||
option) is useful for generating one type of CSV
|
||||
style file report.
|
||||
--
|
||||
|
||||
=item -Q
|
||||
|
||||
-Q::
|
||||
+
|
||||
--
|
||||
Quote infos with double quotes ("). This option is
|
||||
only useful when generating a table style report (-T).
|
||||
When this option is enabled, each value will be
|
||||
|
@ -265,69 +316,90 @@ encapsulated within a pair of double quote (")
|
|||
characters. This option (when used with the -m
|
||||
option) is useful for generating the most common
|
||||
type of CSV style file report.
|
||||
--
|
||||
|
||||
=item -r
|
||||
|
||||
-r::
|
||||
+
|
||||
--
|
||||
Do not generate header record. This option is only
|
||||
useful when generating a table style report (-T).
|
||||
If this option is specified then B<no> header record will be
|
||||
If this option is specified then *no* header record will be
|
||||
generated within the table report.
|
||||
--
|
||||
|
||||
=item -R
|
||||
|
||||
-R::
|
||||
+
|
||||
--
|
||||
Generate header record. This option is only useful
|
||||
when generating a table style report (-T). A header
|
||||
is generated by default. A header record (if generated)
|
||||
is the first line of data reported and includes labels
|
||||
for all the columns included within the table report.
|
||||
--
|
||||
|
||||
=item -s
|
||||
|
||||
-s::
|
||||
+
|
||||
--
|
||||
Displays the size of the file, in bytes. This reports
|
||||
the size of the capture file itself.
|
||||
--
|
||||
|
||||
=item -S
|
||||
|
||||
-S::
|
||||
+
|
||||
--
|
||||
< |