service_range_match_first(9)
π 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 rangerbtreefor 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, theend >= startthing 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: bothstartandendlist 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 π
- Kernel file
./net/tipc/name_table.c struct service_range(9)struct tipc_service(9)service_range_foreach_match(9)service_range_match_next(9)tipc_publ_create(9)tipc_service_create(9)tipc_service_remove_publ(9)tipc_service_subscribe(9)tipc_nametbl_lookup_anycast(9)tipc_nametbl_withdraw(9)tipc_nametbl_subscribe(9)tipc_nametbl_unsubscribe(9)tipc_service_delete(9)
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
- 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