]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Add a summary of available options in usage() of lldpd and lldpctl
authorVincent Bernat <bernat@luffy.cx>
Wed, 17 Mar 2010 12:38:11 +0000 (13:38 +0100)
committerVincent Bernat <bernat@luffy.cx>
Wed, 17 Mar 2010 12:38:11 +0000 (13:38 +0100)
Patch from Jorge Boncompte (see ticket #29).

src/lldpctl.c
src/lldpd.c

index 7480e81f29c6e02a2d6b7f0187dfd08ca0cd0754..059b29dcb20f0bc99b87c1b3cb3f41bfc42f36d7 100644 (file)
@@ -44,7 +44,17 @@ display_interfaces(int s, const char * fmt, int argc, char *argv[]);
 static void
 usage(void)
 {
-       fprintf(stderr, "usage: %s [options]\n", __progname);
+       fprintf(stderr, "Usage: %s [OPTIONS ...] [INTERFACES ...]\n", __progname);
+
+       fprintf(stderr, "\n");
+
+       fprintf(stderr, "-d          Enable more debugging information.\n");
+       fprintf(stderr, "-L location Enable the transmission of LLDP-MED location TLV for the\n");
+       fprintf(stderr, "            given interfaces. Can be repeated to enable the transmission\n");
+       fprintf(stderr, "            of the location in several formats.\n");
+
+       fprintf(stderr, "\n");
+
        fprintf(stderr, "see manual page lldpctl(8) for more information\n");
        exit(1);
 }
index 02ff304a17371047b068ca8a2ab38a2aa9bdcdac..ae85a5bdc19500ccefe6ce30bf7ee6ba9f18701c 100644 (file)
@@ -99,7 +99,33 @@ extern const char    *__progname;
 static void
 usage(void)
 {
-       fprintf(stderr, "usage: %s [options]\n", __progname);
+       fprintf(stderr, "Usage: %s [OPTIONS ...]\n", __progname);
+
+       fprintf(stderr, "\n");
+
+       fprintf(stderr, "-d       Do not daemonize.\n");
+       fprintf(stderr, "-i       Disable LLDP-MED inventory TLV transmission.\n");
+       fprintf(stderr, "-k       Disable advertising of kernel release, version, machine.\n");
+       fprintf(stderr, "-m IP    Specify the management address of this system.\n");
+       fprintf(stderr, "-M class Enable emission of LLDP-MED frame. 'class' should be one of:\n");
+       fprintf(stderr, "             1 Generic Endpoint (Class I)\n");
+       fprintf(stderr, "             2 Media Endpoint (Class II)\n");
+       fprintf(stderr, "             3 Communication Device Endpoints (Class III)\n");
+       fprintf(stderr, "             4 Network Connectivity Device\n");
+       fprintf(stderr, "-x       Enable SNMP subagent.\n");
+#ifdef ENABLE_LISTENVLAN
+       fprintf(stderr, "-v       Listen on VLAN as well.\n");
+#endif
+       fprintf(stderr, "\n");
+
+       fprintf(stderr, "Protocol support. (Disabled by default)\n");
+       fprintf(stderr, "-c       Enable the support of CDP protocol. (Cisco)\n");
+       fprintf(stderr, "-e       Enable the support of EDP protocol. (Extreme)\n");
+       fprintf(stderr, "-f       Enable the support of FDP protocol. (Foundry)\n");
+       fprintf(stderr, "-s       Enable the support of SONMP protocol. (Nortel)\n");
+
+       fprintf(stderr, "\n");
+
        fprintf(stderr, "see manual page lldpd(8) for more information\n");
        exit(1);
 }