return (u_char *)&long_ret;
case LLDP_SNMP_STATS_RX_DISCARDED:
case LLDP_SNMP_STATS_RX_ERRORS:
+ /* We discard only frame with errors. Therefore, the two values
+ * are equal */
long_ret = hardware->h_rx_discarded_cnt;
return (u_char *)&long_ret;
case LLDP_SNMP_STATS_RX_TLVDISCARDED:
case LLDP_SNMP_STATS_RX_TLVUNRECOGNIZED:
- /* Not really handled */
- long_ret = 0;
+ /* We discard only unrecognized TLV. Malformed TLV
+ implies dropping the whole frame */
+ long_ret = hardware->h_rx_unrecognized_cnt;
return (u_char *)&long_ret;
case LLDP_SNMP_STATS_RX_AGEOUTS:
long_ret = hardware->h_rx_ageout_cnt;
LLOG_DEBUG("unknown CDP TLV type (%d) received on %s",
ntohs(tlv->tlv_type), hardware->h_ifname);
f += sizeof(struct cdp_tlv_head) + len;
+ hardware->h_rx_unrecognized_cnt++;
}
}
if (!software && platform) {
default:
LLOG_DEBUG("unknown EDP TLV type (%d) received on %s",
tlv->tlv_type, hardware->h_ifname);
+ hardware->h_rx_unrecognized_cnt++;
}
f += len;
}
default:
/* Unknown Dot3 TLV, ignore it */
f += size;
+ hardware->h_rx_unrecognized_cnt++;
}
} else {
LLOG_INFO("unknown org tlv received on %s",
hardware->h_ifname);
+ hardware->h_rx_unrecognized_cnt++;
f += size;
}
break;
u_int64_t h_rx_cnt;
u_int64_t h_rx_discarded_cnt;
u_int64_t h_rx_ageout_cnt;
+ u_int64_t h_rx_unrecognized_cnt;
u_int8_t *h_proto_macs;
time_t h_start_probe;