IBND_ITER_NODES(3)

πŸ’– IBND_ITER_NODES πŸ’–

okay bestie, gather round, because we're talking about ibnd_iter_nodes and ibnd_iter_nodes_type from the OpenIB Programmer's Manual. these two are your little fabric-cruising besties from <infiniband/ibnetdisc.h> and honestly? they're giving ✨effortless✨.


🌸 NAME 🌸

ibnd_iter_nodes, ibnd_iter_nodes_type β€” hand me a fabric object and a function, and I will iterate over the nodes in that fabric for you. no cap. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <infiniband/ibnetdisc.h>

void ibnd_iter_nodes(ibnd_fabric_t *fabric, ibnd_iter_func_t func, void *user_data)
void ibnd_iter_nodes_type(ibnd_fabric_t *fabric, ibnd_iter_func_t func, ibnd_node_type_t type, void *user_data)

✨ DESCRIPTION ✨

so. ibnd_iter_nodes() walks through all the nodes in the fabric and calls "func" on them. that's it, that's the whole vibe. every single node gets the function treatment. πŸ’…

ibnd_iter_nodes_type() is literally the same thing, except it limits the iteration to only the nodes with the specified type. so if you don't want the whole crowd, you get to be picky. main character energy tbh. πŸ‘‘


🫢 RETURN VALUE 🫢

ibnd_iter_nodes(), ibnd_iter_nodes_type() β†’ NONE

yeah. nothing. no return value. they just do the thing and dip. 😭 (that's NONE in all caps, fr fr, that's exactly what the page says.)


πŸ‘‘ AUTHORS πŸ‘‘

Ira Weiny <weiny2@llnl.gov>


🧚 a quick vibe check: this page is from the OpenIB manual, dated July 25, 2008. yes bestie, 2008 β€” she's vintage and she's still iconic. πŸ’œ

and that's the whole page!! go forth and iterate, you absolute legend. 🌈⭐

πŸ“¦ where this page comes from