X-Git-Url: https://git.octo.it/?p=routeros-api.git;a=blobdiff_plain;f=doc%2Flibrouteros.pod;h=8a98f87606183765854858785dca7aa88c8a5069;hp=9e083a7eebd413e1918b74912a9be1c6b42274aa;hb=7d47df8425792ff76e469259242c0d57011bc244;hpb=20ae1607659c975a777e5de324d5d4e94d02f25c diff --git a/doc/librouteros.pod b/doc/librouteros.pod index 9e083a7..8a98f87 100644 --- a/doc/librouteros.pod +++ b/doc/librouteros.pod @@ -67,7 +67,8 @@ called B: int callback (ros_connection_t *c, const ros_reply_t *r, void *user_data); The reply is broken into parts (or "sentences") and passed to the callback -function as a linked list of type B. The callback uses a couple of +function as a linked list of type B. It is only called once for +query and must traverse the linked list itself. The callback uses a couple of helper functions to iterate over this list and fetch parameters as necessary. The first and second arguments are objects representing the connection and the @@ -80,6 +81,10 @@ The value returned by the callback function will be returned by B to the calling code. To distinguish from error codes returned by B upon errors, use negative values in the callback function. +Because the entire reply is read back from the connection before the callback +function is called, it is legal for the callback function to send out another +query. + General queries / replies are handled using the following functions: =over 4