64 #ifndef SOL_NO_API_VERSION
65 #define SOL_NETCTL_NETWORK_PARAMS_API_VERSION (1)
83 #define SOL_NETCTL_AGENT_NAME "Name"
84 #define SOL_NETCTL_AGENT_IDENTITY "Identity"
85 #define SOL_NETCTL_AGENT_PASSPHRASE "Passphrase"
86 #define SOL_NETCTL_AGENT_WPS "WPS"
87 #define SOL_NETCTL_AGENT_USERNAME "Username"
88 #define SOL_NETCTL_AGENT_PASSWORD "Password"
102 enum sol_netctl_service_state {
185 #ifndef SOL_NO_API_VERSION
186 #define SOL_NETCTL_PROXY_API_VERSION (1)
207 #ifndef SOL_NO_API_VERSION
208 #define SOL_NETCTL_PROVIDER_API_VERSION (1)
229 #ifndef SOL_NO_API_VERSION
230 #define SOL_NETCTL_ETHERNET_API_VERSION (1)
248 #define SOL_NETCTL_SERVICE_TYPE_ETHERNET "ethernet"
249 #define SOL_NETCTL_SERVICE_TYPE_WIFI "wifi"
250 #define SOL_NETCTL_SERVICE_TYPE_BLUETOOTH "bluetooth"
251 #define SOL_NETCTL_SERVICE_TYPE_CELLULAR "cellular"
252 #define SOL_NETCTL_SERVICE_TYPE_GPS "gps"
253 #define SOL_NETCTL_SERVICE_TYPE_VPN "vpn"
254 #define SOL_NETCTL_SERVICE_TYPE_GADGET "gadget"
255 #define SOL_NETCTL_SERVICE_TYPE_P2P "p2p"
266 enum sol_netctl_state {
309 #ifndef SOL_NO_API_VERSION
310 #define SOL_NETCTL_AGENT_INPUT_API_VERSION (1)
330 #ifndef SOL_NO_API_VERSION
331 #define SOL_NETCTL_AGENT_API_VERSION (1)
844 SOL_ATTR_WARN_UNUSED_RESULT
873 if (name && strcmp(name, service_name) == 0)
enum sol_netctl_service_state sol_netctl_service_get_state(const struct sol_netctl_service *service)
Gets the service state.
struct sol_network_link_addr gateway
The network gateway.
Definition: sol-netctl.h:80
struct sol_network_link_addr addr
The network devices address.
Definition: sol-netctl.h:72
int sol_netctl_unregister_agent(void)
unregister a agent for network connection
const char * sol_netctl_service_state_to_str(enum sol_netctl_service_state state)
Converts sol_netctl_service_state to a string name.
void(* cancel)(void *data)
connection cancel callback used to inform connection cancel
Definition: sol-netctl.h:357
struct sol_network_link_addr netmask
The network devices netmask.
Definition: sol-netctl.h:76
Definition: sol-netctl.h:137
Definition: sol-netctl.h:175
void(* request_input)(void *data, const struct sol_netctl_service *service, const struct sol_ptr_vector *inputs)
connection input callback used to inform connection login input
Definition: sol-netctl.h:350
enum sol_netctl_state sol_netctl_get_state(void)
Gets the global connection state of system.
struct sol_netctl_proxy sol_netctl_proxy
struct to represent a network proxy.
uint16_t api_version
API version.
Definition: sol-netctl.h:210
struct sol_netctl_provider sol_netctl_provider
struct to represent a network provider.
uint16_t api_version
API version.
Definition: sol-netctl.h:67
Definition: sol-netctl.h:131
#define SOL_PTR_VECTOR_FOREACH_IDX(vector, itrvar, idx)
Macro to iterate over the pointer vector easily.
Definition: sol-vector.h:672
int sol_netctl_del_service_monitor(sol_netctl_service_monitor_cb cb, const void *data)
Dels a monitor for the updated netctl services.
struct sol_netctl_agent_input sol_netctl_agent_input
agent input struct
char * interface
Interface name.
Definition: sol-netctl.h:237
Definition: sol-netctl.h:144
enum sol_netctl_service_state sol_netctl_service_state_from_str(const char *state)
Converts a string service state to sol_netctl_service_state.
int sol_netctl_scan(void)
request scan the surrounding devices
char * url
automatic proxy configuration URL
Definition: sol-netctl.h:193
const char * sol_netctl_service_get_name(const struct sol_netctl_service *service)
Gets the service name.
uint16_t speed
Selected speed of line.
Definition: sol-netctl.h:245
Definition: sol-netctl.h:273
Definition: sol-netctl.h:279
static struct sol_netctl_service * sol_netctl_find_service_by_name(const char *service_name)
get so_netctl_service struct from serivce name.
Definition: sol-netctl.h:860
enum sol_netctl_proxy_method method
proxy method provided
Definition: sol-netctl.h:191
int32_t sol_netctl_service_get_strength(const struct sol_netctl_service *service)
Gets the service strength.
Definition: sol-netctl.h:173
static void enabled(void *data, bool powered)
Definition: browse.c:155
uint16_t api_version
Definition: sol-netctl.h:332
uint16_t api_version
API version.
Definition: sol-netctl.h:232
Structure to represent a network link.
Definition: sol-network.h:166
bool sol_netctl_service_is_roaming(const struct sol_netctl_service *service)
Checks whether the service is roaming or not.
void(* sol_netctl_service_monitor_cb)(void *data, const struct sol_netctl_service *service)
Service monitor callback used to inform a service changed.
Definition: sol-netctl.h:373
Definition: sol-netctl.h:286
int sol_netctl_add_service_monitor(sol_netctl_service_monitor_cb cb, const void *data)
Adds a monitor for the updated netctl services.
struct sol_netctl_network_params sol_netctl_network_params
network params
int sol_netctl_service_connect(struct sol_netctl_service *service)
Connect the service.
struct to represent a network provider.
Definition: sol-netctl.h:206
int sol_netctl_del_error_monitor(sol_netctl_error_monitor_cb cb, const void *data)
Dels a monitor for the call error happens.
struct sol_netctl_agent agent
Definition: netctl.c:33
void(* sol_netctl_manager_monitor_cb)(void *data)
Manager monitor callback used to inform a manager updated.
Definition: sol-netctl.h:381
network params
Definition: sol-netctl.h:63
uint16_t api_version
API version.
Definition: sol-netctl.h:188
const struct sol_netctl_ethernet * sol_netctl_service_get_ethernet(const struct sol_netctl_service *service)
Gets the service ethernet.
char * duplex
Selected duplex settings of line.
Definition: sol-netctl.h:241
Definition: sol-netctl.h:124
const char * sol_netctl_service_get_type(const struct sol_netctl_service *service)
Gets the service type.
Definition: sol-netctl.h:109
These are routines that Soletta provides for its buffer implementation.
char * domain
VPN Domain.
Definition: sol-netctl.h:215
Structure to represent a network address, both IPv6 and IPv4 are valid.
Definition: sol-network.h:145
bool sol_netctl_service_is_autoconnect(const struct sol_netctl_service *service)
Checks whether the service is autoconnect or not.
bool sol_netctl_service_is_immutable(const struct sol_netctl_service *service)
Checks whether the service is immutable or not.
Definition: sol-netctl.h:292
void(* report_error)(void *data, const struct sol_netctl_service *service, const char *error)
connection error callback used to inform connection failure
Definition: sol-netctl.h:341
bool sol_netctl_service_is_favorite(const struct sol_netctl_service *service)
Checks whether the service is favorite or not.
char * host
VPN host IP.
Definition: sol-netctl.h:213
char * name
provider name
Definition: sol-netctl.h:217
#define SOL_ATTR_WARN_UNUSED_RESULT
Causes a warning to be emitted if a caller of the function with this attribute does not use its retur...
Definition: sol-macros.h:187
struct to represent a network ethernet.
Definition: sol-netctl.h:228
uint16_t mtu
The ethernet MTU.
Definition: sol-netctl.h:243
const struct sol_ptr_vector * sol_netctl_service_get_domains(const struct sol_netctl_service *service)
Gets the service domains.
const struct sol_ptr_vector * sol_netctl_get_services(void)
Gets the netctl services.
Definition: sol-netctl.h:300
struct sol_netctl_ethernet sol_netctl_ethernet
struct to represent a network ethernet.
char * type
provider type
Definition: sol-netctl.h:219
sol_netctl_proxy_method
method of proxy generated for a network link.
Definition: sol-netctl.h:172
Definition: sol-netctl.h:165
int sol_netctl_del_manager_monitor(sol_netctl_manager_monitor_cb cb, const void *data)
Dels a monitor for the updated netctl manager properties.
void(* release)(void *data)
agent release callback used to inform agent release
Definition: sol-netctl.h:363
const struct sol_netctl_provider * sol_netctl_service_get_provider(const struct sol_netctl_service *service)
Gets the service provider.
int sol_netctl_add_manager_monitor(sol_netctl_manager_monitor_cb cb, const void *data)
Adds a monitor for the updated netctl manager properties.
agent callback functions
Definition: sol-netctl.h:329
int sol_netctl_service_get_network_address(const struct sol_netctl_service *service, struct sol_network_link **link)
Gets the service network address.
Definition: sol-netctl.h:117
int sol_netctl_request_retry(struct sol_netctl_service *service, bool retry)
request retry the connection or not when error type is reported
struct to represent a network proxy.
Definition: sol-netctl.h:184
Definition: sol-netctl.h:157
bool sol_netctl_get_radios_offline(void)
Gets the global connection state of offline.
Definition: sol-netctl.h:174
const struct sol_netctl_proxy * sol_netctl_service_get_proxy(const struct sol_netctl_service *service)
Gets the service proxy.
char * method
Possible value are auto and manual.
Definition: sol-netctl.h:235
int sol_netctl_service_disconnect(struct sol_netctl_service *service)
Disconnect the service.
sol_ptr_vector servers
List of proxy URIs when manual method is set.
Definition: sol-netctl.h:195
Soletta pointer vector is a wrapper around vector with an API more convenient to handle pointers...
Definition: sol-vector.h:310
Definition: sol-netctl.h:151
void(* sol_netctl_error_monitor_cb)(void *data, const struct sol_netctl_service *service, unsigned int error)
error monitor callback used to inform a call result
Definition: sol-netctl.h:391
int sol_netctl_register_agent(const struct sol_netctl_agent *agent, const void *data)
register a agent for network connection
int sol_netctl_set_radios_offline(bool enabled)
Sets the global connection state to offline.
sol_ptr_vector excludes
List of host can be accessed directly.
Definition: sol-netctl.h:197
struct sol_netctl_agent sol_netctl_agent
agent callback functions
int sol_netctl_add_error_monitor(sol_netctl_error_monitor_cb cb, const void *data)
Adds a monitor for the call error happens.
const struct sol_ptr_vector * sol_netctl_service_get_timeservers(const struct sol_netctl_service *service)
Gets the service timeservers.
These are routines that Soletta provides for its vector implementation.
const char * sol_netctl_service_get_error(const struct sol_netctl_service *service)
Gets the service error.
const struct sol_ptr_vector * sol_netctl_service_get_nameservers(const struct sol_netctl_service *service)
Gets the service nameservers.
char * address
Ethernet device address.
Definition: sol-netctl.h:239
struct sol_netctl_service sol_netctl_service
service struct
Definition: sol-netctl.h:54
int sol_netctl_request_input(struct sol_netctl_service *service, const struct sol_ptr_vector *inputs)
request the login input to connection
sol_netctl_state
the global connection state of system
Definition: sol-netctl.h:266
These are routines that Soletta provides for handling network link interfaces, making it possible to ...
const struct sol_ptr_vector * sol_netctl_service_get_security(const struct sol_netctl_service *service)
Gets the service security methods.
sol_netctl_service_state
service state
Definition: sol-netctl.h:102