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

base: add support for "raw ip" captures #88

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Conversation

os12
Copy link

@os12 os12 commented Sep 8, 2023

  • there is no need to deal with L2 as it's not even there

 - there is no need to deal with L2 as it's not even there
@adulau
Copy link
Owner

adulau commented Sep 12, 2023

There are pcap captures as raw ip where it's directly the IP raw packets (such as ulogd). I bet this patch will break such capture.

@ns-osmolsky
Copy link
Contributor

There are pcap captures as raw ip where it's directly the IP raw packets (such as ulogd). I bet this patch will break such capture.

Umm... that's what I am dealing with. There "raw IP" means "no L2 header to skip".

@adulau
Copy link
Owner

adulau commented Sep 12, 2023

Interesting, do you have a sample capture? I would like to do some tests.

@ns-osmolsky
Copy link
Contributor

Here is an example:
gdrive-eof-54226.zip

@ns-osmolsky
Copy link
Contributor

$ file ../samples/gdrive-eof-54226.pcap
../samples/gdrive-eof-54226.pcap: pcap capture file, microsecond ts (little-endian) - version 2.4 (Raw IP, capture length 2000)

@wllm-rbnt
Copy link
Contributor

wllm-rbnt commented Sep 12, 2023

It works with ulogd (NFLOG target) for IPv4 only because of type = ETHERTYPE_IP.
We need type = ETHERTYPE_IPV6 for IPv6.

We could try to differentiate IP version based on the first nibble of the packets in the trace.

"RAW" PCAP if type is valid for IPv4 & IPv6:

$ file ulogd*pcap
ulogd_v4.pcap: pcap capture file, microsecond ts (little-endian) - version 2.4 (Raw IP, capture length 65536)
ulogd_v6.pcap: pcap capture file, microsecond ts (little-endian) - version 2.4 (Raw IP, capture length 65536)

@adulau adulau merged commit 52454c7 into adulau:master Sep 13, 2023
6 checks passed
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.

4 participants