tree: 0fe821510d87633ccdbfd53a21eeb02daf716b7d [path history] [tgz]
  1. doc/
  2. scripts/
  3. src/
  4. tests/
  5. Android.bp
  6. Cargo.toml
  7. CONTRIBUTING.md
  8. LICENSE
  9. OWNERS
  10. README.md
tools/pdl/README.md

Packet Description Language (PDL)

PDL is a domain specific language for writing the definition of binary protocol packets. Parsing and validating packets from raw bytes is tedious and error prone in any language. PDL generates memory safe and tailored backends for mulitple target languages:

- Rust
- C++
- Python

How to use PDL

  1. Write the protocol definition
  2. cargo run my-protocol.pdl --output-format rust > my-protocol.rs

Language specific instructions are provided in another section.

Supported Features

Full reference documentation

  • Scalar values
  • Enumerators
  • Arrays
  • Nested packets
  • Conditional packet derivation
  • Custom field definitions

Similar projects