[BACK]Return to snmpc.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / snmp

Diff for /src/usr.bin/snmp/snmpc.c between version 1.36 and 1.37

version 1.36, 2021/08/11 17:54:19 version 1.37, 2021/08/11 18:53:45
Line 84 
Line 84 
 };  };
 struct snmp_app *snmp_app = NULL;  struct snmp_app *snmp_app = NULL;
   
 char *community = "public";  char *community = NULL;
 struct snmp_v3 *v3;  struct snmp_v3 *v3;
 char *mib = "mib_2";  char *mib = "mib_2";
 int retries = 5;  int retries = 5;
 int timeout = 1;  int timeout = 1;
 enum snmp_version version = SNMP_V2C;  enum snmp_version version = SNMP_V3;
 int print_equals = 1;  int print_equals = 1;
 int print_varbind_only = 0;  int print_varbind_only = 0;
 int print_summary = 0;  int print_summary = 0;
Line 468 
Line 468 
         argc -= optind;          argc -= optind;
         argv += optind;          argv += optind;
   
         if (version == SNMP_V3) {          if (version == SNMP_V1 || version == SNMP_V2C) {
                   if (community == NULL || community[0] == '\0')
                           errx(1, "No community name specified.");
           } else if (version == SNMP_V3) {
                 /* Setup USM */                  /* Setup USM */
                 if (user == NULL || user[0] == '\0')                  if (user == NULL || user[0] == '\0')
                         errx(1, "No securityName specified");                          errx(1, "No securityName specified");

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37