_sock_tx_timestamp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so _sock_tx_timestamp is this little function from the Kernel API Manual, and its whole thing is checking whether the outgoing packet is to be time stamped. that's the vibe. πŸ’…


🌸 SYNOPSIS 🌸

void _sock_tx_timestamp (struct sock *sk , const struct sockcm_cookie
       *sockc , __u8 *tx_flags , __u32 *tskey );

πŸŽ€ ARGUMENTS πŸŽ€

  • sk β€” the socket sending this packet. bestie, it's the sender. 🫢
  • sockc β€” pointer to socket cmsg cookie to get timestamping info. yes, it's giving "timestamp intel source." ✨
  • tx_flags β€” completed with instructions for time stamping. it comes back with the stamping game plan. πŸ’…
  • tskey β€” filled in with next sk_tskey (not for TCP, which uses seqno). so not TCP, TCP is on its own seqno era. 😭

πŸ’… NOTE πŸ’…

heads up, bestie: callers should take care of initial *tx_flags value (usually 0). not me letting that slide β€” it's literally your job. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

peep the kernel file ./include/net/sock.h and the whole crew: struct sock_common(9), struct sock(9), sk_user_data_is_nocopy(9), __locked_read_sk_user_data_with_flags(9), __rcu_dereference_sk_user_data_with_flags(9), sk_for_each_entry_offset_rcu(9), SOCK_CONNECT_BIND(9), lock_sock_fast(9), unlock_sock_fast(9), sk_wmem_alloc_get(9), sk_rmem_alloc_get(9), sk_has_allocations(9), skwq_has_sleeper(9), sock_poll_wait(9), sk_page_frag(9), sk_eat_skb(9). iconic list, no cap. 🌈


mwah πŸ’‹ β€” source/version and date: ./include/net, October 2026, _sock_tx_timestamp(9) out. πŸŽ€

πŸ“¦ where this page comes from