38 #ifndef LWIP_HDR_APPS_SNMP_TABLE_H 39 #define LWIP_HDR_APPS_SNMP_TABLE_H 51 struct snmp_table_col_def
59 struct snmp_table_node
62 struct snmp_leaf_node
node;
64 const struct snmp_table_col_def* columns;
65 snmp_err_t (*get_cell_instance)(
const u32_t* column,
const u32_t* row_oid, u8_t row_oid_len,
struct snmp_node_instance* cell_instance);
66 snmp_err_t (*get_next_cell_instance)(
const u32_t* column,
struct snmp_obj_id* row_oid,
struct snmp_node_instance* cell_instance);
68 node_instance_get_value_method get_value;
70 node_instance_set_test_method set_test;
72 node_instance_set_value_method set_value;
75 snmp_err_t snmp_table_get_instance(
const u32_t *root_oid, u8_t root_oid_len,
struct snmp_node_instance* instance);
76 snmp_err_t snmp_table_get_next_instance(
const u32_t *root_oid, u8_t root_oid_len,
struct snmp_node_instance* instance);
78 #define SNMP_TABLE_CREATE(oid, columns, get_cell_instance_method, get_next_cell_instance_method, get_value_method, set_test_method, set_value_method) \ 79 {{{ SNMP_NODE_TABLE, (oid) }, \ 80 snmp_table_get_instance, \ 81 snmp_table_get_next_instance }, \ 82 (u16_t)LWIP_ARRAYSIZE(columns), (columns), \ 83 (get_cell_instance_method), (get_next_cell_instance_method), \ 84 (get_value_method), (set_test_method), (set_value_method)} 86 #define SNMP_TABLE_GET_COLUMN_FROM_OID(oid) ((oid)[1]) 91 SNMP_VARIANT_VALUE_TYPE_U32,
92 SNMP_VARIANT_VALUE_TYPE_S32,
93 SNMP_VARIANT_VALUE_TYPE_PTR,
94 SNMP_VARIANT_VALUE_TYPE_CONST_PTR
95 } snmp_table_column_data_type_t;
97 struct snmp_table_simple_col_def
101 snmp_table_column_data_type_t data_type;
105 struct snmp_table_simple_node
108 struct snmp_leaf_node
node;
110 const struct snmp_table_simple_col_def* columns;
111 snmp_err_t (*get_cell_value)(
const u32_t* column,
const u32_t* row_oid, u8_t row_oid_len,
union snmp_variant_value* value, u32_t* value_len);
112 snmp_err_t (*get_next_cell_instance_and_value)(
const u32_t* column,
struct snmp_obj_id* row_oid,
union snmp_variant_value* value, u32_t* value_len);
115 snmp_err_t snmp_table_simple_get_instance(
const u32_t *root_oid, u8_t root_oid_len,
struct snmp_node_instance* instance);
116 snmp_err_t snmp_table_simple_get_next_instance(
const u32_t *root_oid, u8_t root_oid_len,
struct snmp_node_instance* instance);
118 #define SNMP_TABLE_CREATE_SIMPLE(oid, columns, get_cell_value_method, get_next_cell_instance_and_value_method) \ 119 {{{ SNMP_NODE_TABLE, (oid) }, \ 120 snmp_table_simple_get_instance, \ 121 snmp_table_simple_get_next_instance }, \ 122 (u16_t)LWIP_ARRAYSIZE(columns), (columns), (get_cell_value_method), (get_next_cell_instance_and_value_method) } 124 s16_t snmp_table_extract_value_from_s32ref(
struct snmp_node_instance* instance,
void* value);
125 s16_t snmp_table_extract_value_from_u32ref(
struct snmp_node_instance* instance,
void* value);
126 s16_t snmp_table_extract_value_from_refconstptr(
struct snmp_node_instance* instance,
void* value);
Connected isochronous stream node.
SNMP core API for implementing MIBs.
SNMP server options list.