Skip to content

Call API from libpcap.so and operate tc filter more robustly#5

Merged
jschwinger233 merged 3 commits intomainfrom
gray/libpcap
Mar 18, 2023
Merged

Call API from libpcap.so and operate tc filter more robustly#5
jschwinger233 merged 3 commits intomainfrom
gray/libpcap

Conversation

@jschwinger233
Copy link
Owner

  1. Get rid of exec(2)-ing tcpdump(7)
  2. Delete priority argument as it's impossible to capture traffic after a direct-action filter, so no reason to specify a priority other than 1
  3. Create tc filter with handle 0 rather than hardcode number, kernel will find the minimum available handle number.

@jschwinger233 jschwinger233 merged commit b0e399a into main Mar 18, 2023
@jschwinger233 jschwinger233 deleted the gray/libpcap branch March 18, 2023 10:15
@jschwinger233
Copy link
Owner Author

Dynamical linking is so much trouble especially on kernel 4.19 and I wonder if I really need it. Using container is always a solution but still not portable as static elf.

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.

1 participant