SNMP: Table API cleanup

This commit is contained in:
Dirk Ziegelmeier 2016-01-07 09:53:25 +01:00
parent fbdfba2509
commit 4e8574bd23
2 changed files with 8 additions and 5 deletions

View File

@ -143,10 +143,6 @@ union snmp_variant_value
s32_t s32;
};
#define SNMP_VARIANT_VALUE_TYPE_U32 0
#define SNMP_VARIANT_VALUE_TYPE_S32 1
#define SNMP_VARIANT_VALUE_TYPE_PTR 2
#define SNMP_VARIANT_VALUE_TYPE_CONST_PTR 3
/**
SNMP MIB node types

View File

@ -83,11 +83,18 @@ snmp_err_t snmp_table_get_next_instance(const u32_t *root_oid, u8_t root_oid_len
/* simple read-only table */
typedef enum {
SNMP_VARIANT_VALUE_TYPE_U32,
SNMP_VARIANT_VALUE_TYPE_S32,
SNMP_VARIANT_VALUE_TYPE_PTR,
SNMP_VARIANT_VALUE_TYPE_CONST_PTR
} snmp_table_column_data_type_t;
struct snmp_table_simple_col_def
{
u32_t index;
u8_t asn1_type;
u8_t data_type; /* any of SNMP_VARIANT_VALUE_TYPE_*, depending of what union member is used to store the value*/
snmp_table_column_data_type_t data_type; /* depending of what union member is used to store the value*/
};
struct snmp_table_simple_node