SNMP: TABs -> spaces

This commit is contained in:
Dirk Ziegelmeier 2017-03-02 07:33:18 +01:00
parent 05a595f745
commit 83de16678c
3 changed files with 17 additions and 17 deletions

View File

@ -77,9 +77,9 @@ snmp_version_enabled(u8_t version)
{
LWIP_ASSERT("Invalid SNMP version", (version == SNMP_VERSION_1) || (version == SNMP_VERSION_2c)
#if LWIP_SNMP_V3
|| (version == SNMP_VERSION_3)
|| (version == SNMP_VERSION_3)
#endif
);
);
if (version == SNMP_VERSION_1) {
return v1_enabled;
@ -117,19 +117,19 @@ snmp_version_enable(u8_t version, u8_t enable)
{
LWIP_ASSERT("Invalid SNMP version", (version == SNMP_VERSION_1) || (version == SNMP_VERSION_2c)
#if LWIP_SNMP_V3
|| (version == SNMP_VERSION_3)
|| (version == SNMP_VERSION_3)
#endif
);
);
if (version == SNMP_VERSION_1) {
v1_enabled = enable;
v1_enabled = enable;
}
else if (version == SNMP_VERSION_2c) {
v2c_enabled = enable;
v2c_enabled = enable;
}
#if LWIP_SNMP_V3
else { /* version == SNMP_VERSION_3 */
v3_enabled = enable;
v3_enabled = enable;
}
#endif
}
@ -917,7 +917,7 @@ snmp_parse_inbound_frame(struct snmp_request *request)
IF_PARSE_ASSERT(parent_tlv_value_len > 0);
/* Remember position */
inbound_msgAuthenticationParameters_offset = pbuf_stream.offset;
LWIP_UNUSED_ARG(inbound_msgAuthenticationParameters_offset);
LWIP_UNUSED_ARG(inbound_msgAuthenticationParameters_offset);
/* Read auth parameters */
/* IF_PARSE_ASSERT(tlv.value_len <= SNMP_V3_MAX_AUTH_PARAM_LENGTH); */
IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_authentication_parameters,

View File

@ -57,7 +57,7 @@ static u8_t snmp_name_to_oid(const char *name, u32_t *oid, u8_t len)
u8_t i;
for (i = 0; i < len; i++) {
oid[i] = name[i];
oid[i] = name[i];
}
return len;
@ -203,22 +203,22 @@ static snmp_err_t usmusertable_get_next_instance(const u32_t *column, struct snm
engineid_start = 1;
if (engineid_len != eid_len) {
/* EngineID length does not match! */
return SNMP_ERR_NOSUCHINSTANCE;
/* EngineID length does not match! */
return SNMP_ERR_NOSUCHINSTANCE;
}
if (engineid_len > row_oid->len) {
/* Verify partial EngineID */
snmp_engineid_to_oid(engineid, engineid_oid, row_oid->len - 1);
if (!snmp_oid_equal(&row_oid->id[engineid_start], row_oid->len - 1, engineid_oid, row_oid->len - 1)) {
return SNMP_ERR_NOSUCHINSTANCE;
return SNMP_ERR_NOSUCHINSTANCE;
}
}
else {
/* Verify complete EngineID */
snmp_engineid_to_oid(engineid, engineid_oid, engineid_len);
if (!snmp_oid_equal(&row_oid->id[engineid_start], engineid_len, engineid_oid, engineid_len)) {
return SNMP_ERR_NOSUCHINSTANCE;
return SNMP_ERR_NOSUCHINSTANCE;
}
}
@ -230,8 +230,8 @@ static snmp_err_t usmusertable_get_next_instance(const u32_t *column, struct snm
name_start = engineid_start + engineid_len + 1;
if (name_len > SNMP_V3_MAX_USER_LENGTH) {
/* specified name is too long, max length is 32 according to mib file.*/
return SNMP_ERR_NOSUCHINSTANCE;
/* specified name is too long, max length is 32 according to mib file.*/
return SNMP_ERR_NOSUCHINSTANCE;
}
if (row_oid->len < engineid_len + name_len + 2) {
@ -245,7 +245,7 @@ static snmp_err_t usmusertable_get_next_instance(const u32_t *column, struct snm
/* Full name given according to oid. Also test for too much data.*/
u8_t tmplen = row_oid->len - engineid_len - 2;
if (!snmp_oid_in_range(&row_oid->id[name_start], name_len, usmUserTable_oid_ranges, tmplen)) {
return SNMP_ERR_NOSUCHINSTANCE;
return SNMP_ERR_NOSUCHINSTANCE;
}
}

View File

@ -279,7 +279,7 @@
* THIS IS UNDER DEVELOPMENT AND SHOULD NOT BE ENABLED IN PRODUCTS.
*/
#ifndef LWIP_SNMP_V3
#define LWIP_SNMP_V3 0
#define LWIP_SNMP_V3 1
#endif
#ifndef LWIP_SNMP_V3_MBEDTLS