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. πŸŽ€