STRUCT USBIP_HEADER_BASIC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct usbip_header_basic(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” this is the struct usbip_header_basic(9) page and it's literally the little header that every single usbip request carries around. think of it as the main character of the packet, the part that's always there no matter what the rest of the message is doing. data pertinent to every request, periodt. ✨


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole glow-up, no cap:

struct usbip_header_basic {
    __u32 command;
    __u32 seqnum;
    __u32 devid;
    __u32 direction;
    __u32 ep;
 };

five __u32 fields, that's it, that's the whole vibe. πŸ¦‹


🌸 Members 🌸

okay let's meet the cast, one by one:

  • command β€” the usbip request type πŸ‘‘ this is the field that tells everyone what kind of request we're even doing here.
  • seqnum β€” the sequential number that identifies requests; it gets incremented per connection πŸ”₯ so like, every new request on a connection gets a fresh number, iykyk.
  • devid β€” this one specifies a remote USB device uniquely instead of using busnum and devnum πŸ™ˆ and in the stub driver, this value is literally ((busnum << 16) | devnum). write that down bestie, it's exact. πŸ’…
  • direction β€” direction of the transfer 🧚 which way are the vibes flowing, that's what this says.
  • ep β€” endpoint number ⭐ that's it, that's the field.
ngl every single one of these is a __u32, so no surprises, no weird sizes, just a clean little block of fields. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

if you wanna keep reading (and you should, bestie, this is the good stuff), go check out the kernel file ./drivers/usb/usbip/usbip_common.h plus all these icon structs:

  • struct usbip_header_cmd_submit(9)
  • struct usbip_header_ret_submit(9)
  • struct usbip_header_cmd_unlink(9)
  • struct usbip_header_ret_unlink(9)
  • struct usbip_header(9)

and that's the whole page!! πŸ’œ this cutie lives at ./drivers/usb/usbip and the date on it is October 2026, so yeah β€” go forth and slay your usbip packets, mwah πŸ˜­πŸ’–πŸŽ€

πŸ“¦ where this page comes from