Hi, First of all, thanks for such a great piece of software. It's really easy with smidump and the rest of the code.
I'm developing a new mode for scli. It's temporary called "ciscobridge", it should support most IOS switchs from cisco and I would like this mode to be included in the scli source.
The main difference with other switchs is that you must append the VLANID to the SNMP community for getting that VLAN information, like the forwarding table. For example, "scli host public@69".
My needs are: 1) get the MAC addres ("show mac-address-table") and description ("configure terminal -> interface fast 0/20 -> description") by VLAN & IFACE 2) show if a port is in trunk mode 3) change an interface to a vlan, change description of an interface
I've got 1) done, I would like someone try the beast and give some ideas of what could be done or what is needed.
The source code is here, just for testing: http://sistemas.dfi.uchile.cl/~amartoq/tmp/scli/
Thanks,
PS: Sample outputs here
$ ./scli host (host) scli > show ciscobridge vlan VLAN NAME STATUS PORTS 1 default operat 69 TEST operat Fa0/3 Fa0/5 Fa0/6 Fa0/7
(host) scli > show ciscobridge macaddresstable PORT STATUS ADDRESS VLAN IFNAME DESCRIPTION 0 mgmt ff:ff:ff:ff:ff:ff 1 13 learned 00:05:5d:94:c0:a9 1 Fa0/1 punto 5 oficina sistemas
$ telnet host User Access Verification
Password:
host>enable Password: host#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active 69 TEST active Fa0/3, Fa0/5, Fa0/6, Fa0/7 host#show mac-address-table Dynamic Address Count: 2 Secure Address Count: 0 Static Address (User-defined) Count: 0 System Self Address Count: 49 Total MAC addresses: 51 Maximum MAC addresses: 2048 Non-static Address Table: Destination Address Address Type VLAN Destination Port ------------------- ------------ ---- -------------------- 0005.5d94.c0a9 Dynamic 1 FastEthernet0/1
On Tue, Jun 08, 2004 at 05:52:18AM -0400, Aldrin Martoq wrote:
First of all, thanks for such a great piece of software. It's really easy with smidump and the rest of the code.
Nice to know that this software setup works for you.
I'm developing a new mode for scli. It's temporary called "ciscobridge", it should support most IOS switchs from cisco and I would like this mode to be included in the scli source.
I found a few places where the code crashes due to some missing checks for valid pointers and so on. (But these crashes are a feature of scli's design - I simply prefer segmentation faults over unnoticed bugs.)
The main difference with other switchs is that you must append the VLANID to the SNMP community for getting that VLAN information, like the forwarding table. For example, "scli host public@69".
My needs are:
- get the MAC addres ("show mac-address-table") and description
("configure terminal -> interface fast 0/20 -> description") by VLAN & IFACE 2) show if a port is in trunk mode 3) change an interface to a vlan, change description of an interface
I've got 1) done, I would like someone try the beast and give some ideas of what could be done or what is needed.
I am not too familiar with Cisco switches and hence it is hard to comment on the usefulnes of these commands. Anyway, once your code is stable, I am happy to add it to the distribution so people can try it and comment or improve it. Note that it has been a while since the last release, basically because I experimented with software different setups. I currently use gnet in addition to glib which provides a portable way to deal with IPv4 and IPv6 (I am using SNMP over IPv6 on my notebook).
In general, I started to cleanup the SNMP engine code so that it becomes cleaner and a well defined library. This is not finished, but things are slowly moving forward. Since the interface for the scli modes did not change much, it should be easy to integrate stuff into the current code base which was written against the current public version.
[The real reason why I did not release for some months now is that there is a nasty bug somewhere in the SNMP retransmission code where freed memory is used which I have not tracked down yet.]
/js
Juergen Schoenwaelder wrote:
In general, I started to cleanup the SNMP engine code so that it becomes cleaner and a well defined library. This is not finished, but things are slowly moving forward.
It is very nice to hear that scli is still being developed.
Since the interface for the scli modes did not change much, it should be easy to integrate stuff into the current code base which was written against the current public version.
[The real reason why I did not release for some months now is that there is a nasty bug somewhere in the SNMP retransmission code where freed memory is used which I have not tracked down yet.]
Maybe valgrind may be of some use here? (http://www.tldp.org/HOWTO/Valgrind-HOWTO/ && http://valgrind.kde.org/)
<QUOTE> Valgrind is a system for debugging and profiling x86-Linux programs. Valgrind is capable of detection of many memory management and threading bugs, namely: - use of uninitialised memory - reading or writing memory after it has been free()d - reading or writing off the end of malloc()d blocks - reading or writing inappropriate areas on the stack - memory leaks - passing of uninitialised and/or unaddressible memory to system calls - mismatched use of malloc/new/new[] vs. free/delete/delete[] </QUOTE>
/js
MfG, Kurt Pfeifle
----------------------------------------------------------------- Co-Organizer of the KDE Community World Summit 2004 ("aKademy") http://conference2004.kde.org/ ------------ pfeifle@kde.org mobile:+49-172-715.7017 ------------ office:+49-711-4017-5677 -----------------------------------------------------------------
On Tue, Jun 08, 2004 at 10:42:17PM +0200, Kurt Pfeifle wrote:
[...]
Maybe valgrind may be of some use here? (http://www.tldp.org/HOWTO/Valgrind-HOWTO/ && http://valgrind.kde.org/)
I know valgrind - really one of the coolest memory debuggers I have seen so far. Still, figuring out where the memory is released and where it should be released correctly probably takes an evening...
/js
participants (3)
-
Aldrin Martoq
-
Juergen Schoenwaelder
-
Kurt Pfeifle