Skip to content

Commit

Permalink
doc: Update debugging.rst and README.md with new tracing changes
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Feb 17, 2024
1 parent 227b8d0 commit 188664c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
```

Expand Down Expand Up @@ -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/
Expand Down
14 changes: 11 additions & 3 deletions doc/libosdp/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.

Expand Down Expand Up @@ -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

0 comments on commit 188664c

Please sign in to comment.