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.
While it’s hopefully easy to port the library to other operating systems, it has currently only be tested on Linux. Success stories and patches are very welcome.
- 2010-03-29 Version 1.1.2 is available. Two memory leaks have been fixed in
ros_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 the
- 2009-12-22 Version 1.0.1 has been released. It fixes potential segmentation faults when
ros_querywas called with
NULLpointers. 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/wireless/registration-table/printhave been added. The simple command line client
roscan 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.
- librouteros-1.1.2.tar.bz2 (source tarball)
The development files are hosted on Github. You can “clone” it with the following command. Pull Requests are welcome anytime. :)
git clone git://github.com/octo/librouteros.git
The only documentation right now are the
- mikrotik.com, MikroTik’s homepage.
- API description in MikroTik’s Wiki, including alternative libraries in other languages.
librouteros is distributed under the ISC License. The license can also be found
COPYING file in the