On FreeBSD there is a setsockopt option SO_USER_COOKIE which allows setting a 32 bit value on each socket. This can be used by applications and DTrace as a rendezvous point so that an applicaton's data can more easily be captured at run time. Expose the user cookie via DTrace by updating the translator in tcp.d and add a quick test program, a TCP server, that sets the cookie on each connection accepted.
Details
Details
- Reviewers
markj hiren - Group Reviewers
transport - Commits
- rS302474: On FreeBSD there is a setsockopt option SO_USER_COOKIE which allows
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 4453 Build 4504: arc lint + arc unit
Event Timeline
Comment Actions
A minor nit inline. Looks good otherwise.
cddl/lib/libdtrace/tcp.d | ||
---|---|---|
228 | SO_USER_COOKIE's default value is 0 so we may want to set it to -1 in case of p == null. |