smi_identity(3)
π 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 tostruct SmiIdentityfor the identity with the given name in the given module (smiModulePtr), orNULLif the idenity with the given name does not exist. no cap, that's just what it does. πsmiGetFirstIdentity(SmiModule *smiModulePtr)andsmiGetNextIdentity(SmiIdentity *smiIdentityPtr)β these two are your lil duo for iterating through the identities of the module given by smiModulePtr. they return a pointer tostruct SmiIdentityhat represents an identity, orNULLif there are no identities left in the module, or an error has occurred. so like,NULLmeans either "we're done here bestie" or "something went wrong" β vibe check accordingly. πsmiGetIdentityModule(SmiIdentity *smiIdentityPtr)β returns a pointer tostruct SmiModule, of the module containing the given identity. it's giving "who's your mom". πsmiGetParentIdentity(SmiIdentity *smiIdentityPtr)β returns a pointer tostruct SmiIdentitypointing to the parent of the given smiIdentityPtr, orNULLif 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:
libsmi(3)smi_module(3)smi.h
π 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 ππβ¨
π¦ where this page comes from
- alpine 3.24: libsmi-doc 0.5.0-r5 Β· BSD-3-Clause AND MIT
- debian bookworm: libsmi2-dev 0.4.8+dfsg2-16
- debian trixie: libsmi2-dev 0.4.8+dfsg2-17+b1
- nixos 26.05: libsmi 0.5.0
- nixpkgs unstable: libsmi 0.5.0
- ubuntu jammy: libsmi2-dev 0.4.8+dfsg2-16
- ubuntu noble: libsmi2-dev 0.4.8+dfsg2-16.1build1
- ubuntu questing: libsmi2-dev 0.4.8+dfsg2-17
- ubuntu resolute: libsmi2-dev 0.4.8+dfsg2-18
- ubuntu stonking: libsmi2-dev 0.4.8+dfsg2-18
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms