ssh_ctrl_packet_alloc(9)
π 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
-ENOMEMif the allocation failed β π the memory said no
π SEE ALSO π
the whole friend group, fr fr:
- Kernel file
./drivers/platform/surface/aggregator/ssh_packet_layer.c ssh_ptl_should_drop_ack_packet(9),ssh_ptl_should_drop_nak_packet(9),ssh_ptl_should_drop_dsq_packet(9),ssh_ptl_should_fail_write(9),ssh_ptl_should_corrupt_tx_data(9),ssh_ptl_should_corrupt_rx_syn(9),ssh_ptl_should_corrupt_rx_data(9),ssh_packet_get(9),ssh_packet_put(9),ssh_packet_init(9),ssh_ctrl_packet_cache_init(9),ssh_ctrl_packet_cache_destroy(9),ssh_ctrl_packet_free(9),ssh_ptl_tx_wakeup_packet(9),ssh_ptl_tx_start(9),ssh_ptl_tx_stop(9),ssh_ptl_submit(9),ssh_ptl_cancel(9),ssh_ptl_rx_start(9),ssh_ptl_rx_stop(9),ssh_ptl_rx_rcvbuf(9),ssh_ptl_shutdown(9),ssh_ptl_init(9),ssh_ptl_destroy(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms