#define LLDP_SNMP_LOCAL_DOT3_AUTONEG_MAU 8
#define LLDP_SNMP_LOCAL_DOT3_AGG_STATUS 9
#define LLDP_SNMP_LOCAL_DOT3_AGG_ID 10
+#define LLDP_SNMP_LOCAL_DOT3_MFS 11
/* Remote ports */
#define LLDP_SNMP_REMOTE_CIDSUBTYPE 1
#define LLDP_SNMP_REMOTE_CID 2
#define LLDP_SNMP_REMOTE_DOT3_AUTONEG_MAU 13
#define LLDP_SNMP_REMOTE_DOT3_AGG_STATUS 14
#define LLDP_SNMP_REMOTE_DOT3_AGG_ID 15
+#define LLDP_SNMP_REMOTE_DOT3_MFS 16
/* Local vlans */
#define LLDP_SNMP_LOCAL_DOT1_VLANNAME 1
/* Remote vlans */
case LLDP_SNMP_LOCAL_DOT3_AGG_ID:
long_ret = hardware->h_lport.p_aggregid;
return (u_char *)&long_ret;
+ case LLDP_SNMP_LOCAL_DOT3_MFS:
+ long_ret = hardware->h_lport.p_mfs;
+ return (u_char *)&long_ret;
#endif
default:
break;
case LLDP_SNMP_REMOTE_DOT3_AGG_ID:
long_ret = hardware->h_rport->p_aggregid;
return (u_char *)&long_ret;
+ case LLDP_SNMP_REMOTE_DOT3_MFS:
+ long_ret = hardware->h_rport->p_mfs;
+ return (u_char *)&long_ret;
#endif
default:
break;
{1, 5, 4623, 1, 2, 3, 1, 1}},
{LLDP_SNMP_LOCAL_DOT3_AGG_ID, ASN_INTEGER, RONLY, agent_h_local_port, 8,
{1, 5, 4623, 1, 2, 3, 1, 2}},
+ {LLDP_SNMP_LOCAL_DOT3_MFS, ASN_INTEGER, RONLY, agent_h_local_port, 8,
+ {1, 5, 4623, 1, 2, 4, 1, 1}},
#endif
/* Remote ports */
{LLDP_SNMP_REMOTE_CIDSUBTYPE, ASN_INTEGER, RONLY, agent_h_remote_port, 5, {1, 4, 1, 1, 4}},
{1, 5, 4623, 1, 3, 3, 1, 1}},
{LLDP_SNMP_REMOTE_DOT3_AGG_ID, ASN_INTEGER, RONLY, agent_h_remote_port, 8,
{1, 5, 4623, 1, 3, 3, 1, 2}},
+ {LLDP_SNMP_REMOTE_DOT3_MFS, ASN_INTEGER, RONLY, agent_h_remote_port, 8,
+ {1, 5, 4623, 1, 3, 4, 1, 1}},
#endif
#ifdef ENABLE_DOT1
/* Local vlans */
const u_int8_t dot3[] = LLDP_TLV_ORG_DOT3;
struct lldp_aggreg aggreg;
struct lldp_macphy macphy;
+ struct lldp_mfs mfs;
#endif
#ifdef ENABLE_LLDPMED
int i;
IOV_NEW;
iov[c].iov_base = &macphy;
iov[c].iov_len = sizeof(macphy);
+
+ /* MFS */
+ memset(&mfs, 0, sizeof(mfs));
+ mfs.tlv_head.type_len = LLDP_TLV_HEAD(LLDP_TLV_ORG,
+ sizeof(mfs.tlv_org_id) +
+ sizeof(mfs.tlv_org_subtype) +
+ sizeof(mfs.mfs));
+ memcpy(mfs.tlv_org_id, dot3, sizeof(mfs.tlv_org_id));
+ mfs.tlv_org_subtype = LLDP_TLV_DOT3_MFS;
+ mfs.mfs = htons(port->p_mfs);
+ IOV_NEW;
+ iov[c].iov_base = &mfs;
+ iov[c].iov_len = sizeof(mfs);
#endif
#ifdef ENABLE_LLDPMED
ntohl(*(u_int32_t*)(frame + f + 5));
f += size;
break;
+ case LLDP_TLV_DOT3_MFS:
+ if (size < 6) {
+ LLOG_WARNX("too short mfs tlv "
+ "received on %s",
+ hardware->h_ifname);
+ goto malformed;
+ }
+ port->p_mfs =
+ ntohs(*(u_int16_t*)(frame + f + 4));
+ f += size;
+ break;
default:
/* Unknown Dot3 TLV, ignore it */
f += size;