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: smi_attribute(3)
    Logo IBR
    • libsmi
      • Home
      • Web tools
      • Download
      • Modules
      • Library
        • Example
      • Tools
        • Diagrams
      • Documentation
        • Manual pages
        • XML mapping
      • People
      • Mailing list

    smi_attribute(3)

    SMI Attribute information routines

    All manual pages · libsmi 0.6.0-rc1

    Name

    smiGetAttribute, smiGetFirstAttribute, smiGetNextAttribute, smiGetAttributeParentClass, smiGetAttributeParentType, smiGetFirstUniqueAttribute, smiGetNextUniqueAttribute, smiGetEvent, smiGetFirstEvent, smiGetNextEvent, smiGetAttributeFirstRange, smiGetAttributeNextRange, smiGetAttributeFirstNamedNumber, smiGetAttributeNextNamedNumber - SMI Attribute information routines

    Synopsis

    #include <smi.h>
    
    SmiAttribute *smiGetAttribute(SmiClass *smiClassPtr, char *name);
    
    SmiAttribute *smiGetFirstAttribute(SmiClass *smiClassPtr);
    
    SmiAttribute *smiGetNextAttribute(SmiAttribute *smiAttributePtr);
    
    SmiType *smiGetAttributeParentType(SmiType *smiAttributePtr);
    
    SmiClass *smiGetAttributeParentClass(SmiType *smiAttributePtr);
    
    SmiAttribute *smiGetFirstUniqueAttribute(SmiClass *smiClassPtr);
    
    SmiAttribute *smiGetNextUniqueAttribute(SmiAttribute *smiAttributePtr);
    
    SmiRange *smiGetAttributeFirstRange(SmiAttribute *smiAttributePtr);
    
    SmiRange *smiGetAttributeNextRange(SmiRange *smiRangePtr);
    
    SmiNamedNumber *smiGetAttributeFirstNamedNumber(SmiAttribute *smiAttributePtr);
    
    SmiNamedNumber *smiGetAttributeNextNamedNumber(SmiNamedNumber *smiNamedNumberPtr);
    
    
    typedef struct SmiAttribute {
        SmiIdentifier       name;
        SmiDecl             decl;
        SmiStatus           status;
        char                *description;
        char                *reference;
    } SmiAttribute;
    
    typedef struct SmiRange {
        SmiValue            minValue;
        SmiValue            maxValue;
    } SmiRange;
    
    typedef struct SmiNamedNumber {
        SmiIdentifier       name;
        SmiValue            value;
    } SmiNamedNumber;
    

    Description

    These functions retrieve information on a SMIng Attribute definition (SMIng).

    smiGetAttribute(SmiClass *smiClassPtr, char *name) returns a pointer to struct SmiAttribute for the Attribute with the given name in the given class(smiClassPtr), or NULL if the attribute with the given name does not exist.

    smiGetFirstAttribute(SmiClass *smiClassPtr) and smiGetNextAttribute(SmiAttribute *smiAttributePtr) are used to iterate through the attributes of the class given by smiClassPtr. They return a pointer to struct SmiAttribute that represents an attribute or NULL if there are no attributes left in the class, or error has occurred.

    smiGetAttributeParentClass(SmiAttribute *smiAttributePtr) returns a pointer to a struct SmiClass, pointing to the parent class of the given smiAttributePtr, or NULL if the attribute does not reference class. Note that attributes always have either parent type or parent class.

    smiGetAttributeParentType(SmiType *smiAttributePtr) returns a pointer to a struct SmiType, pointing to the parent type of the given smiAttributePtr, or NULL if the attribute does not reference type. Note that attributes always have either parent type or parent class.

    smiGetFirstUniqueAttribute(SmiClass *smiClassPtr) and smiGetNextUniqueAttribute(SmiType *smiAttributePtr) are used to iterate through the unique attributes of the class given by smiClassPtr. They return a pointer to struct SmiAttribute that represents a unique attribute or NULL if there are no unique attributes left in the class, or error has occurred. This function MUST NOT be used for scalar classes, so it should only be called after isClassScalar() has returned 0.

    smiGetAttributeFirstRange(SmiAttribute *smiAttributePtr), and smiGetAttributeNextRange(SmiRange *smiRangePtr) are used to iterate through ranges that restrict number or octet string types. Both functions return a pointer to the struct SmiRange representing the range, or NULL if there are no more ranges, or error has occurred.

    smiGetAttributeFirstNamedNumber(SmiAttribute *smiAttributePtr) and smiGetAttributeNextNamedNumber(SmiNamedNumber *smiNamedNumberPtr) are used to iterate through named numbers of bits or enumerations for attributes, which reference types, and to retrieve the reference restriction of a pointer. Both functions return a pointer to the struct SmiNamedNumber representing the named number, or NULL if there are no named numbers left, or error has occurred. smiGetFirstNamedNumber() can be used to retrieve the name of the identity that is restricting Pointer type, as it is stored as the name of the first named number.

    Files

    /usr/include/smi.h    SMI library header file

    See also

    libsmi(3), smi_module(3), smi.h

    Author

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


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

    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.