From 188664c9eb822d5b7b7e58dec2300958330abba6 Mon Sep 17 00:00:00 2001 From: Siddharth Chandrasekaran Date: Sat, 17 Feb 2024 19:23:50 +0100 Subject: [PATCH] doc: Update debugging.rst and README.md with new tracing changes Signed-off-by: Siddharth Chandrasekaran --- README.md | 7 +++++-- doc/libosdp/debugging.rst | 14 +++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3beead8..0da36a4 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,9 @@ This protocol is developed and maintained by [Security Industry Association][20] - No run-time memory allocation. All memory is allocated at init-time - No external dependencies (for ease of cross compilation) - Fully non-blocking, asynchronous design - - Provides Python3 and Rust bindings for the C library for faster + - Provides C++, Rust and Python3 bindings for the C library for faster testing/integration + - Built-in, sophisticated, debugging infrastructure and tools ([see][14]). ## Language Support @@ -65,7 +66,7 @@ commands and replies and their support status in LibOSDP [here][22]. ### For ubuntu ```sh -sudo apt install cmake python3 python3-pip python3-dev libssl-dev doxygen +sudo apt install cmake python3 python3-pip python3-dev libssl-dev ``` ## Compile LibOSDP @@ -138,6 +139,7 @@ project locally. The latest version of the doc can always be found at Install the dependencies (one time) with, ```sh +sudo apt install doxygen pip3 install -r doc/requirements.txt ``` @@ -186,6 +188,7 @@ The OSDP specification can be obtained from SIA for a cost. Read more at our [11]: https://github.com/goToMain/libosdp/tree/master/rust [12]: https://pypi.org/project/libosdp/ [13]: https://github.com/goToMain/libosdp/tree/master/python +[14]: https://libosdp.sidcha.dev/libosdp/debugging [20]: https://www.securityindustry.org/industry-standards/open-supervised-device-protocol/ [21]: https://libosdp.sidcha.dev/protocol/ diff --git a/doc/libosdp/debugging.rst b/doc/libosdp/debugging.rst index 346bdc7..3909fe3 100644 --- a/doc/libosdp/debugging.rst +++ b/doc/libosdp/debugging.rst @@ -49,13 +49,17 @@ To enable packet trace builds, follow these steps: cmake -DCONFIG_OSDP_PACKET_TRACE=on .. make +After, this when you run your application, libosdp will produce a `.pcap` file +int the current directory which contains all the packets it decoded from the +communication channel. + Data Trace Builds ----------------- When secure channel is working fine and you are encountering a command level failure, it can be helpful to see the decrypted messages instead of the junk -that would get dumped when secure channel is enabled. This option allows you to -do just that. +that would get dumped when secure channel is enabled. This option dumps the +packet just after it was built/decrypted. To enable data trace builds, follow these steps: @@ -65,6 +69,10 @@ To enable data trace builds, follow these steps: cmake -DCONFIG_OSDP_DATA_TRACE=on .. make +After, this when you run your application, libosdp will produce a `.pcap` file +in the current directory which contains all the packets it decoded from the +communication channel. + Note: It is seldom useful to run on both packet trace AND data trace (in fact it makes it harder to locate relevant information) so please never do it. @@ -100,6 +108,6 @@ After that, you can do `File -> Open` and choose the the `.pcap` files that were produced by LibOSDP build when PACKET_TRACE enabled. Here is a screenshot of what you can expect to see: -.. image:: _static/img/wireshark.png +.. image:: /_static/img/wireshark.png :width: 400 :alt: Wireshark OSDP protocol screenshot \ No newline at end of file