ssh_ctrl_packet_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ssh_ctrl_packet_alloc(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual page for ssh_ctrl_packet_alloc(9) β€” yes that's the whole title, she's a mouthful, but we move πŸ’…


✨ NAME ✨

ssh_ctrl_packet_alloc β€” grab a packet out of the control packet cache. that's it, that's the vibe πŸŽ€


🌸 SYNOPSIS 🌸

int ssh_ctrl_packet_alloc (struct ssh_packet **packet , struct ssam_span
*buffer , gfp_t flags );

literally three args, no cap, and she returns an int 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • packet β€” where the pointer to the newly allocated packet should be stored. like, this is the spot you hand her so she can drop the pointer in πŸ’–
  • buffer β€” the buffer corresponding to this packet. the lil partner-in-crime buffer 🌸
  • flags β€” flags used for allocation. the usual allocation-flag situation ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does she actually do? she allocates a packet and the corresponding transport buffer, both from the control packet cache. iconic. then she sets the packet's buffer reference to the allocated buffer β€” so the packet knows which buffer is hers πŸŽ€

important, bestie, listen to me: the packet must be freed via ssh_ctrl_packet_free, and that will also free the corresponding buffer. so do not free the corresponding buffer separately. that's a no-no. πŸ™ˆ

she's intended to be used with ssh_ptl_ctrl_packet_ops as packet operations. iykyk πŸ’…


πŸ”₯ RETURN πŸ”₯

  • returns zero on success β€” slay, we love a zero πŸ’–
  • returns -ENOMEM if the allocation failed β€” 😭 the memory said no

🌈 SEE ALSO 🌈

the whole friend group, fr fr:


that's the whole page, bestie βœ¨πŸ’œπŸŒΈ

sign-off vibes: this absolute queen comes to you from ./drivers/platform/surface/agg... (the source/version, a lil truncated but iconic) and she's dated October 2026 β€” yes, october, and yes, 2026. main character energy in the manual page header too, ssh_ctrl_packet_alloc(9), periodt πŸ’…πŸ«Ά

πŸ“¦ where this page comes from