Soletta™ Framework
|
Network link status. More...
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "soletta.h"
#include "sol-network.h"
#include "sol-vector.h"
Functions | |
static bool | _compile_regex (const char *text) |
static bool | _match_link (const struct sol_network_link *link) |
static void | _on_network_event (void *data, const struct sol_network_link *link, enum sol_network_event event) |
static void | shutdown_network (void) |
SOL_MAIN_DEFAULT (startup_network, shutdown_network) | |
static void | startup_network (void) |
Variables | |
static regex_t | regex |
Network link status.
Network sample that monitors specified links. It checks if the link is up/down and its addresses. To see the usage help, -h or –help.
|
static |
|
static |
References regex, and sol_network_link_get_name().
Referenced by _on_network_event().
|
static |
References _match_link(), sol_network_link_addr::addr, sol_network_link::addrs, sol_network_link::flags, SOL_BUFFER_DECLARE_STATIC, sol_buffer_get_slice(), SOL_NETWORK_INET_ADDR_STR_LEN, SOL_NETWORK_LINK_ADDED, sol_network_link_addr_to_str(), SOL_NETWORK_LINK_CHANGED, sol_network_link_get_name(), SOL_NETWORK_LINK_REMOVED, SOL_NETWORK_LINK_UP, SOL_STR_SLICE_PRINT, and SOL_VECTOR_FOREACH_IDX.
Referenced by shutdown_network(), and startup_network().
|
static |
References _on_network_event(), regex, and sol_network_unsubscribe_events().
SOL_MAIN_DEFAULT | ( | startup_network | , |
shutdown_network | |||
) |
|
static |
References _compile_regex(), _on_network_event(), regex, sol_argc(), sol_argv(), SOL_INT_CHECK_GOTO, sol_network_subscribe_events(), and sol_quit_with_code().
|
static |
Referenced by _compile_regex(), _match_link(), shutdown_network(), and startup_network().