UMAD_ADDR_DUMP(3)

πŸ“¦
version 65.0 Β· 2 versions
  • 65.0 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.3.10.2 Β· nixos 26.05, nixpkgs unstable
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… UMAD_ADDR_DUMP πŸ’…

okay bestie, so umad_addr_dump is a little function from the OpenIB Programmer's Manual and it lives at UMAD_ADDR_DUMP(3). that's the manual page name, iykyk. it's giving "tiny utility, huge service" ✨


πŸŽ€ NAME πŸŽ€

umad_addr_dump β€” dump addr structure to stderr 🫢

like literally. it takes a struct and yeets it at stderr. that's the whole job and it does it flawlessly, no cap.


🌸 SYNOPSIS 🌸

#include <infiniband/umad.h>

void umad_addr_dump(ib_mad_addr_t *addr);

so you gotta pull in <infiniband/umad.h> first, then you can call it. periodt. πŸ’–


✨ DESCRIPTION ✨

umad_addr_dump() dumps the given addr to stderr. stderr, not stdout, okay? so if you're piping stuff around, this is not gonna show up in your pipe. it goes straight to the error stream. the vibe check is: it's diagnostic output, not real output. πŸ¦‹

the argument addr is an ib_mad_addr_t struct, as specified in <infiniband/umad.h>. and omg here's the whole thing, look at it, it's iconic:

typedef struct ib_mad_addr {
        uint32_t qpn;
        uint32_t qkey;
        uint16_t lid;
        uint8_t  sl;
        uint8_t  path_bits;
        uint8_t  grh_present;
        uint8_t  gid_index;
        uint8_t  hop_limit;
        uint8_t  traffic_class;
        uint8_t  gid[16];
        uint32_t flow_label;
} ib_mad_addr_t;

qpn, qkey, lid, sl, path_bits, grh_present, gid_index, hop_limit, traffic_class, gid[16] and flow_label. every single field, all of them, and the function is gonna dump all of that for you. main character struct energy fr fr πŸ‘‘

and no, it does not take a format string, it does not return a string you can use, and it does not write to stdout. stderr. only. remember it. πŸ’€

🌈 RETURN VALUE 🌈

umad_addr_dump() returns no value.

it's a void function bestie, it returns nothing. there is no return code to check, no error to catch, no errno drama. it just does the dump and leaves. honestly? unbothered. flawless. πŸ’…


🫢 AUTHOR 🫢

Hal Rosenstock <halr@voltaire.com> β€” thank you for your service, king πŸ‘‘


and that's the whole page! this little cutie came to us from OpenIB, dated May 21, 2007 (a true elder, and still slaying), and you can find it filed under UMAD_ADDR_DUMP(3). go dump some addrs, bestie πŸ§šπŸ’œ

πŸ“¦ where this page comes from