service_range_match_first(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… service_range_match_first(9) β€” from the Kernel API Manual, bestie πŸ’…

okay so picture this: you're deep in the rbtree and you just need one node, the very first one, that overlaps the range you care about. that's literally this function. it's giving "needle in a haystack but the haystack is sorted" energy 🧚✨

✨ NAME ✨

service_range_match_first β€” find the first service range matching a range πŸŽ€

like, the first one. the leftmost one. the main character of matches, if you will πŸ‘‘

🌸 SYNOPSIS 🌸

struct service_range * service_range_match_first (struct rb_node *n ,
u32 start , u32 end );

no cap, that's the whole signature. struct rb_node *n, u32 start, u32 end β€” all three, in that order, periodt πŸ’…

πŸ¦‹ ARGUMENTS πŸ¦‹

  • n β€” the root node of the service range rbtree for searching. this is where the search starts, so hand it the root and let it cook πŸ”₯
  • start β€” beginning of the search range (end >= start) for matching. yes, the end >= start thing is a real constraint, don't come for me πŸ™ˆ
  • end β€” end of the search range (end >= start) for matching. same deal, end >= start, always πŸ’–
lowkey important: both start and end list the condition (end >= start) β€” so like, don't flip them around, bestie 😭

⭐ RETURN ⭐

the leftmost service range node in the rbtree that overlaps the specific range, if any. otherwise? it returns NULL. that's it, that's the whole vibe check 🫢

so: got a match β†’ you get the leftmost overlapping node. no match β†’ NULL. no in-between, no drama πŸ’€

🌈 SEE ALSO 🌈

like half the TIPC name table is in here, iykyk πŸ“šβœ¨ go read the whole friend group, they all slay in their own way πŸ’œ


ok that's the page!! this one's living in ./net/tipc and the date on it is October 2026 β€” so yeah, future-dated and iconic for it πŸŽ€ mark your calendars bestie, mwah πŸ’‹πŸ’–

service_range_match_first(9) β€” ate and left no crumbs πŸ‘‘πŸ”₯

πŸ“¦ where this page comes from