.Nd LLDP daemon
.Sh SYNOPSIS
.Nm
-.Op Fl dxcse
+.Op Fl dvxcse
.Op Fl m Ar management
.Op Fl p Ar probe time
.Sh DESCRIPTION
will run in the foreground and log to
.Em stderr .
This option can be specified many times to increase verbosity.
+.It Fl v
+Listen on VLAN as well. This option might be needed if your equipment
+send frames on VLAN instead of physical interface. This option enables
+.Nm
+to receive frames on VLAN interfaces as well. If you don't need this
+option, do not set it.
.It Fl x
Enable SNMP subagent
With this option,
{
extern const char *__progname;
#ifndef USE_SNMP
- fprintf(stderr, "usage: %s [-d] [-c] [-s] [-e] [-p|-P] [-m ip]\n", __progname);
+ fprintf(stderr, "usage: %s [-d] [-v] [-c] [-s] [-e] [-p|-P] [-m ip]\n", __progname);
#else /* USE_SNMP */
- fprintf(stderr, "usage: %s [-d] [-c] [-s] [-e] [-p|-P] [-m ip] [-x]\n", __progname);
+ fprintf(stderr, "usage: %s [-d] [-v] [-c] [-s] [-e] [-p|-P] [-m ip] [-x]\n", __progname);
#endif /* USE_SNMP */
exit(1);
}
continue;
}
- if ((iface_is_vlan(cfg, ifa->ifa_name)) ||
+ if (((!cfg->g_listen_vlans) &&
+ (iface_is_vlan(cfg, ifa->ifa_name))) ||
(iface_is_bond(cfg, ifa->ifa_name)))
continue;
struct lldpd *cfg;
int ch, snmp = 0, debug = 0;
char *mgmtp = NULL;
- char *popt, opts[] = "dxm:p:@ ";
- int probe = 0, i, found;
+ char *popt, opts[] = "vdxm:p:@ ";
+ int probe = 0, i, found, vlan = 0;
saved_argv = argv;
*popt = '\0';
while ((ch = getopt(argc, argv, opts)) != -1) {
switch (ch) {
+ case 'v':
+ vlan = 1;
+ break;
case 'd':
debug++;
break;
calloc(1, sizeof(struct lldpd))) == NULL)
fatal(NULL);
- if (mgmtp != NULL)
- cfg->g_mgmt_pattern = mgmtp;
+ cfg->g_mgmt_pattern = mgmtp;
+ cfg->g_listen_vlans = vlan;
/* Get ioctl socket */
if ((cfg->g_sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1)