snmp: changed name (snmp_length_outbound_varbind -> snmp_varbind_length)

This commit is contained in:
goldsimon 2016-07-08 10:24:06 +02:00
parent 288fc8ede3
commit 52da49cd81
2 changed files with 5 additions and 3 deletions

View File

@ -1167,8 +1167,9 @@ snmp_prepare_outbound_frame(struct snmp_request *request)
return ERR_OK;
}
/** Calculate the length of a varbind list */
err_t
snmp_length_outbound_varbind(struct snmp_varbind *varbind, struct snmp_varbind_len *len)
snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len)
{
/* calculate required lengths */
snmp_asn1_enc_oid_cnt(varbind->oid.id, varbind->oid.len, &len->oid_value_len);
@ -1239,7 +1240,7 @@ snmp_append_outbound_varbind(struct snmp_pbuf_stream *pbuf_stream, struct snmp_v
struct snmp_varbind_len len;
err_t err;
err = snmp_length_outbound_varbind(varbind, &len);
err = snmp_varbind_length(varbind, &len);
if (err != ERR_OK) {
return err;

View File

@ -160,6 +160,7 @@ struct snmp_request
u8_t value_buffer[SNMP_MAX_VALUE_SIZE];
};
/** A helper struct keeping length information about varbinds */
struct snmp_varbind_len
{
u8_t vb_len_len;
@ -180,7 +181,7 @@ extern void* snmp_traps_handle;
void snmp_receive(void *handle, struct pbuf *p, const ip_addr_t *source_ip, u16_t port);
err_t snmp_sendto(void *handle, struct pbuf *p, const ip_addr_t *dst, u16_t port);
u8_t snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result);
err_t snmp_length_outbound_varbind(struct snmp_varbind *varbind, struct snmp_varbind_len *len);
err_t snmp_varbind_length(struct snmp_varbind *varbind, struct snmp_varbind_len *len);
err_t snmp_append_outbound_varbind(struct snmp_pbuf_stream *pbuf_stream, struct snmp_varbind* varbind);
#ifdef __cplusplus