UMAD_CLASS_STR(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_CLASS_STR(3) β€” the OpenIB Programmer's Manual, but make it cute πŸ’–

okay bestie, so this is umad_class_str (that's the manual page name, it's giving "family of functions") and it's your little translator bestie for enums. like, you got a number, and you want a word? say less. πŸ¦‹


✨ NAME ✨

umad_*_str β€” a whole class of functions that return string representations of enums πŸ’…


🌸 SYNOPSIS 🌸

#include <infiniband/umad_str.h>

const char * umad_class_str(uint8_t mgmt_class)
const char * umad_method_str(uint8_t mgmt_class, uint8_t method)
const char * umad_attribute_str(uint8_t mgmt_class, be16_t attr_id)

const char * umad_common_mad_status_str(be16_t status)
const char * umad_sa_mad_status_str(be16_t status)

πŸŽ€ DESCRIPTION πŸŽ€

  • const char * umad_class_str(uint8_t mgmt_class) β€” hands you the string value of a management class enum, fr fr. 🫢
  • const char * umad_method_str(uint8_t mgmt_class, uint8_t method) β€” gives you the string value of the method, specifically for the mgmt_class you passed in. it's method behavior, tailored. ✨
  • const char * umad_attribute_str(uint8_t mgmt_class, be16_t attr_id) β€” returns the string value of whatever attribute is chillin' in attr_id, based on the mgmt_class you specified. yes, the class matters here, it's a whole vibe check. πŸ‘‘
  • const char * umad_common_mad_status_str(be16_t status) β€” returns the string value for common MAD status values. the basics, the everyday icons. πŸ’–
  • const char * umad_sa_mad_status_str(be16_t status) β€” returns the string value for SA MAD status values. SA-specific, she's special. πŸ’œ
NOTE: Not all classes are supported. 😭 so like… don't come for her when your niche class gets nothing back. it's not her fault, it's literally in the manual.

⭐ RETURN VALUE ⭐

Returns a string representation of the fields you specified. that's it, that's the whole thing β€” strings, back to you, slay. 🌈


πŸ’« AUTHOR πŸ’«

Ira Weiny <weiny2@llnl.gov> β€” the icon, the legend, the main character who wrote this. πŸ™ˆ


and that's the whole page bestie!! this came from the OpenIB crew, dated Feb 15, 2013, and it lives in the OpenIB manual section 3. go forth and stringify your enums, no cap. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from