Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
network-status.c File Reference

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
 

Detailed Description

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.

Function Documentation

static bool _compile_regex ( const char *  text)
static
Examples:
/src/samples/network/network-status.c.

References regex.

Referenced by startup_network().

static bool _match_link ( const struct sol_network_link link)
static
static void _on_network_event ( void *  data,
const struct sol_network_link link,
enum sol_network_event  event 
)
static
static void shutdown_network ( void  )
static
SOL_MAIN_DEFAULT ( startup_network  ,
shutdown_network   
)
static void startup_network ( void  )
static

Variable Documentation

regex_t regex
static