routeros_api.h   routeros_api.h 
skipping to change at line 25 skipping to change at line 25
* with this program; if not, write to the Free Software Foundation, Inc., * with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
* Authors: * Authors:
* Florian octo Forster <octo at verplant.org> * Florian octo Forster <octo at verplant.org>
**/ **/
#ifndef ROUTEROS_API_H #ifndef ROUTEROS_API_H
#define ROUTEROS_API_H 1 #define ROUTEROS_API_H 1
#include <stdint.h>
#include <inttypes.h>
#include <routeros_version.h> #include <routeros_version.h>
#define ROUTEROS_API_PORT "8728" #define ROUTEROS_API_PORT "8728"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct ros_connection_s; struct ros_connection_s;
typedef struct ros_connection_s ros_connection_t; typedef struct ros_connection_s ros_connection_t;
skipping to change at line 72 skipping to change at line 75
const char *ros_reply_status (const ros_reply_t *r); const char *ros_reply_status (const ros_reply_t *r);
/* Receiving reply parameters */ /* Receiving reply parameters */
const char *ros_reply_param_key_by_index (const ros_reply_t *r, const char *ros_reply_param_key_by_index (const ros_reply_t *r,
unsigned int index); unsigned int index);
const char *ros_reply_param_val_by_index (const ros_reply_t *r, const char *ros_reply_param_val_by_index (const ros_reply_t *r,
unsigned int index); unsigned int index);
const char *ros_reply_param_val_by_key (const ros_reply_t *r, const char *k ey); const char *ros_reply_param_val_by_key (const ros_reply_t *r, const char *k ey);
/* High-level function for accessing /interface {{{ */
struct ros_interface_s;
typedef struct ros_interface_s ros_interface_t;
struct ros_interface_s
{
/* Name of the interface */
const char *name;
const char *type;
const char *comment;
/* Packet, octet and error counters. */
uint64_t rx_packets;
uint64_t tx_packets;
uint64_t rx_bytes;
uint64_t tx_bytes;
uint64_t rx_errors;
uint64_t tx_errors;
uint64_t rx_drops;
uint64_t tx_drops;
/* Maximum transfer unit */
unsigned int mtu;
unsigned int l2mtu;
/* Interface flags */
_Bool dynamic;
_Bool running;
_Bool enabled;
/* Next interface */
const ros_interface_t *next;
};
/* Callback function */
typedef int (*ros_interface_handler_t) (ros_connection_t *c,
const ros_interface_t *i, void *user_data);
int ros_interface (ros_connection_t *c,
ros_interface_handler_t handler, void *user_data);
/* }}} /interface */
/* High-level function for accessing /interface/wireless/registration-table
{{{ */
struct ros_registration_table_s;
typedef struct ros_registration_table_s ros_registration_table_t;
struct ros_registration_table_s
{
/* Name of the interface */
const char *interface;
/* Name of the remote radio */
const char *radio_name;
/* ap is set to true, if the REMOTE radio is an access point. */
_Bool ap;
_Bool wds;
/* Receive and transmit rate in MBit/s */
double rx_rate;
double tx_rate;
/* Packet, octet and frame counters. */
uint64_t rx_packets;
uint64_t tx_packets;
uint64_t rx_bytes;
uint64_t tx_bytes;
uint64_t rx_frames;
uint64_t tx_frames;
uint64_t rx_frame_bytes;
uint64_t tx_frame_bytes;
uint64_t rx_hw_frames;
uint64_t tx_hw_frames;
uint64_t rx_hw_frame_bytes;
uint64_t tx_hw_frame_bytes;
/* Signal quality information (in dBm) */
double rx_signal_strength;
double tx_signal_strength;
double signal_to_noise;
/* Overall connection quality (in percent) */
double rx_ccq;
double tx_ccq;
/* Next interface */
const ros_registration_table_t *next;
};
/* Callback function */
typedef int (*ros_registration_table_handler_t) (ros_connection_t *c,
const ros_registration_table_t *r, void *user_data);
int ros_registration_table (ros_connection_t *c,
ros_registration_table_handler_t handler, void *user_data);
/* }}} /interface/wireless/registration-table */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* ROUTEROS_API_H */ #endif /* ROUTEROS_API_H */
/* vim: set ts=2 sw=2 noet fdm=marker : */ /* vim: set ts=2 sw=2 noet fdm=marker : */
 End of changes. 2 change blocks. 
0 lines changed or deleted 98 lines changed or added


 routeros_version.h   routeros_version.h 
skipping to change at line 30 skipping to change at line 30
**/ **/
#ifndef ROUTEROS_VERSION_H #ifndef ROUTEROS_VERSION_H
#define ROUTEROS_VERSION_H 1 #define ROUTEROS_VERSION_H 1
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define ROS_VERSION_MAJOR 0 #define ROS_VERSION_MAJOR 0
#define ROS_VERSION_MINOR 1 #define ROS_VERSION_MINOR 2
#define ROS_VERSION_PATCH 0 #define ROS_VERSION_PATCH 0
#define ROS_VERSION_STRING "0.1.0" #define ROS_VERSION_STRING "0.2.0"
#define ROS_VERSION_ENCODE(major, minor, patch) \ #define ROS_VERSION_ENCODE(major, minor, patch) \
((major) * 10000 + (minor) * 100 + (patch)) ((major) * 10000 + (minor) * 100 + (patch))
#define ROS_VERSION \ #define ROS_VERSION \
ROS_VERSION_ENCODE(ROS_VERSION_MAJOR, ROS_VERSION_MINOR, ROS_VERSION _PATCH) ROS_VERSION_ENCODE(ROS_VERSION_MAJOR, ROS_VERSION_MINOR, ROS_VERSION _PATCH)
int ros_version (void); int ros_version (void);
const char *ros_version_string (void); const char *ros_version_string (void);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/