smi_class(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

πŸ’– smi_class(3) πŸ’–

okay bestie, welcome to smi_class(3) from the SMI Management Information Library. this page is literally all about SMIng class info routines β€” getting class deets, walking class lists, finding parents, and checking if a class is scalar. no cap, it's giving very useful library tea 🫢✨


✨ NAME ✨

SmiClass information routines, periodt: smiGetClass, smiGetFirstClass, smiGetNextClass, smiGetClassModule, smiGetParentClass, and smiIsClassScalar β€” SMI class information routines.


🌸 SYNOPSIS 🌸

#include <smi.h>

SmiClass *smiGetClass(SmiModule *smiModulePtr, char *name);

SmiClass *smiGetFirstClass(SmiModule *smiModulePtr);

SmiClass *smiGetNextClass(SmiClass *smiClassPtr);

SmiClass *smiGetParentClass(SmiClass *smiClassPtr);

SmiModule *smiGetClassModule(SmiClass *smiClassPtr);

int smiIsClassScalar(SmiClass *smiClassPtr);

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

πŸ’… DESCRIPTION πŸ’…

These functions retrieve information on a SMIng class definition (SMIng). like, that's the whole vibe.

  • smiGetClass(SmiModule *smiModulePtr,char *name) β€” returns a pointer to struct SmiClass that represents the class with the given name in the given module (smiModulePtr), or NULL if the class with the given name does not exist.
  • smiGetFirstClass(SmiModule *smiModulePtr) and smiGetNextClass(SmiClass *smiClassPtr) β€” used to iterate through the classes of the module given by smiModulePtr. They return a pointer to struct SmiClass that represents a class or NULL if there are no classes left in the module, or error has occurred.
  • smiGetClassModule(SmiClass *smiClassPtr) β€” returns a pointer to struct SmiModule, of the module containing the given class.
  • smiGetParentClass(SmiClass *smiClassPtr) β€” returns a pointer to struct SmiClass pointing to the parent of the given smiClassPtr, or NULL if the class is not derived.
  • smiIsClassScalar(SmiClass *smiClassPtr) β€” returns int 1 if the class is scalar (its unique statement contains an empty list) or 0 otherwise. This method can be used in conjunction with smiGetFirstUniqueAttribute() to determine whether the class is meant to be instantiated separately (has unique statement with nonempty list), or if it is meant to be used as part of another class (has no unique statement).
not me being obsessed with how clean this API is. it's giving main character energy, fr fr πŸ˜­πŸ’…

πŸ“ FILES πŸ“

  • ${prefix}/include/smi.h β€” SMI library header file

πŸ‘€ SEE ALSO πŸ‘€


πŸ‘‘ AUTHOR πŸ‘‘

  • (C) 2007 Kaloyan Kanev, Jacobs University, Germany <k.kanev@jacobs-university.de>

okay bestie, that's the whole page. this was smi_class(3) from the SMI Management Information Library, dated February 10, 2007. stay iconic, read your man pages, and don't forget to close your file descriptors πŸ’…βœ¨πŸ¦‹