smi_macro(3)
π smi_macro π
okay bestie, welcome to smi_macro(3) β it's part of the SMI Management Information Library, and it's literally your one-stop shop for macro and extension info. no cap. π
β¨ NAME β¨
smiGetMacro, smiGetFirstMacro, smiGetNextMacro, smiGetMacroModule β the SMI macro and extension information routines π¦
β¨ SYNOPSIS β¨
#include <smi.h>
SmiMacro *smiGetMacro(SmiModule *smiModulePtr, char *macro);
SmiMacro *smiGetFirstMacro(SmiModule *smiModulePtr);
SmiMacro *smiGetNextMacro(SmiMacro *smiMacroPtr);
SmiModule *smiGetMacroModule(SmiMacro *smiMacroPtr);
typedef struct SmiMacro {
SmiIdentifier name;
SmiDecl decl;
SmiStatus status;
char *description;
char *reference;
} SmiMacro;
β¨ DESCRIPTION β¨
so basically these functions go and fetch info on an extension statement definition (that's the SMIng vibe) or a macro (that's SMIv1/v2, the classics). π«Ά
smiGetMacro() retrieves a struct SmiMacro that represents an extension or macro definition. macro can be either a fully qualified descriptor or just a simple macro or extension name β either one works, she's flexible like that π
. If smiModulePtr is not NULL, it's used to limit the search to that given module. And if the macro isn't found? smiGetMacro() just returns NULL. no drama. π
smiGetFirstMacro() and smiGetNextMacro() are your little duo for iterating through struct SmiMacros one by one. smiGetFirstMacro() returns the first one defined in the module you specified with smiModulePtr. Then every subsequent call to smiGetNextMacro() hands you the next one after that. And when there are no more extension or macro definitions left in the module, you get NULL β that's the signal to stop, babes. π
smiGetMacroModule() returns the module that defines the macro or extension given by struct SmiMacroPtr. it's giving "who's your maker" energy. π
β¨ FILES β¨
${prefix}/include/smi.hβ the SMI library header file πΈ
β¨ SEE ALSO β¨
libsmi(3), smi_module(3), smi.h
β¨ AUTHOR β¨
(C) 1999-2001 Frank Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
and that's the whole page, bestie β sending you off with so much love from the IBR crew, August 16, 2001 πβ¨ (yes we're serving vintage, and she still ate). periodt. π
π¦ where this page comes from
- debian bookworm: libsmi2-dev 0.4.8+dfsg2-16
- debian trixie: libsmi2-dev 0.4.8+dfsg2-17+b1
- 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