Skip to content

feat(socket): add TcpSaveSyn and TcpSavedSyn sockopts for Linux#2760

Open
rupert648 wants to merge 1 commit into
nix-rust:masterfrom
rupert648:master
Open

feat(socket): add TcpSaveSyn and TcpSavedSyn sockopts for Linux#2760
rupert648 wants to merge 1 commit into
nix-rust:masterfrom
rupert648:master

Conversation

@rupert648
Copy link
Copy Markdown

@rupert648 rupert648 commented Mar 25, 2026

Add typed setsockopt/getsockopt wrappers for TCP_SAVE_SYN (27) and TCP_SAVED_SYN (28), Linux-only socket options used for passive TCP fingerprinting (p0f).

TcpSaveSyn is set on a listening socket to instruct the kernel to save a copy of each client SYN packet. TcpSavedSyn retrieves those raw IP + TCP header bytes from the accepted socket, enabling passive OS fingerprinting without active probing.

What does this PR do

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@rupert648 rupert648 force-pushed the master branch 11 times, most recently from 2048b8a to 73d3332 Compare March 26, 2026 11:00
@SteveLauC
Copy link
Copy Markdown
Member

I rebased your branch to resolve the CI failures.

@rupert648
Copy link
Copy Markdown
Author

I rebased your branch to resolve the CI failures.

ty, just did the same to fix conflicts

Add typed setsockopt/getsockopt wrappers for TCP_SAVE_SYN (27) and
TCP_SAVED_SYN (28), Linux-only socket options used for passive TCP
fingerprinting (p0f).

TcpSaveSyn is set on a listening socket to instruct the kernel to save
a copy of each client SYN packet. TcpSavedSyn retrieves those raw IP +
TCP header bytes from the accepted socket, enabling passive OS
fingerprinting without active probing.
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