zoukankan      html  css  js  c++  java
  • mib.c

    函数 sprint_realloc_by_type  (E:code et-snmp-5.4.2.1snmplibmib.c)的主要作用是:

    解析传入的mib中的节点,根据mib节点类型,将其转换为可以识别的数字存入buffer中。

    int
    sprint_realloc_by_type(u_char ** buf, size_t * buf_len, size_t * out_len,
                           int allow_realloc,
                           const netsnmp_variable_list * var,
                           const struct enum_list *enums,
                           const char *hint, const char *units)

    {     DEBUGMSGTL(("output", "sprint_by_type, type %d ", var->type));

        switch (var->type) {    

        case ASN_INTEGER:        

           return sprint_realloc_integer(buf, buf_len, out_len, allow_realloc, var, enums, hint, units);    

                case ASN_OCTET_STR:        

          return sprint_realloc_octet_string(buf, buf_len, out_len, allow_realloc, var, enums, hint,  units);

                 .................    

          /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */    

         default:        

           DEBUGMSGTL(("sprint_by_type", "bad type: %d ", var->type));        

          return sprint_realloc_badtype(buf, buf_len, out_len, allow_realloc, var, enums, hint, units);    

        }

    }

  • 相关阅读:
    Python
    QinQ 技术解析
    TLS/SSL 协议
    TLS/SSL 协议
    TLS/SSL 协议
    排序算法之基本排序算法(冒泡、插入、选择)
    Spring Boot 学习笔记--手写版
    mysql -- collection一对多查询
    mybatis 批量操作增删改查
    easyUI之datagrid绑定后端返回数据的两种方式
  • 原文地址:https://www.cnblogs.com/rohens-hbg/p/4747862.html
Copyright © 2011-2022 走看看