8 unstable releases (3 breaking)

0.4.0 Mar 18, 2024
0.3.1 Feb 21, 2024
0.3.0 Jan 2, 2024
0.2.1 Nov 7, 2023
0.1.2 Oct 22, 2022

#1357 in Network programming

Download history 3/week @ 2023-12-27 132/week @ 2024-02-21 29/week @ 2024-02-28 93/week @ 2024-03-06 120/week @ 2024-03-13 31/week @ 2024-03-20 7/week @ 2024-03-27 8/week @ 2024-04-03

167 downloads per month

Custom license

150KB
3.5K SLoC

Introduction

GitHub Workflow Status Crates.io docs.rs

scalpel is a crate for Packet Dissection and Sculpting in Rust.

Scalpel can be used for dissecting packets on the wire and or generating packets from some specifications that can be sent on wire (This functionality is not being implemented at present). Goal of 'scalpel' is to be able to be able to make packet dissection API friendly so that it's easier to use it in any application. See Examples in the examples/ directory to get an idea of what kind of 'applications' it can be used in.

This is still early, actively being developed, the APIs are not stable and are likely to change substantially.

Getting Started

Right now the supported API allows one to dissect packets on wire and display as Json (this uses serde_json and thus serde, so most serde format may work) -

  1. packet_json - An example that demonstrates how any buffer can be read as a scalpel::Packet structure.
  2. pcap - An example that demonstrates how to display packets in Json format those captured on the wire. (this should be run as sudo).

By default, python bindings are disabled. If you want python bindings, use --features="python-bindings" command line argument while building or running the code. Refer to using-python-bindings.md to get started with using Python bindings. Currently, only we provide a basic dissection and displaying a packet as json functionality from the Python bindings. This support is a WIP.

Dependencies

~0.8–8.5MB
~49K SLoC