smack_socke...eersec_dgram(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… smack_socket_getpeersec_dgram πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” yes, we're in the kernel now, and no, it's not scary, come here 🫢 This little page is all about smack_socket_getpeersec_dgram, and the vibe is "pull in packet label" ✨ literally what the NAME section says, iykyk.


✨ NAME ✨

smack_socket_getpeersec_dgram β€” pull in packet label πŸŽ€


🌸 SYNOPSIS 🌸

int smack_socket_getpeersec_dgram (struct socket *sock , struct sk_buff
*skb , u32 *secid );

that's the whole signature, no cap β€” copy it exactly, spaces and all, she's built different πŸ’€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • sock β€” the peer socket 🧚 that's the socket on the other end of the convo, the bestie on the other line.
  • skb β€” packet data πŸ“¦ the actual packet bits being passed around.
  • secid β€” pointer to where to put the secid of the packet πŸ”₯ note the word pointer β€” you're handing over an address to write into, not a value.

πŸ‘‘ DESCRIPTION πŸ‘‘

Sets the netlabel socket state on sk from parent 🌈

that's it. that's the description. she's short and she knows it πŸ’… ngl I expected a whole essay too, but we keep it 100% as written β€” the netlabel socket state gets set, it happens on sk, and it comes from the parent. periodt.


πŸŽ€ SEE ALSO πŸŽ€

this is the part where I need you to hydrate before continuing, bestie, because the guest list is long 😭 everybody from the kernel file ./security/smack/smack_lsm.c pulled up:

like I said. everybody. and they're all in ./security/smack/smack_lsm.c, so that's your one-stop shop πŸ“

real talk: if you're chasing down how a label actually travels through the network stack, smack_socket_getpeersec_stream(9) and smack_socket_sock_rcv_skb(9) are right there in that list next to this one β€” go say hi πŸ’–

and that's the page, bestie!! go forth and label your packets 🌟 iykyk πŸ’œ

source: ./security/smack Β· dated October 2026 β€” mwah, love you, bye πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from