From e337e6012c549f2e85e532ead6d7028bb382f113 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Sat, 7 Dec 2024 14:09:09 +0100 Subject: [PATCH 1/4] Add pcap_reader extension --- extensions/pcap_reader/description.yml | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 extensions/pcap_reader/description.yml diff --git a/extensions/pcap_reader/description.yml b/extensions/pcap_reader/description.yml new file mode 100644 index 0000000..8dde168 --- /dev/null +++ b/extensions/pcap_reader/description.yml @@ -0,0 +1,32 @@ +extension: + name: pcap_reader + description: Read PCAP files from DuckDB + version: 0.0.1 + language: C++ + build: cmake + license: MIT + maintainers: + - lmangani + - glongo + +repo: + github: quackscience/duckdb-extension-pcap + ref: 658db756b32a434a144ef3521872bc5727a5f996 + +docs: + hello_world: | + -- Basic PCAP reader + D SELECT * FROM pcap_reader('test.pcap') LIMIT 3; + ┌────────────┬────────────────┬────────────────┬──────────┬──────────┬──────────┬─────────┬───────────────────────────────────────────┐ + │ timestamp │ src_ip │ dst_ip │ src_port │ dst_port │ protocol │ length │ payload │ + │ varchar │ varchar │ varchar │ varchar │ varchar │ varchar │ varchar │ varchar │ + ├────────────┼────────────────┼────────────────┼──────────┼──────────┼──────────┼─────────┼───────────────────────────────────────────┤ + │ 1733513420 │ xx.xx.xx.xxx │ yyy.yyy.yy.yyy │ 64078 │ 5080 │ UDP │ 756 │ INVITE sip:810442837619024@yyy.yyy.yy.y… │ + │ 1733513420 │ yyy.yyy.yy.yyy │ xx.xx.xx.xxx │ 5080 │ 64078 │ UDP │ 360 │ SIP/2.0 100 Trying\r\nVia: SIP/2.0/UDP … │ + │ 1733513420 │ yyy.yyy.yy.yyy │ xx.xx.xx.xxx │ 5080 │ 64078 │ UDP │ 909 │ SIP/2.0 480 Temporarily Unavailable\r\n… │ + ├────────────┴────────────────┴────────────────┴──────────┴──────────┴──────────┴─────────┴───────────────────────────────────────────┤ + │ 3 rows 8 columns │ + └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + + extended_description: | + The PCAP Reader Extension is experimental, use at your own risk! From c41df5a28f9f9ddc4fa63de7377be77593539e65 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Sat, 7 Dec 2024 14:10:47 +0100 Subject: [PATCH 2/4] Update description.yml --- extensions/pcap_reader/description.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/pcap_reader/description.yml b/extensions/pcap_reader/description.yml index 8dde168..3288d34 100644 --- a/extensions/pcap_reader/description.yml +++ b/extensions/pcap_reader/description.yml @@ -5,6 +5,7 @@ extension: language: C++ build: cmake license: MIT + exclude_platforms: 'windows_amd64_rtools;windows_amd64' maintainers: - lmangani - glongo From 14260a6a948537d426107c6dafcf079653d32cb9 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Sat, 7 Dec 2024 14:14:59 +0100 Subject: [PATCH 3/4] Rust it up --- extensions/pcap_reader/description.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/pcap_reader/description.yml b/extensions/pcap_reader/description.yml index 3288d34..8abd408 100644 --- a/extensions/pcap_reader/description.yml +++ b/extensions/pcap_reader/description.yml @@ -2,10 +2,11 @@ extension: name: pcap_reader description: Read PCAP files from DuckDB version: 0.0.1 - language: C++ + language: Rust build: cmake license: MIT - exclude_platforms: 'windows_amd64_rtools;windows_amd64' + excluded_platforms: "windows_amd64_rtools;windows_amd64" + requires_toolchains: "rust;python3" maintainers: - lmangani - glongo From e459a5d0077f798fd2adfe20dfadab6b41e95376 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Sat, 7 Dec 2024 18:47:17 +0100 Subject: [PATCH 4/4] Update description.yml --- extensions/pcap_reader/description.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/pcap_reader/description.yml b/extensions/pcap_reader/description.yml index 8abd408..591b5eb 100644 --- a/extensions/pcap_reader/description.yml +++ b/extensions/pcap_reader/description.yml @@ -1,7 +1,7 @@ extension: name: pcap_reader description: Read PCAP files from DuckDB - version: 0.0.1 + version: 0.0.2 language: Rust build: cmake license: MIT @@ -13,11 +13,11 @@ extension: repo: github: quackscience/duckdb-extension-pcap - ref: 658db756b32a434a144ef3521872bc5727a5f996 + ref: 254f94f7cf1e3ca512f751abbabb4c3e3ce02161 docs: hello_world: | - -- Basic PCAP reader + -- Basic PCAP reader for local or remote files D SELECT * FROM pcap_reader('test.pcap') LIMIT 3; ┌────────────┬────────────────┬────────────────┬──────────┬──────────┬──────────┬─────────┬───────────────────────────────────────────┐ │ timestamp │ src_ip │ dst_ip │ src_port │ dst_port │ protocol │ length │ payload │