STRUCT SSH_RTL(9)
πΈ struct ssh_rtl(9) β SSH request transport layer, bestie edition πΈ
okay so this is a page from the Kernel API Manual, and honestly? It's a struct page, which means it's basically a little tour of a data structure's inner life. No cap. Stick with me and we'll go through every single field together, because the way that this thing is laid out is lowkey iconic π
β¨ NAME β¨
struct ssh_rtl β the SSH request transport layer. That's the whole vibe. It's the struct that handles getting SSH requests from here to there. π¦
π SYNOPSIS π
here's the actual shape of it, verbatim, no edits from me:
struct ssh_rtl {
struct ssh_ptl ptl;
unsigned long state;
struct {
spinlock_t lock;
struct list_head head;
} queue;
struct {
spinlock_t lock;
struct list_head head;
atomic_t count;
} pending;
struct {
struct work_struct work;
} tx;
struct {
spinlock_t lock;
ktime_t timeout;
ktime_t expires;
struct delayed_work reaper;
} rtx_timeout;
struct ssh_rtl_ops ops;
};
look at those nested anonymous structs. she's got structure, she's got layers. main character energy fr fr π
π Members π
every member, one by one, no skipping, we do not leave anyone out in this house π«Ά
ptlβ the underlying packet transport layer. Like, this is the layer under this layer. Layers on layers on layers. It's giving onion π§stateβ the state(-flags) of the transport layer. Flags! Plural-ish! Keeping track of where things are at β¨queueβ the request submission queue. The lineup. The waiting room. The "you're on the list" zone.queue.lockβ the lock for modifying the request submission queue. You wanna touch the queue, you take the lock first. Manners πqueue.headβ the list-head of the request submission queue. Head of the line, literally.
pendingβ the set/list of pending requests. Everything that's still cooking πpending.lockβ the lock for modifying the request set. Same energy, different list.pending.headβ the list-head of the pending set/list. Again: head of the line. We love consistency.pending.countβ the number of currently pending requests. An actual tally. We're counting, bestie π’
txβ the transmitter subsystem. The send-it side of things π€tx.workβ the transmitter work item. That's the actual unit of work that does the transmitting.
rtx_timeoutβ the retransmission timeout subsystem. Yes, rtx is retransmission. Yes, it's a whole subsystem. She's got her own little world in here β°rtx_timeout.lockβ the lock for modifying the retransmission timeout reaper. (the reaper!! spooky but make it kernel π)rtx_timeout.timeoutβ the timeout interval for retransmission. How long we wait before we go "hmm, maybe again?"rtx_timeout.expiresβ the time specifying when the reaper work is next scheduled. A little calendar entry for the reaper.rtx_timeout.reaperβ the work performing timeout checks and subsequent actions. It checks. It acts. It's the reaper. Obsessed π
opsβ the request layer operations. The function-pointer crew. The queeroes, if you will π
real talk: none of these fields are optional reading. If you're touching ssh_rtl you need to know what each one does, and now you do. slay.
π SEE ALSO π
- Kernel file
./drivers/platform/surface/aggregator/ssh_request_layer.h enum ssh_rtl_state_flags(9)struct ssh_rtl_ops(9)ssh_rtl_get_device(9)ssh_request_rtl(9)
like, go read those too. iykyk π§
and that's the whole page, bestie π this one came out of ./drivers/platform/surface/agg... (yes, truncated, that's how the page does it, don't come for me) and it's dated October 2026 β so it's a struct page from the future, which is very main character of it. 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