mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +00:00
Convert SNMP snmp_vb_enumerator_err_t to a typedef and fix resulting compile error
This commit is contained in:
parent
6dcb2b2415
commit
ce6ea0df15
@ -1547,7 +1547,7 @@ snmp_execute_write_callbacks(struct snmp_request *request)
|
|||||||
snmp_vb_enumerator_init(&inbound_varbind_enumerator, request->inbound_pbuf, request->inbound_varbind_offset, request->inbound_varbind_len);
|
snmp_vb_enumerator_init(&inbound_varbind_enumerator, request->inbound_pbuf, request->inbound_varbind_offset, request->inbound_varbind_len);
|
||||||
vb.value = NULL; /* do NOT decode value (we enumerate outbound buffer here, so all varbinds have values assigned, which we don't need here) */
|
vb.value = NULL; /* do NOT decode value (we enumerate outbound buffer here, so all varbinds have values assigned, which we don't need here) */
|
||||||
|
|
||||||
while (snmp_vb_enumerator_get_next(&inbound_varbind_enumerator, &vb) == ERR_OK) {
|
while (snmp_vb_enumerator_get_next(&inbound_varbind_enumerator, &vb) == SNMP_VB_ENUMERATOR_ERR_OK) {
|
||||||
snmp_write_callback(vb.oid.id, vb.oid.len, snmp_write_callback_arg);
|
snmp_write_callback(vb.oid.id, vb.oid.len, snmp_write_callback_arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,11 +79,12 @@ struct snmp_varbind_enumerator
|
|||||||
u16_t varbind_count;
|
u16_t varbind_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef u8_t snmp_vb_enumerator_err_t;
|
typedef enum {
|
||||||
#define SNMP_VB_ENUMERATOR_ERR_OK 0
|
SNMP_VB_ENUMERATOR_ERR_OK = 0,
|
||||||
#define SNMP_VB_ENUMERATOR_ERR_EOVB 1
|
SNMP_VB_ENUMERATOR_ERR_EOVB = 1,
|
||||||
#define SNMP_VB_ENUMERATOR_ERR_ASN1ERROR 2
|
SNMP_VB_ENUMERATOR_ERR_ASN1ERROR = 2,
|
||||||
#define SNMP_VB_ENUMERATOR_ERR_INVALIDLENGTH 3
|
SNMP_VB_ENUMERATOR_ERR_INVALIDLENGTH = 3
|
||||||
|
} snmp_vb_enumerator_err_t;
|
||||||
|
|
||||||
void snmp_vb_enumerator_init(struct snmp_varbind_enumerator* enumerator, struct pbuf* p, u16_t offset, u16_t length);
|
void snmp_vb_enumerator_init(struct snmp_varbind_enumerator* enumerator, struct pbuf* p, u16_t offset, u16_t length);
|
||||||
snmp_vb_enumerator_err_t snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator* enumerator, struct snmp_varbind* varbind);
|
snmp_vb_enumerator_err_t snmp_vb_enumerator_get_next(struct snmp_varbind_enumerator* enumerator, struct snmp_varbind* varbind);
|
||||||
|
Loading…
Reference in New Issue
Block a user