Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCAP Reader rust extension #220

Merged
merged 3 commits into from
Dec 7, 2024
Merged

PCAP Reader rust extension #220

merged 3 commits into from
Dec 7, 2024

Conversation

lmangani
Copy link
Contributor

@lmangani lmangani commented Dec 7, 2024

Our very first Rust Community Extension: PCAP Reader

D SELECT * FROM pcap_reader('/tmp/aaa.pcap') WHERE protocol == 'TCP' AND length::INT >= 100 LIMIT 10;
┌────────────┬───────────────┬─────────────┬──────────┬──────────┬──────────┬─────────┬─────────────────────────────────────────────────────────┐
│ timestamp  │    src_ip     │   dst_ip    │ src_port │ dst_port │ protocol │ length  │                         payload                         │
│  varcharvarcharvarcharvarcharvarcharvarcharvarcharvarchar                         │
├────────────┼───────────────┼─────────────┼──────────┼──────────┼──────────┼─────────┼─────────────────────────────────────────────────────────┤
│ 1120469634147.234.1.253192.168.1.2212720     │ TCP      │ 108220 ProFTPD Server In ECI Telecom (ftp.ecitele.com) \…  │
│ 1120469635147.234.1.253192.168.1.2212720     │ TCP      │ 130331 Anonymous login ok, send your complete email addr…  │
│ 1120469635147.234.1.253192.168.1.2212720     │ TCP      │ 113     │  \t\t   Anyone can access, write & retrieve a specifi…  │
│ 1120469635147.234.1.253192.168.1.2212720     │ TCP      │ 113     │  \t\t   Anyone can access, write & retrieve a specifi…  │
│ 1120469635147.234.1.253192.168.1.2212720     │ TCP      │ 113     │  Files larger then 250MB will be deleted after 5 days…  │
│ 1120469635147.234.1.253192.168.1.2212720     │ TCP      │ 102     │  Other Files will be deleted after 2 weeks !!!\r\n      │
│ 1120469635147.234.1.253192.168.1.2212720     │ TCP      │ 106227 Entering Passive Mode (147,234,1,253,230,119).\r\n  │
└────────────┴───────────────┴─────────────┴──────────┴──────────┴──────────┴─────────┴─────────────────────────────────────────────────────────┘

Still so much work to do and so many bugs to fix, but the rust template experience was amazing! 👏 @samansmink

@lmangani lmangani changed the title WIP: PCAP Reader rust extension PCAP Reader rust extension Dec 7, 2024
@lmangani lmangani marked this pull request as ready for review December 7, 2024 13:24
@carlopi carlopi merged commit 3cf348a into duckdb:main Dec 7, 2024
32 checks passed
@carlopi
Copy link
Collaborator

carlopi commented Dec 7, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants