Content
Description
librouteros (or libRouterOS) is a C library to communicate with network devices by MikroTik running their Linux-based operating system RouterOS. It currently is a very low-level library in that is only abstracts the records based network protocol, not the commands, arguments and filters provided via this interface.
Currently the library is in an early development status. The goal is to write a plugin for collectd based on this library. Once that's done and released, the interface of this library will be declared stable and version 1.0 will be released. Until then, this is a work in progress.
While it's hopefully easy to port the library to other operating systems, it has currently only be tested with GNU / Linux. Success stories and patches are very welcome, of course.
News
- 2010-03-29 Version 1.1.2 is available. Two memory leaks have been fixed in
ros_queryandros_connect. Especiallyros_queryis subject to being run repeatedly and may cause an annoying growth of memory in an application. - 2010-01-04 Version 1.1.1 is available. The
ros_system_resourcecommand now returns memory and disk space in bytes, rather than “kilobytes” (actually kibibytes). The CPU frequency is also returned in hertz (Hz) rather than megahertz (MHz). - 2009-12-25 Version 1.1.0 has been released. It adds a high-level interface
for
/system/resource/printto both, the library and therosexample application. - 2009-12-22 Version 1.0.1 has been released. It fixes potential segmentation
faults when
ros_querywas called withNULLpointers. Also, compiling with g++, the GNU C++ compiler, has been simplified. Thanks to Andrey Ponomarenko for his feedback! - 2009-12-18 Version 1.0.0 has been released. It fixes some compiler warnings with GCC. Mostly, this release is there to show that the API is now considered stable.
- 2009-11-27 Version 0.2.0 is available. High-level interfaces for
/interface/printand/interface/wireless/registration-table/printhave been added. The simple command line clientroscan now be used to use the library from the command line, albeit not yet very useful. - 2009-11-25 The initial version, 0.1.0, has been released.
Download
- librouteros-1.1.2.tar.bz2 (source tarball)
- librouteros-1.1.2.tar.gz (source tarball)
Development version
The development files are kept in a Git repository. You can “clone” it with the following command. Patches are welcome anytime. :)
A web interface to browse the repository is available, too.
Documentation
The only documentation right now is the manpage. You can find an online version here:
See also
- mikrotik.com, MikroTik's homepage
- API description in MikroTik's Wiki, including alternative libraries in other languages.
License information
librouteros is distributed under the GPL, version 2. The license can also be found in the COPYING file in the source tarball.