X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frouteros_api.h;h=63fd7d9aa90f3a2babd00b7cd5ff306ba5b5471a;hb=5a9c21cc2cbff2eb640008a88bb857ea3a888aee;hp=26138b0f624cee30780f3114c21610c05dcc6c92;hpb=63943b56d7fdeedb4c9742dfb309bbf3dd52d1ed;p=routeros-api.git diff --git a/src/routeros_api.h b/src/routeros_api.h index 26138b0..63fd7d9 100644 --- a/src/routeros_api.h +++ b/src/routeros_api.h @@ -19,6 +19,8 @@ * Florian octo Forster **/ +#define ROUTEROS_API_PORT "8728" + struct mt_connection_s; typedef struct mt_connection_s mt_connection_t; @@ -41,7 +43,7 @@ int mt_disconnect (mt_connection_t *con); int mt_query (mt_connection_t *c, const char *command, size_t args_num, const char * const *args, - mt_reply_handler_t *handler, void *user_data); + mt_reply_handler_t handler, void *user_data); /* * Reply handling @@ -49,9 +51,13 @@ int mt_query (mt_connection_t *c, const mt_reply_t *mt_reply_next (const mt_reply_t *r); int mt_reply_num (const mt_reply_t *r); +const char *mt_reply_status (const mt_reply_t *r); + /* Receiving reply parameters */ -const char *mt_reply_param_key_by_index (const mt_reply_t *r, unsigned int index); -const char *mt_reply_param_val_by_index (const mt_reply_t *r, unsigned int index); +const char *mt_reply_param_key_by_index (const mt_reply_t *r, + unsigned int index); +const char *mt_reply_param_val_by_index (const mt_reply_t *r, + unsigned int index); const char *mt_reply_param_val_by_key (const mt_reply_t *r, const char *key); /* vim: set ts=2 sw=2 noet fdm=marker : */