.Nd LLDP daemon
.Sh SYNOPSIS
.Nm
-.Op Fl dxcseikl
+.Op Fl dxcseiklr
.Op Fl S Ar description
.Op Fl X Ar socket
.Op Fl m Ar management
but there is a peer speaking another protocol detected. By default,
LLDP packets are sent when there is a peer speaking LLDP detected or
when there is no peer at all.
+.It Fl r
+Receive-only mode. With this switch,
+.Nm
+will not send any frame. It will only listen to neighbors.
.It Fl m Ar management
Specify the management address of this system.
.Nm
lldpd_update_localports(cfg);
lldpd_cleanup(cfg);
lldpd_update_localchassis(cfg);
- lldpd_send_all(cfg);
+ if (!cfg->g_receiveonly)
+ lldpd_send_all(cfg);
lldpd_recv_all(cfg);
}
#endif
char *mgmtp = NULL;
char *popt, opts[] =
- "H:hkdxX:m:p:M:S:i@ ";
+ "H:hkrdxX:m:p:M:S:i@ ";
int i, found, advertise_version = 1;
#ifdef ENABLE_LLDPMED
int lldpmed = 0, noinventory = 0;
char *descr_override = NULL;
char *lsb_release = NULL;
int smart = 15;
+ int receiveonly = 0;
saved_argv = argv;
case 'd':
debug++;
break;
+ case 'r':
+ receiveonly = 1;
+ break;
case 'm':
mgmtp = optarg;
break;
cfg->g_mgmt_pattern = mgmtp;
cfg->g_smart = smart;
+ cfg->g_receiveonly = receiveonly;
/* Get ioctl socket */
if ((cfg->g_sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1)