Skip to content

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

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

feat(socket): add TcpSaveSyn and TcpSavedSyn sockopts for Linux#2760
rupert648 wants to merge 1 commit intonix-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 10 times, most recently from d162a2c to 2048b8a Compare March 26, 2026 10:58
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.

1 participant