STRUCT SSH_RTL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 🌈

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