Audiovox P965 Datasheet Page 206

  • Download
  • Add to my manuals
  • Print
  • Page
    / 280
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 205
Librouteros
203
if->running ? "running" : "stopped",
if->enabled ? "enabled" : "disabled");
print_interface (if->next);
}
/* Callback function that is called by "ros_interface" */
static int handle_interfaces (ros_connection_t *c, const ros_interface_t *if, void *user_data)
{
print_interface (if);
return (0);
}
int main (int argc, char **argv)
{
ros_connection_t *c;
/* Connect to the router */
c = ros_connect ("my-router.example.com", ROUTEROS_API_PORT,
"api_user", "secret");
if (c == NULL)
{
fprintf (stderr, "ros_connect failed: %s\n", strerror (errno));
exit (EXIT_FAILURE);
}
/* Query a list of interfaces and call "handle_interfaces". */
ros_interface (c, handle_interfaces, /* user data = */ NULL);
/* Disconnect from the router. */
ros_disconnect (c);
exit (EXIT_SUCCESS);
}
External links
librouteros' homepage
[1]
librouteros(3) manual page
[2]
ros.c
[3]
, a thorough example program.
Freshmeat entry
[4]
li/jointfilesconvert/437201/bgcrypt in the Free Software Directory
[5]
Page view 205
1 2 ... 201 202 203 204 205 206 207 208 209 210 211 ... 279 280

Comments to this Manuals

No comments