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

C-DNS format support #120

Open
nicki-krizek opened this issue Sep 4, 2019 · 5 comments
Open

C-DNS format support #120

nicki-krizek opened this issue Sep 4, 2019 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@nicki-krizek
Copy link
Contributor

The C-DNS (RFC8618) format looks quite useful for storing and processing large amount of DNS data.

Are there any plans to add reader/writer for C-DNS?

@jelu
Copy link
Member

jelu commented Sep 4, 2019

No plans, unless you do it or fund it.

Are there any libraries yet?

@nicki-krizek
Copy link
Contributor Author

There seems to be a C++ implementation in https://github.com/dns-stats/compactor , although it's not exactly a library.

@jelu
Copy link
Member

jelu commented Sep 4, 2019

@tomaskrizek I know about compactor and inspector.

If a linkable C library existed that has a call that returns the DNS payload then it's a couple of hours job to add read support for C-DNS, which I might be able to squeeze in before the end of the year.

Anything else is beyond my current available time.

@jelu jelu added the help wanted Extra attention is needed label Sep 4, 2019
@nicki-krizek
Copy link
Contributor Author

On a related note, since file size is my main concern, perhaps using compression might be sufficient.

Looking at zstd, it looks quite fast even with a single thread. My input PCAP of 3.4 GB DNS queries takes 18s to compress, but more importantly, just 5s to decompress (on my laptop, with tmpfs).

$ time zstd --single-thread arekol_120s_800k.pcap -f
arekol_120s_800k.pcap : 16.86%   (3576432957 => 603152277 bytes, arekol_120s_800k.pcap.zst) 

real	0m18.363s
user	0m17.196s
sys	0m1.107s

$ time zstd --single-thread arekol_120s_800k.pcap.zst -f -d
arekol_120s_800k.pcap.zst: 3576432957 bytes                                    

real	0m5.471s
user	0m3.938s
sys	0m1.486s

I wonder how difficult would it be to support compressed PCAPs as an input...

@jelu
Copy link
Member

jelu commented Sep 30, 2020

I wonder how difficult would it be to support compressed PCAPs as an input...

It depends on the compression library's interfaces, PCAP is simple, fpcap and mmpcap parses the PCAP themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants