38#ifndef LWIP_HDR_APPS_SNMP_TABLE_H
39#define LWIP_HDR_APPS_SNMP_TABLE_H
51struct snmp_table_col_def
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);
70 node_instance_set_test_method set_test;
75snmp_err_t snmp_table_get_instance(
const u32_t *root_oid,
u8_t root_oid_len,
struct snmp_node_instance*
instance);
76snmp_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;
97struct snmp_table_simple_col_def
101 snmp_table_column_data_type_t data_type;
105struct snmp_table_simple_node
108 struct snmp_leaf_node
node;
110 const struct snmp_table_simple_col_def* columns;
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);
115snmp_err_t snmp_table_simple_get_instance(
const u32_t *root_oid,
u8_t root_oid_len,
struct snmp_node_instance*
instance);
116snmp_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) }
124s16_t snmp_table_extract_value_from_s32ref(
struct snmp_node_instance*
instance,
void*
value);
125s16_t snmp_table_extract_value_from_u32ref(
struct snmp_node_instance*
instance,
void*
value);
126s16_t snmp_table_extract_value_from_refconstptr(
struct snmp_node_instance*
instance,
void*
value);
static HINSTANCE instance
static HRESULT set_value(struct d3dx_parameter *param, const void *data, unsigned int bytes, void *dst_data)
HRESULT get_value(const struct table *table, UINT row, UINT column, LONGLONG *val)
GLuint GLint GLboolean GLint GLenum access