#define LLDP_CTL_PATH "/var/run/lldp.sock"
enum lldp_ctl_msg {
LLDP_CTL_MSG_PING,
LLDP_CTL_MSG_PONG,
LLDP_CTL_MSG_MSAP_REQ,
LLDP_CTL_MSG_MSAP,
LLDP_CTL_MSG_MSAP_END,
LLDP_CTL_MSG_ACTR_REQ,
LLDP_CTL_MSG_ACTR,
LLDP_CTL_MSG_ACTR_END,
};
enum agent_counter {
statsAgeoutsTotal,
statsFramesDiscardedTotal,
statsFramesInErrorsTotal,
statsFramesInTotal,
statsFramesOutTotal,
statsTLVsDiscardedTotal,
statsTLVsUnrecognisedTotal,
lldpduLengthErrors,
AGENT_COUNTER_NCOUNTERS
};
struct lldp_ctl_msg_msap_req {
char ifname[IFNAMSIZ];
unsigned int gen;
};
struct lldp_ctl_msg_msap {
char ifname[IFNAMSIZ];
unsigned int gen;
struct ether_addr saddr;
struct ether_addr daddr;
struct timespec created;
struct timespec updated;
uint64_t packets;
uint64_t updates;
};
struct lldp_ctl_msg_actrs_req {
unsigned int which;
#define LLDP_ACTRS_ALL 0
#define LLDP_ACTRS_DAEMON 1
#define LLDP_ACTRS_IFACE 2
char ifname[IFNAMSIZ];
};
struct lldp_ctl_msg_actrs {
char ifname[IFNAMSIZ];
uint64_t ctrs[AGENT_COUNTER_NCOUNTERS];
};