Technische Universität Braunschweig
  • Study & Teaching
    • Beginning your Studies
      • Prospective Students
      • Degree Programmes
      • Application
      • Why TU Braunschweig?
    • During your Studies
      • Fresher's Hub
      • Term Dates
      • Courses and Qualifications
      • Practical information
      • Beratungsnavi
      • Financing and Costs
      • Special Circumstances
      • Health & Wellbeing
      • Campus life
    • At the End of your Studies
      • Career Service
      • Alumni
      • Discontinuation and Pre-Certification
      • After graduation
    • Strategies and Quality Management
      • TU Teaching Award
    • For Teaching Staff
      • Strategy, Offers and Information
      • Learning Management System Stud.IP
    • Contact
      • Study Service Centre
      • Academic Advice Service
      • Student Office
      • Department 16 - Academic and Student Affairs
      • Career Service
  • Research
    • Research Profile
      • Core Research Areas
      • Clusters of Excellence at TU Braunschweig
      • Research Projects
      • Research Centres
      • Professors‘ Research Profiles
    • Early Career Researchers
      • Support in the early stages of an academic career
      • PhD-Students
      • Postdocs
      • Junior research group leaders
      • Junior Professorship and Tenure-Track
      • Habilitation
      • Service Offers for Scientists
    • Research Data & Transparency
      • Transparency in Research
      • Research Data
      • Open Access Strategy
    • Research Funding
      • Research Funding Network
      • Research funding
    • Contact
      • Research Services
      • Academy for Graduates
  • Transfer
    • Transfer profile
      • Transfer strategy "TIES® with Impact"
      • Technology Transfer
      • Knowledge Transfer
      • Relationship Management
    • Innovation
      • Startups
      • Patents
    • Offers for schools and pupils
    • For enterprises
      • Friends & Supporters
    • For Alumni*ae
    • For everyone
  • International
    • International Students
      • Why Braunschweig?
      • Degree seeking students
      • Exchange Studies
      • TU Braunschweig Summer School
      • Students from German Schools Abroad
      • Refugees
      • International Student Support
      • International Career Service
    • Going Abroad
      • Studying abroad
      • Internships abroad
      • Teaching and research abroad
      • Working abroad
    • International Researchers
      • Welcome Support for International Researchers
      • Service for Host Institutes
    • Language and intercultural competence training
      • Learning German
      • Learning Foreign Languages
      • Intercultural Communication
    • International Profile
      • Internationalisation
      • International Cooperations
      • Strategic partnerships
      • International networks
    • International House
      • About us
      • Contact & Office Hours
      • News and Events
      • Newsletter, Podcast & Videos
      • Job Advertisements
  • TU Braunschweig
    • Our Profile
      • Aims & Values
      • Regulations and Guidelines
      • The University Development Initiative 2030
      • Ecoversity – the TU Braunschweig as a university ecosystem
      • Equal Opportunity
      • Diversity
      • Sustainability
      • Facts & Figures
      • Our History
    • Presidency & Organisation
      • Executive Board
      • Designated Offices
      • Administration
      • Facilities
      • Committees
      • Student body
    • Career
      • Working at TU Braunschweig
      • Vacancies
      • Information and Offers for New Employees
    • Faculties
      • Carl-Friedrich-Gauß-Fakultät
      • Faculty of Life Sciences
      • Faculty of Architecture, Civil Engineering and Environmental Sciences
      • Faculty of Mechanical Engineering
      • Faculty of Electrical Engineering, Information Technology, Physics
      • Faculty of Humanities and Education
      • Institutes from A to Z
    • Events
  • Search
  • Quicklinks
    IBR Login
    • Library
    • Mailinglists
    • Webmail
    • Knowledge Base
    • Wiki
    • Account Management
    • Services Status
    • People Search
    • Webmail
    • cloud.TU Braunschweig
    • Messenger
    • Cafeteria
    • TUconnect (student platform)
    • Emergency
    • Stud.IP
    • Library Catalogue
    • Research Information System
    • Information Portal (employees)
    • Link Collection
    • DE
    • EN
    • Instagram
    • YouTube
    • LinkedIn
    • Mastodon
    • Bluesky

    Menu
    Technische Universität BraunschweigIBR
    • Organisation
    • Faculties
    • Carl-Friedrich-Gauß-Fakultät
    • Institutes
    • Institute of Operating Systems and Computer Networks
    • Current Projects
    • libsmi
    • libsmi: Library
    Logo IBR
    • libsmi
      • Home
      • Web tools
      • Download
      • Modules
      • Library
        • Example
      • Tools
        • Diagrams
      • Documentation
        • Manual pages
        • XML mapping
      • People
      • Mailing list

    The library

    The purpose of libsmi's core, the library libsmi, is to

    • give network management applications a concise, programmer-friendly interface to access MIB, PIB and YANG module information, independent of the underlying data modelling language and its version,
    • supply efficient validating parsers for SMIv1, SMIv2, SPPI and YANG modules, and
    • supply a modular architecture that allows to add further sources of module definitions without the need to modify existing applications that use the library.

    The library interface allows an application to access all information shown in the diagram below, either through explicitly named identifiers, e.g. IF-MIB::ifTable or 1.3.6.1.2.1.2.2, or through iterating functions that retrieve definitions the application does not know in advance, e.g. for MIB browsers.

    UML class diagram of the libsmi data model: SmiModule with imports and revisions contains types, nodes, macros and identities; types have ranges and named numbers; nodes refer to their type and have elements, options and refinements
    The data model of the libsmi API (the structures of smi.h).

    API overview

    AreaFunctionsManual page
    Initialization, configuration, module path, error handling smiInit(), smiExit(), smiLoadModule(), smiSetPath(), smiReadConfig(), smiSetErrorLevel(), smiSetErrorHandler() smi_config(3)
    Modules, imports, revisions smiGetModule(), smiGetFirstModule(), smiGetFirstImport(), smiGetFirstRevision(), smiIsImported() smi_module(3)
    Types, ranges, named numbers smiGetType(), smiGetFirstType(), smiGetParentType(), smiGetFirstRange(), smiGetFirstNamedNumber() smi_type(3)
    Nodes of the OID tree, tables, groups, compliances smiGetNode(), smiGetNodeByOID(), smiGetFirstNode(), smiGetFirstChildNode(), smiGetParentNode(), smiGetRelatedNode(), smiGetFirstElement(), smiGetNodeType() smi_node(3)
    Macros, identities smiGetMacro(), smiGetIdentity() smi_macro(3), smi_identity(3)
    Rendering of values, OIDs and types smiRenderOID(), smiRenderValue(), smiRenderNode(), smiRenderType() smi_render(3)
    Utilities: sizes of types, memory helpers smiGetMinSize(), smiGetMaxSize(), smiFree() smi_util(3)
    YANG modules and statements yangGetModule(), yangGetFirstChildNode(), yangGetNextChildNode(), yangIsModule() yang_node(3)

    An overview of all functions is in libsmi(3). Applications include <smi.h> and link with -lsmi; pkg-config --cflags --libs libsmi gives the flags, and CMake projects use find_package(libsmi) and the target libsmi::smi. A small complete program is shown in the example.

    Where modules are found

    Modules are searched along a path of directories that is compiled into the library (by default all directories of the bundled modules) and can be changed in the global configuration file smi.conf, in the user's ~/.smirc, with the SMIPATH environment variable and by the application (smiSetPath()). Configuration files can hold options per application, e.g. to preload modules or to hide certain error messages. Module files are named after the module, optionally with an extension such as .mib, .txt or .yang; YANG modules may carry a revision (name@2018-02-20.yang). Details are in smi_config(3).


    last changed 2026-11-18, 09:37 by Frank Steinberg
    http://www.ibr.cs.tu-bs.de/projects/libsmi/library.xml · retrieved 2026-12-06

    For All Visitors

    Vacancies of TU Braunschweig
    Career Service' Job Exchange 
    Merchandising

    For Students

    Term Dates
    Courses
    Degree Programmes
    Information for Freshman
    TUCard

    Internal Tools

    Glossary (GER-EN)
    Change your Personal Data

    Contact

    Technische Universität Braunschweig
    Universitätsplatz 2
    38106 Braunschweig

    P. O. Box: 38092 Braunschweig
    GERMANY

    Phone: +49 (0) 531 391-0

    Getting here

    © Technische Universität Braunschweig
    Legal Notice Privacy Accessibility

    TU Braunschweig uses the software Matomo for anonymised web analysis. The data serve to optimise the web offer.
    You can find more information in our data protection declaration.