smi_identity(3)

πŸ“¦
version 0.5.0 Β· 2 versions
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

smiGetIdentity, smiGetFirstIdentity, smiGetNextIdentity, smiGetParentIdentity, smiGetIdentityModule β€” bestie, these are the SMI identity information routines, and they live in section 3 of the SMI Management Information Library manual. iykyk πŸ’…


✨ SYNOPSIS ✨

okay so first you gotta include the header, then literally everything else is right here:

#include <smi.h>

SmiIdentity *smiGetIdentity(SmiModule *smiModulePtr, char *name);

SmiIdentity *smiGetFirstIdentity(SmiModule *smiModulePtr);

SmiIdentity *smiGetNextIdentity(SmiIdentity *smiIdentityPtr);

SmiIdentity *smiGetParentIdentity(SmiIdentity *smiIdentityPtr);

SmiModule *smiGetIdentityModule(SmiType *smiIdentityPtr);

typedef struct SmiIdentity {
    SmiIdentifier       name;
    SmiDecl             decl;
    SmiStatus           status;
    char                *description;
    char                *reference;
} SmiIdentity;

look at that struct. she's giving organized. we love her. 🫢


🌸 DESCRIPTION 🌸

so these functions are how you go get info on a SMIng identity definition (that's SMIng, bestie). they're all about identities and honestly? iconic.

  • smiGetIdentity(SmiModule *smiModulePtr,char *name) β€” hands you back a pointer to struct SmiIdentity for the identity with the given name in the given module (smiModulePtr), or NULL if the idenity with the given name does not exist. no cap, that's just what it does. πŸ’€
  • smiGetFirstIdentity(SmiModule *smiModulePtr) and smiGetNextIdentity(SmiIdentity *smiIdentityPtr) β€” these two are your lil duo for iterating through the identities of the module given by smiModulePtr. they return a pointer to struct SmiIdentity hat represents an identity, or NULL if there are no identities left in the module, or an error has occurred. so like, NULL means either "we're done here bestie" or "something went wrong" β€” vibe check accordingly. 😭
  • smiGetIdentityModule(SmiIdentity *smiIdentityPtr) β€” returns a pointer to struct SmiModule, of the module containing the given identity. it's giving "who's your mom". πŸ‘‘
  • smiGetParentIdentity(SmiIdentity *smiIdentityPtr) β€” returns a pointer to struct SmiIdentity pointing to the parent of the given smiIdentityPtr, or NULL if the Identity is not derived. no parent? no problem. 🌈

πŸŽ€ FILES πŸŽ€

  • ${prefix}/include/smi.h β€” the SMI library header file, aka the moment it all begins ✨

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, fr fr:


πŸ‘‘ AUTHOR πŸ‘‘

(C) 2007 Kaloyan Kanev, Jacobs University, Germany <k.kanev@jacobs-university.de> β€” legend behavior, we thank her πŸ’œ


and that's the whole page, bestie!! this was the SMI Management Information Library version, dated February 10, 2007, and yes it's smi_identity(3) the whole time, no plot twist. slay, go read the source, mwah πŸŽ€πŸ’–βœ¨