Datasheet

API multiplatform from townet
85
back from a command, are ever integer numbers, but this ones doesnt start from the number zero, like working in
telnet. To set the address of an ethernet port, for example, you may need to execute a print command to read all the
ids, and then to execute the setcommand passing the id of the line you really want to change. All the commands
needs to be launched from the root of the commands tree, so /ip/address/printis a valid command, while the two
commands /ip/addressand printcant be separated. To separater the parts of the commands tou needs to use a
slash /instead of the space, used in the telnet interface.
To see if there are other differences you can read the documentation of mikrotik api interface at the following
address:
[[1]]
DLL MKAPI, TO CONTROL MIKROTIK BOARDS
The mikapi.dll is a dynamic loadable library based on mikrotik api, and allows to connect to a mikrotik board from
pratically all the languages under windows. Due to the fact that MkApi is based on the mikrotikboard class and that a
DLL is a set of functions and not a set of classes, the DLL hide the MikApi object and shows a list of functions to
login, to execute commands and then to logout. The DLL library has the following interface:
AnsiString mk_parse_par(AnsiString stream, char* par, char* dest); AnsiString mk_parse_line(char* reply);
AnsiString mk_login(AnsiString remote, AnsiString user, AnsiString pass); AnsiString mk_command(AnsiString
text); AnsiString mk_xcommand(AnsiString text); void mk_start_icommand(AnsiString cmd); AnsiString
mk_icommand(); AnsiString mk_end_icommand(); void mk_close();
This functions works exactly like the same functions of the original MkApi library. To connect to more than one
board its possible to close the current connection with the instruction mk_close, and then to open a new one. This
function is not necessary when the class MkApi is used directly because the mk_close is directly called when the
object is deallocated.
References
[1] http:/ / wiki. mikrotik. com/ wiki/ API