Skip to content

Repository files navigation

DuckDB PCAP Community Extension

This experimental rust extension allows reading PCAP files from DuckDB using the pcap-parser crate

Experimental: USE AT YOUR OWN RISK!

📦 Installation

INSTALL pcap_reader FROM community;
LOAD pcap_reader;

Example

D SELECT*FROM pcap_reader('test/test.pcap') LIMIT3;
┌─────────────────────┬────────────────┬────────────────┬──────────┬──────────┬──────────┬────────┬───────────────────────────────────────────┐
│ timestamp │ src_ip │ dst_ip │ src_port │ dst_port │ protocol │ length │ payload │
│ timestampvarcharvarchar │ int32 │ int32 │ varchar │ int32 │ varchar │
├─────────────────────┼────────────────┼────────────────┼──────────┼──────────┼──────────┼────────┼───────────────────────────────────────────┤
│ 2024-12-0619:30:2… │ xx.xx.xx.xxxyyy.yyy.yy.yyy640785080 │ UDP │ 756 │ INVITE sip:810442837619024@yyy.yyy.yy.y… │
│ 2024-12-0619:30:2… │ yyy.yyy.yy.yyyxx.xx.xx.xxx508064078 │ UDP │ 360 │ SIP/2.0100 Trying\r\nVia: SIP/2.0/UDP … │
│ 2024-12-0619:30:2… │ yyy.yyy.yy.yyyxx.xx.xx.xxx508064078 │ UDP │ 909 │ SIP/2.0480 Temporarily Unavailable\r\n… │
├─────────────────────┴────────────────┴────────────────┴──────────┴──────────┴──────────┴────────┴───────────────────────────────────────────┤
│ 3 rows 8 columns │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Releases

Packages

Used by

Contributors

Languages