usb_find_co...ints_reverse(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ usb_find_common_endpoints_reverse (9) ✨

okay bestie, buckle up πŸ’– this is a page from the Kernel API Manual and it's literally about finding USB endpoints β€” but like, the last ones. yes, reverse. we're going backwards, and we're slaying while we do it πŸ¦‹


🌸 NAME 🌸

usb_find_common_endpoints_reverse β€” look up common endpoint descriptors, but make it reverse πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

int usb_find_common_endpoints_reverse (struct usb_host_interface *alt ,
struct usb_endpoint_descriptor **bulk_in , struct
usb_endpoint_descriptor **bulk_out , struct usb_endpoint_descriptor
**int_in , struct usb_endpoint_descriptor **int_out );

no cap, that's the whole signature β€” five args, one int back 🫢


⭐ ARGUMENTS ⭐

  • alt β€” the alternate setting you wanna search, like the little sub-config bestie you're digging through πŸ”
  • bulk_in β€” a pointer to a descriptor pointer, or NULL (yes, NULL is a whole valid vibe here)
  • bulk_out β€” pointer to descriptor pointer, or NULL πŸ’«
  • int_in β€” pointer to descriptor pointer, or NULL 🧚
  • int_out β€” pointer to descriptor pointer, or NULL 🌈
lowkey the NULL thing matters β€” every single one of these last four can be NULL and that's fine, no drama πŸ’€

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea, bestie β˜• β€” this function goes through the alternate setting's endpoint descriptors and hunts down the last bulk-in, bulk-out, interrupt-in and interrupt-out endpoints. reverse search, main character energy πŸ‘‘

when it finds them, it hands them back to you through the pointers you provided β€” unless they're NULL, in which case it just doesn't bother with that one πŸ™ˆ

and if a requested endpoint just… isn't there? not found? ghosted? πŸ‘» the corresponding pointer gets set to NULL. that's it. that's the whole mood.


πŸ”₯ RETURN πŸ”₯

  • 0 β€” slay, every descriptor you asked for was found ✨
  • -ENXIO β€” nope, something's missing, and the kernel is telling you with a whole negative errno 😭

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/usb/core/usb.c, plus the whole friend group 🫢:


and that's the page, bestie!! πŸ’… this little icon lives over in ./drivers/usb/core and it's stamped October 2026 β€” periodt, see you in the next manpage πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from