AC_MSG_RESULT(no)
fi
+#Dot1
+AC_ARG_ENABLE(dot1, AC_HELP_STRING([--enable-dot1],
+ [Enable LLDP Dot1 extension]),
+ [enable_dot1=$enableval],[enable_dot1=yes])
+AC_MSG_CHECKING(whether to enable Dot1)
+if test x$enable_dot1 = xyes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_DOT1],, [Enable LLDP Dot1 extension])
+else
+ AC_MSG_RESULT(no)
+fi
+
+#Dot3
+AC_ARG_ENABLE(dot3, AC_HELP_STRING([--enable-dot3],
+ [Enable LLDP Dot3 extension]),
+ [enable_dot3=$enableval],[enable_dot3=yes])
+AC_MSG_CHECKING(whether to enable Dot3)
+if test x$enable_dot3 = xyes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_DOT3],, [Enable LLDP Dot3 extension])
+else
+ AC_MSG_RESULT(no)
+fi
+
AC_OUTPUT
return phardware;
}
+#ifdef ENABLE_DOT1
struct lldpd_vlan*
header_pvindexed_table(struct variable *vp, oid *name, size_t *length,
int exact, size_t *var_len, WriteMethod **write_method)
return pvlan;
}
+#endif
/* Scalars */
#define LLDP_SNMP_TXINTERVAL 1
agent_h_local_port(struct variable *vp, oid *name, size_t *length,
int exact, size_t *var_len, WriteMethod **write_method)
{
+#ifdef ENABLE_DOT3
static uint8_t bit;
+#endif
struct lldpd_hardware *hardware;
static unsigned long long_ret;
case LLDP_SNMP_LOCAL_PORTDESC:
*var_len = strlen(hardware->h_lport.p_descr);
return (u_char *)hardware->h_lport.p_descr;
+#ifdef ENABLE_DOT3
case LLDP_SNMP_LOCAL_DOT3_AUTONEG_SUPPORT:
long_ret = 2 - hardware->h_lport.p_autoneg_support;
return (u_char *)&long_ret;
case LLDP_SNMP_LOCAL_DOT3_AGG_ID:
long_ret = hardware->h_lport.p_aggregid;
return (u_char *)&long_ret;
+#endif
default:
break;
}
return NULL;
}
+#ifdef ENABLE_DOT1
static u_char*
agent_h_local_vlan(struct variable *vp, oid *name, size_t *length,
int exact, size_t *var_len, WriteMethod **write_method)
}
return NULL;
}
+#endif
static u_char*
agent_h_remote_port(struct variable *vp, oid *name, size_t *length,
*var_len = 1;
bit = swap_bits(hardware->h_rchassis->c_cap_enabled);
return (u_char *)&bit;
+#ifdef ENABLE_DOT3
case LLDP_SNMP_REMOTE_DOT3_AUTONEG_SUPPORT:
long_ret = 2 - hardware->h_rport->p_autoneg_support;
return (u_char *)&long_ret;
case LLDP_SNMP_REMOTE_DOT3_AGG_ID:
long_ret = hardware->h_rport->p_aggregid;
return (u_char *)&long_ret;
+#endif
default:
break;
}
{LLDP_SNMP_LOCAL_PIDSUBTYPE, ASN_INTEGER, RONLY, agent_h_local_port, 5, {1, 3, 7, 1, 2}},
{LLDP_SNMP_LOCAL_PID, ASN_OCTET_STR, RONLY, agent_h_local_port, 5, {1, 3, 7, 1, 3}},
{LLDP_SNMP_LOCAL_PORTDESC, ASN_OCTET_STR, RONLY, agent_h_local_port, 5, {1, 3, 7, 1, 4}},
+#ifdef ENABLE_DOT3
{LLDP_SNMP_LOCAL_DOT3_AUTONEG_SUPPORT, ASN_INTEGER, RONLY, agent_h_local_port, 8,
{1, 5, 4623, 1, 2, 1, 1, 1}},
{LLDP_SNMP_LOCAL_DOT3_AUTONEG_ENABLED, ASN_INTEGER, RONLY, agent_h_local_port, 8,
{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}},
+#endif
/* Remote ports */
{LLDP_SNMP_REMOTE_CIDSUBTYPE, ASN_INTEGER, RONLY, agent_h_remote_port, 5, {1, 4, 1, 1, 4}},
{LLDP_SNMP_REMOTE_CID, ASN_OCTET_STR, RONLY, agent_h_remote_port, 5, {1, 4, 1, 1, 5}},
{LLDP_SNMP_REMOTE_SYSDESC, ASN_OCTET_STR, RONLY, agent_h_remote_port, 5, {1, 4, 1, 1, 10}},
{LLDP_SNMP_REMOTE_SYSCAP_SUP, ASN_OCTET_STR, RONLY, agent_h_remote_port, 5, {1, 4, 1, 1, 11}},
{LLDP_SNMP_REMOTE_SYSCAP_ENA, ASN_OCTET_STR, RONLY, agent_h_remote_port, 5, {1, 4, 1, 1, 12}},
+#ifdef ENABLE_DOT3
{LLDP_SNMP_REMOTE_DOT3_AUTONEG_SUPPORT, ASN_INTEGER, RONLY, agent_h_remote_port, 8,
{1, 5, 4623, 1, 3, 1, 1, 1}},
{LLDP_SNMP_REMOTE_DOT3_AUTONEG_ENABLED, ASN_INTEGER, RONLY, agent_h_remote_port, 8,
{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}},
+#endif
+#ifdef ENABLE_DOT1
/* Local vlans */
{LLDP_SNMP_LOCAL_DOT1_VLANNAME, ASN_OCTET_STR, RONLY, agent_h_local_vlan, 8,
{1, 5, 32962, 1, 2, 3, 1, 2}},
/* Remote vlans */
{LLDP_SNMP_REMOTE_DOT1_VLANNAME, ASN_OCTET_STR, RONLY, agent_h_remote_vlan, 8,
{1, 5, 32962, 1, 3, 3, 1, 2}},
+#endif
/* Management address */
{LLDP_SNMP_LOCAL_ADDR_LEN, ASN_INTEGER, RONLY, agent_h_local_management, 5,
{1, 3, 8, 1, 3}},
free(chassis);
return -1;
}
+#ifdef ENABLE_DOT1
TAILQ_INIT(&port->p_vlans);
+#endif
if (s < sizeof(struct ethllc) + sizeof(struct cdp_header)) {
LLOG_WARNX("too short frame received on %s", hardware->h_ifname);
free(chassis);
free(port->p_id);
free(port->p_descr);
+#ifdef ENABLE_DOT1
lldpd_vlan_cleanup(port);
+#endif
free(port);
return -1;
}
{ HMSG_GET_INTERFACES, client_handle_get_interfaces },
{ HMSG_GET_CHASSIS, client_handle_get_port_related },
{ HMSG_GET_PORT, client_handle_get_port_related },
+#ifdef ENABLE_DOT1
{ HMSG_GET_VLANS, client_handle_get_port_related },
+#endif
{ HMSG_SHUTDOWN, client_handle_shutdown },
{ 0, NULL } };
}
p = &s->data;
switch (r->hdr.type) {
+#ifdef ENABLE_DOT1
case HMSG_GET_VLANS:
if (ctl_msg_pack_list(STRUCT_LLDPD_VLAN,
&hardware->h_rport->p_vlans,
return;
}
break;
+#endif
case HMSG_GET_PORT:
if (ctl_msg_pack_structure(STRUCT_LLDPD_PORT,
hardware->h_rport,
const u_int8_t mcastaddr[] = EDP_MULTICAST_ADDR;
const u_int8_t llcorg[] = LLC_ORG_EXTREME;
struct iovec *iov = NULL;
+#ifdef ENABLE_DOT1
struct edp_tlv_vlan *ovlan = NULL;
struct lldpd_vlan *vlan;
+ unsigned int state = 0;
+#endif
struct edp_tlv_head device;
struct edp_tlv_head null;
struct edp_tlv_info info;
u_int8_t edp_fakeversion[] = {7, 6, 4, 99};
- unsigned int i, c, v, len, state = 0;
+ unsigned int i, c, v, len;
/* Subsequent XXX can be replaced by other values. We place
them here to ensure the position of "" to be a bit
invariant with version changes. */
sizeof(struct iovec))) == NULL) \
fatal(NULL);
+#ifdef ENABLE_DOT1
while (state != 2) {
free(iov); iov = NULL;
free(ovlan); ovlan = NULL;
+#endif
c = v = -1;
/* Ether + LLC */
iov[c].iov_base = &eh;
iov[c].iov_len = sizeof(eh);
+#ifdef ENABLE_DOT1
switch (state) {
case 0:
+#endif
/* Display TLV */
memset(&device, 0, sizeof(device));
device.tlv_marker = EDP_TLV_MARKER;
IOV_NEW;
iov[c].iov_base = &info;
iov[c].iov_len = sizeof(info);
+#ifdef ENABLE_DOT1
break;
case 1:
v = 0;
if ((state == 1) && (v == -1)) /* No VLAN, no need to send another TLV */
break;
+#endif
/* Null TLV */
memset(&null, 0, sizeof(null));
hardware->h_raw, iov, c) == -1) {
LLOG_WARN("unable to send packet on real device for %s",
hardware->h_ifname);
+#ifdef ENABLE_DOT1
free(ovlan);
+#endif
free(iov);
return ENETDOWN;
}
-
+
+#ifdef ENABLE_DOT1
state++;
}
+#endif
hardware->h_tx_cnt++;
+#ifdef ENABLE_DOT1
free(ovlan);
+#endif
free(iov);
return 0;
struct edp_header *eh;
struct edp_tlv_head *tlv;
struct edp_tlv_info *info;
+#ifdef ENABLE_DOT1
struct edp_tlv_vlan *vlan;
struct lldpd_vlan *lvlan, *lvlan_next;
+#endif
const unsigned char edpaddr[] = EDP_MULTICAST_ADDR;
struct iovec iov;
int f, len, gotend = 0, gotvlans = 0;
free(chassis);
return -1;
}
+#ifdef ENABLE_DOT1
TAILQ_INIT(&port->p_vlans);
+#endif
if (s < sizeof(struct ethllc) + sizeof(struct edp_header)) {
LLOG_WARNX("too short frame received on %s", hardware->h_ifname);
gotend = 1;
break;
case EDP_TLV_VLAN:
+#ifdef ENABLE_DOT1
if (len < sizeof(struct edp_tlv_vlan) -
sizeof(struct edp_tlv_head)) {
LLOG_WARNX("wrong size for EDP TLV vlan for frame "
}
TAILQ_INSERT_TAIL(&port->p_vlans,
lvlan, v_entries);
+#endif
gotvlans = 1;
break;
default:
(chassis->c_descr == NULL) ||
(port->p_descr == NULL) ||
(gotend == 0)) {
+#ifdef ENABLE_DOT1
if (gotvlans && gotend) {
/* VLAN can be sent in a separate frames. We need to add
* those vlans to an existing chassis */
/* We discard the remaining frame */
goto malformed;
}
+#else
+ if (gotvlans)
+ goto malformed;
+#endif
LLOG_WARNX("some mandatory tlv are missing for frame received on %s",
hardware->h_ifname);
goto malformed;
free(chassis);
free(port->p_id);
free(port->p_descr);
+#ifdef ENABLE_DOT1
lldpd_vlan_cleanup(port);
+#endif
free(port);
return -1;
}
{
struct ether_header eh;
const u_int8_t mcastaddr[] = LLDP_MULTICAST_ADDR;
- const u_int8_t dot1[] = LLDP_TLV_ORG_DOT1;
- const u_int8_t dot3[] = LLDP_TLV_ORG_DOT3;
struct iovec *iov = NULL;
- struct lldp_vlan *ovlan = NULL;
struct lldp_id chid, pid;
struct lldp_ttl ttl;
struct lldp_end end;
struct lldp_string str;
struct lldp_cap cap;
struct lldp_mgmt mgmt;
+#ifdef ENABLE_DOT1
+ const u_int8_t dot1[] = LLDP_TLV_ORG_DOT1;
+ struct lldp_vlan *ovlan = NULL;
+ int v;
+ struct lldpd_vlan *vlan;
+#endif
+#ifdef ENABLE_DOT3
+ const u_int8_t dot3[] = LLDP_TLV_ORG_DOT3;
struct lldp_aggreg aggreg;
struct lldp_macphy macphy;
+#endif
#ifdef ENABLE_LLDPMED
const u_int8_t med[] = LLDP_TLV_ORG_MED;
struct lldpmed_cap medcap;
struct lldp_org medhw, medfw, medsw, medsn,
medmodel, medasset, medmanuf;
#endif
- struct lldpd_vlan *vlan;
struct lldpd_port *port = &hardware->h_lport;
- u_int c = -1, len = 0, v;
+ u_int c = -1, len = 0;
struct lldpd_frame *buffer;
#define IOV_NEW \
iov[c].iov_base = port->p_descr;
iov[c].iov_len = strlen(port->p_descr);
+#ifdef ENABLE_DOT1
/* VLANs */
v = 0;
TAILQ_FOREACH(vlan, &port->p_vlans, v_entries)
iov[c].iov_len = strlen(vlan->v_name);
}
}
+#endif
+#ifdef ENABLE_DOT3
/* Aggregation status */
memset(&aggreg, 0, sizeof(aggreg));
aggreg.tlv_head.type_len = LLDP_TLV_HEAD(LLDP_TLV_ORG,
IOV_NEW;
iov[c].iov_base = &macphy;
iov[c].iov_len = sizeof(macphy);
+#endif
#ifdef ENABLE_LLDPMED
if (global->g_lchassis.c_med_cap) {
LLOG_WARN("unable to send packet on real device for %s",
hardware->h_ifname);
free(iov);
+#ifdef ENABLE_DOT1
free(ovlan);
+#endif
return ENETDOWN;
}
iov_dump(&buffer, iov, c);
free(iov);
+#ifdef ENABLE_DOT1
free(ovlan);
+#endif
if (buffer != NULL) {
/* We assume that LLDP frame is the reference */
free(chassis);
return -1;
}
+#ifdef ENABLE_DOT1
TAILQ_INIT(&port->p_vlans);
+#endif
if (s < sizeof(struct ether_header)) {
LLOG_WARNX("too short frame received on %s", hardware->h_ifname);
goto malformed;
}
if (memcmp(dot1, frame + f, 3) == 0) {
+#ifndef ENABLE_DOT1
+ f += size;
+ hardware->h_rx_unrecognized_cnt++;
+#else
/* Dot1 */
if ((*(u_int8_t*)(frame + f + 3)) ==
LLDP_TLV_DOT1_VLANNAME) {
TAILQ_INSERT_TAIL(&port->p_vlans,
vlan, v_entries);
f += vlan_len;
- } else
+ } else {
/* Unknown Dot1 TLV, ignore it */
f += size;
+ hardware->h_rx_unrecognized_cnt++;
+ }
+#endif
} else if (memcmp(dot3, frame + f, 3) == 0) {
+#ifndef ENABLE_DOT3
+ f += size;
+ hardware->h_rx_unrecognized_cnt++;
+#else
/* Dot3 */
subtype = *(u_int8_t*)(frame + f + 3);
switch (subtype) {
f += size;
hardware->h_rx_unrecognized_cnt++;
}
+#endif
} else if (memcmp(med, frame + f, 3) == 0) {
/* LLDP-MED */
#ifndef ENABLE_LLDPMED
free(chassis);
free(port->p_id);
free(port->p_descr);
+#ifdef ENABLE_DOT1
lldpd_vlan_cleanup(port);
+#endif
free(port);
return -1;
}
void usage(void);
TAILQ_HEAD(interfaces, lldpd_interface);
+#ifdef ENABLE_DOT1
TAILQ_HEAD(vlans, lldpd_vlan);
+#endif
struct value_string {
int value;
char *string;
};
+#ifdef ENABLE_DOT3
static const struct value_string operational_mau_type_values[] = {
{ 1, "AUI - no internal MAU, view from AUI" },
{ 2, "10Base5 - thick coax MAU" },
{ 40, "10GigBaseSW - W fiber over 850 nm optics" },
{ 0, NULL }
};
+#endif
void
usage(void)
fatalx("get_interfaces: unable to retrieve the list of interfaces");
}
+#ifdef ENABLE_DOT1
int
get_vlans(int s, struct vlans *vls, char *interface)
{
fatalx("get_vlans: unable to retrieve the list of vlans");
return 1;
}
+#endif
int
get_chassis(int s, struct lldpd_chassis *chassis, char *interface)
printf("\n");
}
+#ifdef ENABLE_DOT3
void
display_autoneg(struct lldpd_port *port, int bithd, int bitfd, char *desc)
{
}
printf("(FD) ");
}
+#endif
void
display_port(struct lldpd_port *port)
{
char *pid;
+#ifdef ENABLE_DOT3
int i;
+#endif
if ((pid = (char *)malloc(port->p_id_len + 1)) == NULL)
fatal(NULL);
dump(port->p_id, port->p_id_len, 16, ' '));
}
printf(" PortDescr: "); pretty_print(port->p_descr);
+#ifdef ENABLE_DOT3
if (port->p_aggregid)
printf("\n Port is aggregated. PortAggregID: %d\n",
port->p_aggregid);
}
if (operational_mau_type_values[i].value == 0)
printf("unknown (%d)\n", port->p_mau_type);
+#endif
}
+#ifdef ENABLE_DOT1
void
display_vlans(struct lldpd_port *port)
{
if (i % 2)
printf("\n");
}
+#endif
int
main(int argc, char *argv[])
int s;
int ch, debug = 1;
struct interfaces ifs;
+#ifdef ENABLE_DOT1
struct vlans vls;
+#endif
struct lldpd_interface *iff;
struct lldpd_chassis chassis;
struct lldpd_port port;
display_chassis(&chassis);
printf("\n");
display_port(&port);
+#ifdef ENABLE_DOT1
if (get_vlans(s, &vls, iff->name) != -1) {
memcpy(&port.p_vlans, &vls, sizeof(struct vlans));
if (!TAILQ_EMPTY(&port.p_vlans)) {
display_vlans(&port);
}
}
+#endif
#ifdef ENABLE_LLDPMED
if (chassis.c_med_cap) {
printf("\n");
return 0;
}
-
+#ifdef ENABLE_DOT1
void
lldpd_vlan_cleanup(struct lldpd_port *port)
{
free(vlan);
}
}
+#endif
void
lldpd_port_cleanup(struct lldpd_port *port)
{
+#ifdef ENABLE_DOT1
lldpd_vlan_cleanup(port);
+#endif
free(port->p_id);
free(port->p_descr);
free(port);
if (hardware->h_flags == 0) {
TAILQ_REMOVE(&cfg->g_hardware, hardware, h_entries);
lldpd_iface_close(cfg, hardware);
+#ifdef ENABLE_DOT1
lldpd_vlan_cleanup(&hardware->h_lport);
+#endif
lldpd_remote_cleanup(cfg, hardware, 1);
free(hardware->h_proto_macs);
free(hardware->h_llastframe);
struct lldpd_hardware *
lldpd_port_add(struct lldpd *cfg, struct ifaddrs *ifa)
{
+#if defined (ENABLE_DOT1) || defined (ENABLE_DOT3)
struct ifaddrs *oifap, *oifa;
+#endif
struct lldpd_hardware *hardware;
struct lldpd_port *port;
+#ifdef ENABLE_DOT1
struct lldpd_vlan *vlan;
struct vlan_ioctl_args ifv;
+#endif
+#ifdef ENABLE_DOT3
struct ethtool_cmd ethc;
+#endif
u_int8_t *lladdr;
TAILQ_FOREACH(hardware, &cfg->g_hardware, h_entries) {
hardware->h_raw_real = -1;
hardware->h_start_probe = 0;
hardware->h_proto_macs = (u_int8_t*)calloc(cfg->g_multi+1, ETH_ALEN);
+#ifdef ENABLE_DOT1
TAILQ_INIT(&hardware->h_lport.p_vlans);
} else {
lldpd_vlan_cleanup(&hardware->h_lport);
+#endif
}
port = &hardware->h_lport;
}
/* Get VLANS and aggregation status */
+#if defined (ENABLE_DOT3) || defined (ENABLE_DOT1)
if (getifaddrs(&oifap) != 0)
fatal("lldpd_port_add: failed to get interface list");
for (oifa = oifap; oifa != NULL; oifa = oifa->ifa_next) {
+#ifdef ENABLE_DOT1
/* Check if we already have checked this one */
int skip = 0;
TAILQ_FOREACH(vlan, &port->p_vlans, v_entries) {
skip = 1;
}
if (skip) continue;
+#endif
/* Aggregation check */
+#ifdef ENABLE_DOT3
if (iface_is_bond_slave(cfg, hardware->h_ifname, oifa->ifa_name))
port->p_aggregid = if_nametoindex(oifa->ifa_name);
-
+#endif
+
+#ifdef ENABLE_DOT1
/* VLAN check */
memset(&ifv, 0, sizeof(ifv));
ifv.cmd = GET_VLAN_REALDEV_NAME_CMD;
TAILQ_INSERT_TAIL(&port->p_vlans, vlan, v_entries);
}
}
+#endif
}
freeifaddrs(oifap);
+#endif
+#ifdef ENABLE_DOT3
/* MAC/PHY */
if (priv_ethtool(hardware->h_ifname, ðc) == 0) {
int j;
if (ethc.port == PORT_AUI) port->p_mau_type = LLDP_DOT3_MAU_AUI;
} else
LLOG_DEBUG("unable to get eth info for %s", hardware->h_ifname);
+#endif
if (!INTERFACE_OPENED(hardware)) {
if (lldpd_iface_init(cfg, hardware) != 0) {
LLOG_WARN("unable to initialize %s", hardware->h_ifname);
+#ifdef ENABLE_DOT1
lldpd_vlan_cleanup(&hardware->h_lport);
+#endif
free(hardware->h_proto_macs);
free(hardware);
return (NULL);
#define USING_AGENTX_SUBAGENT_MODULE 1
+#ifdef ENABLE_DOT1
struct lldpd_vlan {
TAILQ_ENTRY(lldpd_vlan) v_entries;
char *v_name;
u_int16_t v_vid;
};
#define STRUCT_LLDPD_VLAN "Lsw"
+#endif
struct lldpd_chassis {
u_int8_t c_id_subtype;
#endif
};
-#ifndef ENABLE_LLDPMED
-#define STRUCT_LLDPD_CHASSIS "bCsswwwll"
+#ifdef ENABLE_LLDPMED
+#define STRUCT_LLDPD_CHASSIS_MED "wbsssssss"
#else
-#define STRUCT_LLDPD_CHASSIS "bCsswwwllwbsssssss"
+#define STRUCT_LLDPD_CHASSIS_MED ""
#endif
+#define STRUCT_LLDPD_CHASSIS "bCsswwwll" STRUCT_LLDPD_CHASSIS_MED
struct lldpd_port {
u_int8_t p_id_subtype;
int p_id_len;
char *p_descr;
+#ifdef ENABLE_DOT3
/* Dot3 stuff */
u_int32_t p_aggregid;
u_int8_t p_autoneg_support;
u_int8_t p_autoneg_enabled;
u_int16_t p_autoneg_advertised;
u_int16_t p_mau_type;
+#endif
+#ifdef ENABLE_DOT1
TAILQ_HEAD(, lldpd_vlan) p_vlans;
+#endif
};
-#define STRUCT_LLDPD_PORT "bCslbbwwPP"
+
+#ifdef ENABLE_DOT3
+#define STRUCT_LLDPD_PORT_DOT3 "lbbww"
+#else
+#define STRUCT_LLDPD_PORT_DOT3 ""
+#endif
+#ifdef ENABLE_DOT1
+#define STRUCT_LLDPD_PORT_DOT1 "PP"
+#else
+#define STRUCT_LLDPD_PORT_DOT1 ""
+#endif
+#define STRUCT_LLDPD_PORT "bCs" STRUCT_LLDPD_PORT_DOT3 STRUCT_LLDPD_PORT_DOT1
struct lldpd_frame {
int size;
/* lldpd.c */
void lldpd_cleanup(struct lldpd *);
+#ifdef ENABLE_DOT1
void lldpd_vlan_cleanup(struct lldpd_port *);
+#endif
void lldpd_remote_cleanup(struct lldpd *, struct lldpd_hardware *, int);
void lldpd_port_cleanup(struct lldpd_port *);
void lldpd_chassis_cleanup(struct lldpd_chassis *);
free(chassis);
return -1;
}
+#ifdef ENABLE_DOT1
TAILQ_INIT(&port->p_vlans);
+#endif
if (s < sizeof(struct sonmp)) {
LLOG_WARNX("too short frame received on %s", hardware->h_ifname);