: Changes in scli 0.2.10: : : - new "set nortel bridge vlan name" command : - new "set 3com bridge vlan name" command : - new "set 3com bridge vlan ports" command : - new "create 3com bridge vlan" command : - new "delete 3com bridge vlan" command : - new "create scli interp" command : - new "delete scli interp" command : - improved output generated by the "show interface stack" command : - display physical receive addresses in "show interface details" command : - file name - in the scli options is treated as stdin : - added option to set the SNMP version (which turns autoprobe off) : - minor bug fixes
Enjoy.
/js
Marcin Cieslak writes:
Marcin> Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de) napisa³(a):
: Changes in scli 0.2.10:
Marcin> - "show scli commands" not working (for me)
The syntax changed. Here is what scli(1) says:
show scli command info [<regex] show scli command details [<regex] show scli command tree
So here is the updated to the changes section in the 0.2.10 NEWS file:
- new "dump 3com bridge vlan" command - new "show scli command details" command - new "show scli command info" command - renamed "show scli command" to "show scli command tree"
Marcin> Is it possible to update your libxml detection macros?
Perhaps. What is broken?
/js
Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de) napisał(a):
Marcin Cieslak writes:
Marcin> Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de) napisał(a):
: Changes in scli 0.2.10:
Marcin> - "show scli commands" not working (for me)
The syntax changed. Here is what scli(1) says:
The help text in cmds.c ("help" command) should be changed as well.
Marcin> Is it possible to update your libxml detection macros?
Perhaps. What is broken?
In newer libxml2 configure bails on <xmlversion.h> include, should be <libxml/xmlversion.h>.
The m4 macros that came with libxml2 2.4.21 already have it fixed. The change to "libxml" should be backward-compatible, since xml2-config should give -I option to $PREFIX/include/libxml2 already:
# xml2-config --cflags -I/usr/local/include/libxml2 -I/usr/local/include
Older version used to give -I/usr/local/include/libxml2/libxml as well.
Perhaps libxml2 update on your side and regeneration of the configure script will do.
Marcin Cieslak writes:
Marcin> The help text in cmds.c ("help" command) should be changed as Marcin> well.
Thanks for pointing to it. I have just fixed this one.
Marcin> In newer libxml2 configure bails on <xmlversion.h> include, Marcin> should be <libxml/xmlversion.h>.
[...]
Marcin> Perhaps libxml2 update on your side and regeneration of the Marcin> configure script will do.
libxml2 is a debian package on my system and I was so far too lazy to fiddle with it since the debian testing version is still 2.4.19-4 and I hoped that once there is an upgrade the problem goes away. Perhaps I should file a debian bug report to encourage an update...
/js
On Wed, Jun 26, 2002 at 11:30:00AM +0200, Juergen Schoenwaelder wrote:
libxml2 is a debian package on my system and I was so far too lazy to fiddle with it since the debian testing version is still 2.4.19-4 and I hoped that once there is an upgrade the problem goes away. Perhaps I should file a debian bug report to encourage an update...
An update to the version in testing is extremely unlikely in the immediate future given that it's supposed to be in very deep freeze for release Any Moment Now(tm). FWIW the version in unstable is 2.4.22-1.
Mark Brown writes:
Mark> An update to the version in testing is extremely unlikely in the Mark> immediate future given that it's supposed to be in very deep Mark> freeze for release Any Moment Now(tm). FWIW the version in Mark> unstable is 2.4.22-1.
I will try to install the unstable version on my box and we will see what happens.
/js
Hi Juergen,
I got an error report from a debian user of the scli package stating that it segfaults on the command 'set' without arguments.
Turns out to be something simple:
scli > set
Program received signal SIGSEGV, Segmentation fault. 0x080631c6 in set_scli_regex (interp=0x8100c98, argc=0, argv=0x0) at cmds.c:926 926 if (regcomp(regex_flags, argv[1], interp->regex_flags) !=0) { (gdb) bt #0 0x080631c6 in set_scli_regex (interp=0x8100c98, argc=0, argv=0x0) at cmds.c:926 #1 0x0805e297 in scli_eval_cmd (interp=0x8100c98, cmd=0x80de890, argc=0, argv=0x0) at basic.c:867 #2 0x0805def4 in eval_all_cmd_node (interp=0x8100c98, node=0x8100ef4, s=0x81015ec) at basic.c:790 #3 0x0805e05a in eval_all_cmd_node (interp=0x8100c98, node=0x8100ee0, s=0x81015ec) at basic.c:816 #4 0x0805e4c1 in scli_eval_argc_argv (interp=0x8100c98, argc=1, argv=0x810ec90) at basic.c:924 #5 0x0805e756 in scli_eval_string (interp=0x8100c98, cmd=0x81051d8 "set") at basic.c:983 #6 0x0805b7ce in mainloop (interp=0x8100c98) at scli.c:115 #7 0x0805c24a in main (argc=1, argv=0xbffffcd4) at scli.c:503
argv[1] with argv=0.. I guess there should be a test for argc==2 just before that line.
regards, Remco.
Remco van de Meent writes:
Remco> I got an error report from a debian user of the scli package Remco> stating that it segfaults on the command 'set' without Remco> arguments.
Remco> Turns out to be something simple:
[...]
Remco> argv[1] with argv=0.. I guess there should be a test for Remco> argc==2 just before that line.
Yes. And the set command should not be recursive in the first place. There are however more set/create/delete commands that should have the not recursive flag set. (They don't crash but it just does not make sense to recurse them.) Here is the full patch which I just checked into the CVS.
/js Index: 3com.c =================================================================== RCS file: /usr/home/schoenw/CVS/scli/scli/3com.c,v retrieving revision 1.12 diff -u -r1.12 3com.c --- 3com.c 2002/06/26 06:39:47 1.12 +++ 3com.c 2002/06/26 09:18:41 @@ -586,7 +586,7 @@ { "create 3com bridge vlan", "<vlanid> <name>", "The `create 3com bridge vlan' command is used to create a\n" "new virtual LAN with the given <vlanid> and <name>.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, create_3com_bridge_vlan }, @@ -595,14 +595,14 @@ "virtual LANs. The regular expression <regexp> is matched\n" "against the virtual LAN names to select the vlans that should\n" "be deleted.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, delete_3com_bridge_vlan },
{ "set 3com bridge vlan name", "<vlanid> <name>", "The `set 3com bridge vlan name' command changes the name of\n" "a virtual LAN.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_3com_bridge_vlan_name },
@@ -613,7 +613,7 @@ "should be modified. The <ports> argument contains a comma\n" "separated list of port numbers or port number ranges, e.g.\n" "1,5,7-8.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_3com_bridge_vlan_ports },
Index: cmds.c =================================================================== RCS file: /usr/home/schoenw/CVS/scli/scli/cmds.c,v retrieving revision 1.48 diff -u -r1.48 cmds.c --- cmds.c 2002/06/26 06:39:47 1.48 +++ cmds.c 2002/06/26 09:18:41 @@ -919,7 +919,7 @@ GSnmpEnum const *dft; regex_t _regex_flags, *regex_flags = NULL;
- if (argc > 2) { + if (argc < 1 || argc > 2) { return SCLI_SYNTAX_NUMARGS; }
@@ -927,7 +927,7 @@ interp->regex_flags = 0; return SCLI_OK; } - + regex_flags = &_regex_flags; if (regcomp(regex_flags, argv[1], interp->regex_flags) != 0) { g_string_assign(interp->result, argv[1]); @@ -957,7 +957,7 @@
g_return_val_if_fail(interp, SCLI_ERROR);
- if (argc > 2) { + if (argc < 1 || argc > 2) { return SCLI_SYNTAX_NUMARGS; }
@@ -1217,14 +1217,14 @@ "extend scli with modules coming from other sources. Dynamic\n" "loadable modules also simplify the development and management\n" "of site-specific modules.", - 0, + SCLI_CMD_FLAG_NORECURSE, NULL, NULL, cmd_scli_load },
{ "delete scli plugin", "<module>", "The `delete scli plugin' command removes a previously loaded\n" "modules from a running scli process.", - 0, + SCLI_CMD_FLAG_NORECURSE, NULL, NULL, cmd_scli_unload },
@@ -1255,7 +1255,7 @@ "scli command (fragment) <value>. If the alias <name> already\n" "exists, then the new <value> will be assigned to the existing\n" "alias.", - 0, + SCLI_CMD_FLAG_NORECURSE, NULL, NULL, create_scli_alias }, @@ -1264,14 +1264,14 @@ "aliases from the scli interpreter. The regular expression\n" "<regexp> is matched against all alias names in order to\n" "select the aliases that are deleted.", - 0, + SCLI_CMD_FLAG_NORECURSE, NULL, NULL, delete_scli_alias }, { "create scli interp", "<name>", "The `create scli interp' command creates a new internal scli\n" "interpreter with the name <name>.", - 0, + SCLI_CMD_FLAG_NORECURSE, NULL, NULL, create_scli_interp }, @@ -1280,7 +1280,7 @@ "scli interpreters from the main scli interpreter. The regular\n" "expression <regexp> is matched against all alias names in order\n" "to select the interpreter(s) to be removed.", - 0, + SCLI_CMD_FLAG_NORECURSE, NULL, NULL, delete_scli_interp }, @@ -1294,7 +1294,7 @@ "options off. The currently defined regular expression options\n" "are "extended" for POSIX extended regular expressions and\n" ""case-insensitive" for case insensitive matches.", - SCLI_CMD_FLAG_XML, + SCLI_CMD_FLAG_XML | SCLI_CMD_FLAG_NORECURSE, "", NULL, set_scli_regex }, @@ -1309,7 +1309,7 @@ "layer, "request" for the SNMP request handling layer, \n" ""transport" for the SNMP transport layer, "packet" for\n" "the SNMP packet layer, and "asn1" for the ASN.1 coding layer.", - SCLI_CMD_FLAG_XML, + SCLI_CMD_FLAG_XML | SCLI_CMD_FLAG_NORECURSE, "", NULL, set_scli_debugging }, @@ -1318,7 +1318,7 @@ "used as a pager if the output produced by an scli command does\n" "not fit on a single screen. The output is passed to the <pager>\n" "shell command via its standard input stream.", - 0, + SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_scli_pager }, @@ -1328,7 +1328,7 @@ ""scli" and "xml". The "scli" format is the default output\n" "format and described in this documentation. The "xml" output\n" "format is experimental and therefore not described here.", - SCLI_CMD_FLAG_XML, + SCLI_CMD_FLAG_XML | SCLI_CMD_FLAG_NORECURSE, "", NULL, set_scli_format }, Index: disman.c =================================================================== RCS file: /usr/home/schoenw/CVS/scli/scli/disman.c,v retrieving revision 1.40 diff -u -r1.40 disman.c --- disman.c 2002/06/26 06:39:47 1.40 +++ disman.c 2002/06/26 09:18:41 @@ -1617,13 +1617,13 @@
{ "create disman script", "<owner> <name> <description>", "...", - SCLI_CMD_FLAG_NEED_PEER, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, create_disman_script },
{ "create disman run", "<owner> <name> <args>", "...", - SCLI_CMD_FLAG_NEED_PEER, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, create_disman_run },
Index: interface.c =================================================================== RCS file: /usr/home/schoenw/CVS/scli/scli/interface.c,v retrieving revision 1.72 diff -u -r1.72 interface.c --- interface.c 2002/06/26 06:39:47 1.72 +++ interface.c 2002/06/26 09:18:41 @@ -1525,13 +1525,13 @@
{ "create interface stack", "<lower-regexp> <higher-regexp>", "", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, create_interface_stack },
{ "delete interface stack", "<lower-regexp> <higher-regexp>", "", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, delete_interface_stack },
@@ -1541,7 +1541,7 @@ "<regexp> is matched against the interface descriptions to\n" "select the interfaces of interest. The <value> parameter must\n" "be one of the strings "up", "down", or "testing".", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_interface_status },
@@ -1552,7 +1552,7 @@ "applications to better identify interfaces. The regular\n" "expression <regexp> is matched against the interface\n" "descriptions to select the interfaces.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_interface_alias },
@@ -1562,7 +1562,7 @@ "The regular expression <regexp> is matched against the interface\n" "descriptions to select the interfaces. The <value> parameter\n" "must be one of the strings "enabled" or "disabled".", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_interface_notifications },
@@ -1572,7 +1572,7 @@ "regular expression <regexp> is matched against the interface\n" "descriptions to select the interfaces. The <bool> parameter\n" "must be one of the strings "true" or "false".", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_interface_promiscuous },
Index: ip.c =================================================================== RCS file: /usr/home/schoenw/CVS/scli/scli/ip.c,v retrieving revision 1.38 diff -u -r1.38 ip.c --- ip.c 2002/06/26 06:39:47 1.38 +++ ip.c 2002/06/26 09:18:41 @@ -672,7 +672,7 @@ "The set ip forwarding command controls whether the IP protocol\n" "engine forwards IP datagrams or not. The <value> parameter must\n" "be one of the strings "enabled" or "disabled".", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_ip_forwarding }, @@ -680,7 +680,7 @@ "The set ip ttl command can be used to change the default\n" "time to live (TTL) value used by the IP protocol engine. The\n" "<number> parameter must be a number between 1 and 255 inclusive.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_ip_ttl }, Index: netsnmp.c =================================================================== RCS file: /usr/home/schoenw/CVS/scli/scli/netsnmp.c,v retrieving revision 1.5 diff -u -r1.5 netsnmp.c --- netsnmp.c 2002/06/26 06:39:47 1.5 +++ netsnmp.c 2002/06/26 09:18:41 @@ -386,13 +386,13 @@ "The `set netsnmp debugging' command controls whether the agent\n" "generates debug messages or not. The <value> parameter must\n" "be one of the strings "enabled" or "disabled".", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_netsnmp_debugging }, { "set netsnmp restart", NULL, "The `set netsnmp restart' command restarts the agent.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_netsnmp_restart }, Index: nortel.c =================================================================== RCS file: /usr/home/schoenw/CVS/scli/scli/nortel.c,v retrieving revision 1.32 diff -u -r1.32 nortel.c --- nortel.c 2002/06/26 06:39:47 1.32 +++ nortel.c 2002/06/26 09:18:42 @@ -977,7 +977,7 @@ { "create nortel bridge vlan", "<vlanid> <name>", "The `create nortel bridge vlan' command is used to create a\n" "new virtual LAN with the given <vlanid> and <name>.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, create_nortel_bridge_vlan },
@@ -986,14 +986,14 @@ "virtual LANs. The regular expression <regexp> is matched\n" "against the virtual LAN names to select the vlans that should\n" "be deleted.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, delete_nortel_bridge_vlan },
{ "set nortel bridge vlan name", "<vlanid> <name>", "The `set nortel bridge vlan name' command changes the name of\n" "a virtual LAN.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_nortel_bridge_vlan_name },
@@ -1004,7 +1004,7 @@ "should be modified. The <ports> argument contains a comma\n" "separated list of port numbers or port number ranges, e.g.\n" "1,5,7-8.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_nortel_bridge_vlan_ports },
@@ -1014,7 +1014,7 @@ "against the vlan names to select the vlan. The <ports> argument\n" "contains a comma separated list of port numbers or port number\n" "ranges, e.g. 1,5,7-8.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_nortel_bridge_vlan_default },
Index: snmp.c =================================================================== RCS file: /usr/home/schoenw/CVS/scli/scli/snmp.c,v retrieving revision 1.29 diff -u -r1.29 snmp.c --- snmp.c 2002/06/26 06:39:47 1.29 +++ snmp.c 2002/06/26 09:18:42 @@ -1206,7 +1206,7 @@ "The `create snmp vacm member' commands can be used to assign\n" "new members (security names) to vacm groups. New groups are\n" "created if they do not exist.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, create_snmp_vacm_member },
@@ -1214,14 +1214,14 @@ "The `delete snmp vacm member' commands can be used to delete\n" "members (security names) from vacm groups. Groups are deleted\n" "if the last member is deleted.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, delete_snmp_vacm_member },
{ "create snmp usm user", "<name> <template>", "The `create snmp usm user' commands can be used to create a\n" "new user by cloning an existing template.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, create_snmp_usm_user },
@@ -1230,7 +1230,7 @@ "SNMP engine generates authentication failure notifications.\n" "The <value> parameter must be one of the strings "enabled"\n" "or "disabled".", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_snmp_authentication_traps },
Index: system.c =================================================================== RCS file: /usr/home/schoenw/CVS/scli/scli/system.c,v retrieving revision 1.69 diff -u -r1.69 system.c --- system.c 2002/06/26 06:39:47 1.69 +++ system.c 2002/06/26 09:18:42 @@ -1460,21 +1460,21 @@ "The set system contact command configures the system contact\n" "information. The <string> argument should include information\n" "on how to contact a person who is responsible for this system.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_system_contact },
{ "set system name", "<string>", "The set system name command configures the name of the system.\n" "By convention, this is the fully-qualified domain name.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_system_name },
{ "set system location", "<string>", "The set system location command configures the physical\n" "location of the system.", - SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY, + SCLI_CMD_FLAG_NEED_PEER | SCLI_CMD_FLAG_DRY | SCLI_CMD_FLAG_NORECURSE, NULL, NULL, set_system_location },
participants (4)
-
Juergen Schoenwaelder
-
Marcin Cieslak
-
Mark Brown
-
Remco van de Meent