void usage(void) { fprintf(stderr, "USAGE: snmptranslate [OPTIONS] OID [OID]...\n\n"); fprintf(stderr, " Version: %s\n", netsnmp_get_version()); fprintf(stderr, " Web: http://www.net-snmp.org/\n"); fprintf(stderr, " Email: [email protected]\n\nOPTIONS:\n"); fprintf(stderr, " -h\t\t\tdisplay this help message\n"); fprintf(stderr, " -V\t\t\tdisplay package version number\n"); fprintf(stderr, " -m MIB[:...]\t\tload given list of MIBs (ALL loads everything)\n"); fprintf(stderr, " -M DIR[:...]\t\tlook in given list of directories for MIBs\n"); fprintf(stderr, " -D TOKEN[,...]\tturn on debugging output for the specified TOKENs\n\t\t\t (ALL gives extremely verbose debugging output)\n"); fprintf(stderr, " -w WIDTH\t\tset width of tree and detail output\n"); fprintf(stderr, " -T TRANSOPTS\t\tSet various options controlling report produced:\n"); fprintf(stderr, "\t\t\t B: print all matching objects for a regex search\n"); fprintf(stderr, "\t\t\t d: print full details of the given OID\n"); fprintf(stderr, "\t\t\t p: print tree format symbol table\n"); fprintf(stderr, "\t\t\t a: print ASCII format symbol table\n"); fprintf(stderr, "\t\t\t l: enable labeled OID report\n"); fprintf(stderr, "\t\t\t o: enable OID report\n"); fprintf(stderr, "\t\t\t s: enable dotted symbolic report\n"); fprintf(stderr, "\t\t\t z: enable MIB child OID report\n"); fprintf(stderr, "\t\t\t t: enable alternate format symbolic suffix report\n"); #ifndef NETSNMP_DISABLE_MIB_LOADING fprintf(stderr, " -P MIBOPTS\t\tToggle various defaults controlling mib parsing:\n"); snmp_mib_toggle_options_usage("\t\t\t ", stderr); #endif /* NETSNMP_DISABLE_MIB_LOADING */ fprintf(stderr, " -O OUTOPTS\t\tToggle various defaults controlling output display:\n"); snmp_out_toggle_options_usage("\t\t\t ", stderr); fprintf(stderr, " -I INOPTS\t\tToggle various defaults controlling input parsing:\n"); snmp_in_toggle_options_usage("\t\t\t ", stderr); fprintf(stderr, " -L LOGOPTS\t\tToggle various defaults controlling logging:\n"); snmp_log_options_usage("\t\t\t ", stderr); exit(1); }
static void usage(const char* progname) { fprintf(stderr, "USAGE: %s [OPTIONS] TRAP-PARAMETERS\n" "\n" " Version: %s\n" " Web: http://www.net-snmp.org/\n" " Email: [email protected]\n" "\n" "OPTIONS:\n", progname, netsnmp_get_version()); fprintf(stderr, " -h\t\t\tdisplay this help message\n" " -V\t\t\tdisplay package version number\n" " -m MIB[" ENV_SEPARATOR "...]\t\tload given list of MIBs (ALL loads " "everything)\n" " -M DIR[" ENV_SEPARATOR "...]\t\tlook in given list of directories for MIBs\n" " -D[TOKEN[,...]]\tturn on debugging output for the specified " "TOKENs\n" "\t\t\t (ALL gives extremely verbose debugging output)\n" " -d\t\t\tdump all traffic\n"); #ifndef NETSNMP_DISABLE_MIB_LOADING fprintf(stderr, " -P MIBOPTS\t\tToggle various defaults controlling mib " "parsing:\n"); snmp_mib_toggle_options_usage("\t\t\t ", stderr); #endif /* NETSNMP_DISABLE_MIB_LOADING */ fprintf(stderr, " -L LOGOPTS\t\tToggle various defaults controlling logging:\n"); snmp_log_options_usage("\t\t\t ", stderr); fprintf(stderr, " -c context\n" " -U uptime\n" " -x ADDRESS\t\tuse ADDRESS as AgentX address\n" "\n" "TRAP-PARAMETERS:\n" " trapoid [OID TYPE VALUE] ...\n"); }
static void usage(const char *prog) { fprintf(stderr, "USAGE: %s [OPTIONS] [WALK-OUTPUT.TXT]\n" "\n" "OPTIONS:\n", prog); fprintf(stderr, " -d\t\t\tdump all traffic\n" " -D TOKEN[,...]\tturn on debugging output for the specified " "TOKENs\n" "\t\t\t (ALL gives extremely verbose debugging output)\n" " -f\t\t\tDo not fork() from the calling shell.\n" " -h\t\t\tdisplay this help message\n" " -H\t\t\tdisplay a list of configuration file directives\n" " -L LOGOPTS\t\tToggle various defaults controlling logging:\n"); snmp_log_options_usage("\t\t\t ", stderr); #ifndef DISABLE_MIB_LOADING fprintf(stderr, " -m MIB[:...]\t\tload given list of MIBs (ALL loads " "everything)\n" " -M DIR[:...]\t\tlook in given list of directories for MIBs\n"); #endif /* DISABLE_MIB_LOADING */ #ifndef DISABLE_MIB_LOADING fprintf(stderr, " -P MIBOPTS\t\tToggle various defaults controlling mib " "parsing:\n"); snmp_mib_toggle_options_usage("\t\t\t ", stderr); #endif /* DISABLE_MIB_LOADING */ fprintf(stderr, " -v\t\t\tdisplay package version number\n" " -x TRANSPORT\tconnect to master agent using TRANSPORT\n" " -p\t\t\tenable Xsnmp performance logging\n"); exit(1); }
void usage(void) { #ifdef WIN32SERVICE fprintf(stderr, "\nUsage: snmptrapd [-register] [-quiet] [OPTIONS] [LISTENING ADDRESSES]"); fprintf(stderr, "\n snmptrapd [-unregister] [-quiet]"); #else fprintf(stderr, "Usage: snmptrapd [OPTIONS] [LISTENING ADDRESSES]\n"); #endif fprintf(stderr, "\n\tNET-SNMP Version: %s\n", netsnmp_get_version()); fprintf(stderr, "\tWeb: http://www.net-snmp.org/\n"); fprintf(stderr, "\tEmail: [email protected]\n"); fprintf(stderr, "\n"); fprintf(stderr, " -a\t\t\tignore authentication failure traps\n"); fprintf(stderr, " -A\t\t\tappend to log file rather than truncating it\n"); fprintf(stderr, " -c FILE\t\tread FILE as a configuration file\n"); fprintf(stderr, " -C\t\t\tdo not read the default configuration files\n"); fprintf(stderr, " -d\t\t\tdump sent and received SNMP packets\n"); fprintf(stderr, " -D[TOKEN[,...]]\t\tturn on debugging output for the specified TOKENs\n\t\t\t (ALL gives extremely verbose debugging output)\n"); fprintf(stderr, " -f\t\t\tdo not fork from the shell\n"); fprintf(stderr, " -F FORMAT\t\tuse specified format for logging to standard error\n"); #if HAVE_UNISTD_H fprintf(stderr, " -g GID\t\tchange to this numeric gid after opening\n" "\t\t\t transport endpoints\n"); #endif fprintf(stderr, " -h, --help\t\tdisplay this usage message\n"); fprintf(stderr, " -H\t\t\tdisplay configuration file directives understood\n"); fprintf(stderr, " -m MIBLIST\t\tuse MIBLIST instead of the default MIB list\n"); fprintf(stderr, " -M DIRLIST\t\tuse DIRLIST as the list of locations\n\t\t\t to look for MIBs\n"); fprintf(stderr, " -n\t\t\tuse numeric addresses instead of attempting\n\t\t\t hostname lookups (no DNS)\n"); #if HAVE_GETPID fprintf(stderr, " -p FILE\t\tstore process id in FILE\n"); #endif #ifdef WIN32SERVICE fprintf(stderr, " -register\t\tregister as a Windows service\n"); fprintf(stderr, " \t\t\t (followed by -quiet to prevent message popups)\n"); fprintf(stderr, " \t\t\t (followed by the startup parameter list)\n"); fprintf(stderr, " \t\t\t Note that some parameters are not relevant when running as a service\n"); #endif fprintf(stderr, " -t\t\t\tPrevent traps from being logged to syslog\n"); #if HAVE_UNISTD_H fprintf(stderr, " -u UID\t\tchange to this uid (numeric or textual) after\n" "\t\t\t opening transport endpoints\n"); #endif #ifdef WIN32SERVICE fprintf(stderr, " -unregister\t\tunregister as a Windows service\n"); fprintf(stderr, " \t\t\t (followed -quiet to prevent message popups)\n"); #endif fprintf(stderr, " -v, --version\t\tdisplay version information\n"); #if defined(USING_AGENTX_SUBAGENT_MODULE) && !defined(NETSNMP_SNMPTRAPD_DISABLE_AGENTX) fprintf(stderr, " -x ADDRESS\t\tuse ADDRESS as AgentX address\n"); fprintf(stderr, " -X\t\t\tdon't become a subagent\n"); #endif fprintf(stderr, " -O <OUTOPTS>\t\ttoggle options controlling output display\n"); snmp_out_toggle_options_usage("\t\t\t", stderr); fprintf(stderr, " -L <LOGOPTS>\t\ttoggle options controlling where to log to\n"); snmp_log_options_usage("\t\t\t", stderr); }
static void usage(char *prog) { #ifdef WIN32SERVICE printf("\nUsage: %s [-register] [-quiet] [OPTIONS] [LISTENING ADDRESSES]" "\n %s [-unregister] [-quiet]", prog, prog); #else printf("\nUsage: %s [OPTIONS] [LISTENING ADDRESSES]", prog); #endif printf("\n" "\n\tVersion: %s\n%s" "\t\t\t (config search path: %s)\n%s%s", netsnmp_get_version(), "\tWeb: http://www.net-snmp.org/\n" "\tEmail: [email protected]\n" "\n -a\t\t\tlog addresses\n" " -A\t\t\tappend to the logfile rather than truncating it\n" " -c FILE[,...]\t\tread FILE(s) as configuration file(s)\n" " -C\t\t\tdo not read the default configuration files\n", get_configuration_directory(), " -d\t\t\tdump sent and received SNMP packets\n" " -D[TOKEN[,...]]\tturn on debugging output for the given TOKEN(s)\n" "\t\t\t (try ALL for extremely verbose output)\n" "\t\t\t Don't put space(s) between -D and TOKEN(s).\n" " -f\t\t\tdo not fork from the shell\n", #if HAVE_UNISTD_H " -g GID\t\tchange to this numeric gid after opening\n" "\t\t\t transport endpoints\n" #endif " -h, --help\t\tdisplay this usage message\n" " -H\t\t\tdisplay configuration file directives understood\n" " -I [-]INITLIST\tlist of mib modules to initialize (or not)\n" "\t\t\t (run snmpd with -Dmib_init for a list)\n" " -L <LOGOPTS>\t\ttoggle options controlling where to log to\n"); snmp_log_options_usage("\t", stdout); printf(" -m MIBLIST\t\tuse MIBLIST instead of the default MIB list\n" " -M DIRLIST\t\tuse DIRLIST as the list of locations to look for MIBs\n" "\t\t\t (default %s)\n%s%s", #ifndef NETSNMP_DISABLE_MIB_LOADING netsnmp_get_mib_directory(), #else "MIBs not loaded", #endif " -p FILE\t\tstore process id in FILE\n" " -q\t\t\tprint information in a more parsable format\n" " -r\t\t\tdo not exit if files only accessible to root\n" "\t\t\t cannot be opened\n" #ifdef WIN32SERVICE " -register\t\tregister as a Windows service\n" " \t\t\t (followed by -quiet to prevent message popups)\n" " \t\t\t (followed by the startup parameter list)\n" " \t\t\t Note that some parameters are not relevant when running as a service\n" #endif #if HAVE_UNISTD_H " -u UID\t\tchange to this uid (numeric or textual) after\n" "\t\t\t opening transport endpoints\n" #endif #ifdef WIN32SERVICE " -unregister\t\tunregister as a Windows service\n" " \t\t\t (followed -quiet to prevent message popups)\n" #endif " -v, --version\t\tdisplay version information\n" " -V\t\t\tverbose display\n" #if defined(USING_AGENTX_SUBAGENT_MODULE)|| defined(USING_AGENTX_MASTER_MODULE) " -x ADDRESS\t\tuse ADDRESS as AgentX address\n" #endif #ifdef USING_AGENTX_SUBAGENT_MODULE " -X\t\t\trun as an AgentX subagent rather than as an\n" "\t\t\t SNMP master agent\n" #endif , "\nDeprecated options:\n" " -l FILE\t\tuse -Lf <FILE> instead\n" " -P\t\t\tuse -p instead\n" " -s\t\t\tuse -Lsd instead\n" " -S d|i|0-7\t\tuse -Ls <facility> instead\n" "\n" ); exit(1); }
void snmp_parse_args_descriptions(FILE * outf) { fprintf(outf, " Version: %s\n", netsnmp_get_version()); fprintf(outf, " Web: http://www.net-snmp.org/\n"); fprintf(outf, " Email: [email protected]\n\nOPTIONS:\n"); fprintf(outf, " -h, --help\t\tdisplay this help message\n"); fprintf(outf, " -H\t\t\tdisplay configuration file directives understood\n"); fprintf(outf, " -v 1|2c|3\t\tspecifies SNMP version to use\n"); fprintf(outf, " -V, --version\t\tdisplay package version number\n"); #if !defined(NETSNMP_DISABLE_SNMPV1) || !defined(NETSNMP_DISABLE_SNMPV2C) fprintf(outf, "SNMP Version 1 or 2c specific\n"); fprintf(outf, " -c COMMUNITY\t\tset the community string\n"); #endif /* support for community based SNMP */ fprintf(outf, "SNMP Version 3 specific\n"); fprintf(outf, " -a PROTOCOL\t\tset authentication protocol (MD5|SHA)\n"); fprintf(outf, " -A PASSPHRASE\t\tset authentication protocol pass phrase\n"); fprintf(outf, " -e ENGINE-ID\t\tset security engine ID (e.g. 800000020109840301)\n"); fprintf(outf, " -E ENGINE-ID\t\tset context engine ID (e.g. 800000020109840301)\n"); fprintf(outf, " -l LEVEL\t\tset security level (noAuthNoPriv|authNoPriv|authPriv)\n"); fprintf(outf, " -n CONTEXT\t\tset context name (e.g. bridge1)\n"); fprintf(outf, " -u USER-NAME\t\tset security name (e.g. bert)\n"); #ifdef HAVE_AES fprintf(outf, " -x PROTOCOL\t\tset privacy protocol (DES|AES)\n"); #else fprintf(outf, " -x PROTOCOL\t\tset privacy protocol (DES)\n"); #endif fprintf(outf, " -X PASSPHRASE\t\tset privacy protocol pass phrase\n"); fprintf(outf, " -Z BOOTS,TIME\t\tset destination engine boots/time\n"); fprintf(outf, "General communication options\n"); fprintf(outf, " -r RETRIES\t\tset the number of retries\n"); fprintf(outf, " -t TIMEOUT\t\tset the request timeout (in seconds)\n"); fprintf(outf, "Debugging\n"); fprintf(outf, " -d\t\t\tdump input/output packets in hexadecimal\n"); fprintf(outf, " -D[TOKEN[,...]]\tturn on debugging output for the specified TOKENs\n\t\t\t (ALL gives extremely verbose debugging output)\n"); fprintf(outf, "General options\n"); fprintf(outf, " -m MIB[:...]\t\tload given list of MIBs (ALL loads everything)\n"); fprintf(outf, " -M DIR[:...]\t\tlook in given list of directories for MIBs\n"); #ifndef NETSNMP_DISABLE_MIB_LOADING fprintf(outf, " (default: %s)\n", netsnmp_get_mib_directory()); fprintf(outf, " -P MIBOPTS\t\tToggle various defaults controlling MIB parsing:\n"); snmp_mib_toggle_options_usage("\t\t\t ", outf); #endif fprintf(outf, " -O OUTOPTS\t\tToggle various defaults controlling output display:\n"); snmp_out_toggle_options_usage("\t\t\t ", outf); fprintf(outf, " -I INOPTS\t\tToggle various defaults controlling input parsing:\n"); snmp_in_toggle_options_usage("\t\t\t ", outf); fprintf(outf, " -L LOGOPTS\t\tToggle various defaults controlling logging:\n"); snmp_log_options_usage("\t\t\t ", outf); fflush(outf); }
void usage(void) { #ifdef WIN32SERVICE fprintf(stderr, "\nUsage: snmptrapd [-register] [-quiet] [OPTIONS] [LISTENING ADDRESSES]"); fprintf(stderr, "\n snmptrapd [-unregister] [-quiet]"); #else fprintf(stderr, "Usage: snmptrapd [OPTIONS] [LISTENING ADDRESSES]\n"); #endif fprintf(stderr, "\n\tNET-SNMP Version: %s\n", netsnmp_get_version()); fprintf(stderr, "\tWeb: http://www.net-snmp.org/\n"); fprintf(stderr, "\tEmail: [email protected]\n"); fprintf(stderr, "\n"); fprintf(stderr, " -a\t\t\tignore authentication failure traps\n"); fprintf(stderr, " -c FILE\t\tread FILE as a configuration file\n"); fprintf(stderr, " -C\t\t\tdo not read the default configuration files\n"); fprintf(stderr, " -d\t\t\tdump sent and received SNMP packets\n"); fprintf(stderr, " -D\t\t\tturn on debugging output\n"); fprintf(stderr, " -e\t\t\tprint event # (rising/falling alarm, etc.)\n"); fprintf(stderr, " -f\t\t\tdo not fork from the shell\n"); fprintf(stderr, " -F FORMAT\t\tuse specified format for logging to standard error\n"); fprintf(stderr, " -h, --help\t\tdisplay this usage message\n"); fprintf(stderr, " -H\t\t\tdisplay configuration file directives understood\n"); fprintf(stderr, " -m MIBLIST\t\tuse MIBLIST instead of the default MIB list\n"); fprintf(stderr, " -M DIRLIST\t\tuse DIRLIST as the list of locations\n\t\t\t to look for MIBs\n"); fprintf(stderr, " -n\t\t\tuse numeric addresses instead of attempting\n\t\t\t hostname lookups (no DNS)\n"); #if HAVE_GETPID fprintf(stderr, " -p FILE\t\tstore process id in FILE\n"); #endif #ifdef WIN32SERVICE fprintf(stderr, " -register\t\tregister as a Windows service\n"); fprintf(stderr, " \t\t\t (followed by -quiet to prevent message popups)\n"); fprintf(stderr, " \t\t\t (followed by the startup parameter list)\n"); fprintf(stderr, " \t\t\t Note that some parameters are not relevant when running as a service\n"); #endif fprintf(stderr, " -t\t\t\tPrevent traps from being logged to syslog\n"); #ifdef WIN32SERVICE fprintf(stderr, " -unregister\t\tunregister as a Windows service\n"); fprintf(stderr, " \t\t\t (followed -quiet to prevent message popups)\n"); #endif fprintf(stderr, " -v, --version\t\tdisplay version information\n"); #if defined(USING_AGENTX_SUBAGENT_MODULE) && !defined(SNMPTRAPD_DISABLE_AGENTX) fprintf(stderr, " -x ADDRESS\t\tuse ADDRESS as AgentX address\n"); #endif fprintf(stderr, " -O <OUTOPTS>\t\ttoggle options controlling output display\n"); snmp_out_toggle_options_usage("\t\t\t", stderr); fprintf(stderr, " -L <LOGOPTS>\t\ttoggle options controlling where to log to\n"); snmp_log_options_usage("\t\t\t", stderr); fprintf(stderr, "\n Deprecated options:\n"); fprintf(stderr, " -o FILE\t\tuse -Lf <FILE> instead\n"); fprintf(stderr, " -P\t\t\tuse -f -Le instead\n"); fprintf(stderr, " -s\t\t\tuse -Lsd instead\n"); fprintf(stderr, " -S d|i|0-7\t\tuse -Ls <facility> instead\n"); fprintf(stderr, " -u FILE\t\tuse -p <FILE> instead\n"); }