5 * Copyright (C) 2007-2014 Intel Corporation. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #define CONNMAN_API_SUBJECT_TO_CHANGE
28 #define WIFI_COUNTRY_CODE_LEN 2
29 #define WIFI_PHY_MODE_LEN 18
30 #define GIO_SOCKET_RETRY_COUNT 3
33 #include <connman/dbus.h>
35 dbus_bool_t __connman_dbus_append_objpath_dict_array(DBusMessage *msg,
36 connman_dbus_append_cb_t function, void *user_data);
37 dbus_bool_t __connman_dbus_append_objpath_array(DBusMessage *msg,
38 connman_dbus_append_cb_t function, void *user_data);
39 int __connman_dbus_init(DBusConnection *conn);
40 void __connman_dbus_cleanup(void);
42 DBusMessage *__connman_error_failed(DBusMessage *msg, int errnum);
43 DBusMessage *__connman_error_invalid_arguments(DBusMessage *msg);
44 DBusMessage *__connman_error_permission_denied(DBusMessage *msg);
45 DBusMessage *__connman_error_passphrase_required(DBusMessage *msg);
46 DBusMessage *__connman_error_not_registered(DBusMessage *msg);
47 DBusMessage *__connman_error_not_unique(DBusMessage *msg);
48 DBusMessage *__connman_error_not_supported(DBusMessage *msg);
49 DBusMessage *__connman_error_not_implemented(DBusMessage *msg);
50 DBusMessage *__connman_error_not_found(DBusMessage *msg);
51 DBusMessage *__connman_error_no_carrier(DBusMessage *msg);
52 DBusMessage *__connman_error_in_progress(DBusMessage *msg);
53 DBusMessage *__connman_error_already_exists(DBusMessage *msg);
54 DBusMessage *__connman_error_already_enabled(DBusMessage *msg);
55 DBusMessage *__connman_error_already_disabled(DBusMessage *msg);
56 DBusMessage *__connman_error_already_connected(DBusMessage *msg);
57 DBusMessage *__connman_error_not_connected(DBusMessage *msg);
58 DBusMessage *__connman_error_operation_aborted(DBusMessage *msg);
59 DBusMessage *__connman_error_operation_timeout(DBusMessage *msg);
60 DBusMessage *__connman_error_invalid_service(DBusMessage *msg);
61 DBusMessage *__connman_error_invalid_property(DBusMessage *msg);
62 #if defined TIZEN_EXT_WIFI_MESH
63 DBusMessage *__connman_error_invalid_command(DBusMessage *msg);
64 DBusMessage *__connman_error_scan_abort_failed(DBusMessage *msg);
67 int __connman_manager_init(void);
68 void __connman_manager_cleanup(void);
71 TIME_UPDATES_UNKNOWN = 0,
72 TIME_UPDATES_MANUAL = 1,
73 TIME_UPDATES_AUTO = 2,
76 enum time_updates __connman_clock_timeupdates(void);
77 int __connman_clock_init(void);
78 void __connman_clock_cleanup(void);
80 void __connman_clock_update_timezone(void);
82 int __connman_timezone_init(void);
83 void __connman_timezone_cleanup(void);
85 char *__connman_timezone_lookup(void);
86 int __connman_timezone_change(const char *zone);
88 int __connman_agent_init(void);
89 void __connman_agent_cleanup(void);
91 void __connman_counter_send_usage(const char *path,
92 DBusMessage *message);
93 int __connman_counter_register(const char *owner, const char *path,
94 unsigned int interval);
95 int __connman_counter_unregister(const char *owner, const char *path);
97 int __connman_counter_init(void);
98 void __connman_counter_cleanup(void);
100 #include <connman/agent.h>
102 struct connman_service;
105 void __connman_agent_cancel(struct connman_service *service);
107 typedef void (* authentication_cb_t) (struct connman_service *service,
108 bool values_received,
109 const char *name, int name_len,
110 const char *identifier, const char *secret,
111 bool wps, const char *wpspin,
112 const char *error, void *user_data);
113 typedef void (* browser_authentication_cb_t) (struct connman_service *service,
114 bool authentication_done,
115 const char *error, void *user_data);
116 typedef void (* peer_wps_cb_t) (struct connman_peer *peer, bool choice_done,
117 const char *wpspin, const char *error,
119 int __connman_agent_request_passphrase_input(struct connman_service *service,
120 authentication_cb_t callback,
121 const char *dbus_sender, void *user_data);
122 int __connman_agent_request_login_input(struct connman_service *service,
123 authentication_cb_t callback, void *user_data);
124 int __connman_agent_request_browser(struct connman_service *service,
125 browser_authentication_cb_t callback,
126 const char *url, void *user_data);
127 int __connman_agent_report_peer_error(struct connman_peer *peer,
128 const char *path, const char *error,
129 report_error_cb_t callback,
130 const char *dbus_sender,
132 int __connman_agent_request_peer_authorization(struct connman_peer *peer,
133 peer_wps_cb_t callback,
135 const char *dbus_sender,
138 #include <connman/log.h>
140 int __connman_log_init(const char *program, const char *debug,
141 gboolean detach, gboolean backtrace,
142 const char *program_name, const char *program_version);
143 void __connman_log_cleanup(gboolean backtrace);
144 void __connman_log_enable(struct connman_debug_desc *start,
145 struct connman_debug_desc *stop);
147 #include <connman/backtrace.h>
149 #include <connman/option.h>
151 #include <connman/setting.h>
153 #include <connman/plugin.h>
155 int __connman_plugin_init(const char *pattern, const char *exclude);
156 void __connman_plugin_cleanup(void);
158 #include <connman/task.h>
160 int __connman_task_init(void);
161 void __connman_task_cleanup(void);
163 #include <connman/inet.h>
165 char **__connman_inet_get_running_interfaces(void);
166 int __connman_inet_modify_address(int cmd, int flags, int index, int family,
169 unsigned char prefixlen,
170 const char *broadcast);
171 int __connman_inet_get_interface_address(int index, int family, void *address);
172 int __connman_inet_get_interface_ll_address(int index, int family, void *address);
173 int __connman_inet_get_interface_mac_address(int index, uint8_t *mac_address);
175 bool __connman_inet_is_any_addr(const char *address, int family);
177 #include <netinet/ip6.h>
178 #include <netinet/icmp6.h>
180 typedef void (*__connman_inet_rs_cb_t) (struct nd_router_advert *reply,
181 unsigned int length, void *user_data);
183 int __connman_inet_ipv6_send_rs(int index, int timeout,
184 __connman_inet_rs_cb_t callback, void *user_data);
185 int __connman_inet_ipv6_send_ra(int index, struct in6_addr *src_addr,
186 GSList *prefixes, int router_lifetime);
187 #if defined TIZEN_EXT
188 void __connman_network_set_auto_ipv6_gateway(char *gateway, void *user_data);
191 typedef void (*__connman_inet_ns_cb_t) (struct nd_neighbor_advert *reply,
193 struct in6_addr *addr,
195 int __connman_inet_ipv6_do_dad(int index, int timeout_ms,
196 struct in6_addr *addr,
197 __connman_inet_ns_cb_t callback, void *user_data);
199 typedef void (*__connman_inet_recv_rs_cb_t) (struct nd_router_solicit *reply,
200 unsigned int length, void *user_data);
201 int __connman_inet_ipv6_start_recv_rs(int index,
202 __connman_inet_recv_rs_cb_t callback,
203 void *user_data, void **context);
204 void __connman_inet_ipv6_stop_recv_rs(void *context);
206 int __connman_network_refresh_rs_ipv6(struct connman_network *network, int index);
208 GSList *__connman_inet_ipv6_get_prefixes(struct nd_router_advert *hdr,
209 unsigned int length);
210 typedef void (*connman_inet_addr_cb_t) (const char *src_address, int index,
212 int __connman_inet_get_route(const char *dst_address,
213 connman_inet_addr_cb_t callback, void *user_data);
215 struct __connman_inet_rtnl_handle {
217 struct sockaddr_nl local;
218 struct sockaddr_nl peer;
229 struct ifaddrmsg ifa;
236 int __connman_inet_rtnl_open(struct __connman_inet_rtnl_handle *rth);
237 typedef void (*__connman_inet_rtnl_cb_t) (struct nlmsghdr *answer,
239 int __connman_inet_rtnl_talk(struct __connman_inet_rtnl_handle *rtnl,
240 struct nlmsghdr *n, int timeout,
241 __connman_inet_rtnl_cb_t callback, void *user_data);
243 int __connman_inet_rtnl_send(struct __connman_inet_rtnl_handle *rtnl,
246 return __connman_inet_rtnl_talk(rtnl, n, 0, NULL, NULL);
249 void __connman_inet_rtnl_close(struct __connman_inet_rtnl_handle *rth);
250 int __connman_inet_rtnl_addattr_l(struct nlmsghdr *n, size_t max_length,
251 int type, const void *data, size_t data_length);
252 int __connman_inet_rtnl_addattr32(struct nlmsghdr *n, size_t maxlen,
253 int type, __u32 data);
255 int __connman_inet_add_fwmark_rule(uint32_t table_id, int family, uint32_t fwmark);
256 int __connman_inet_del_fwmark_rule(uint32_t table_id, int family, uint32_t fwmark);
257 int __connman_inet_add_default_to_table(uint32_t table_id, int ifindex, const char *gateway);
258 int __connman_inet_add_subnet_to_table(uint32_t table_id, int ifindex,
259 const char *gateway, unsigned char prefixlen);
260 int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex, const char *gateway);
261 int __connman_inet_del_subnet_from_table(uint32_t table_id, int ifindex,
262 const char *gateway, unsigned char prefixlen);
263 int __connman_inet_get_address_netmask(int ifindex,
264 struct sockaddr_in *address, struct sockaddr_in *netmask);
266 bool __connman_inet_isrootnfs_device(const char *devname);
267 char **__connman_inet_get_pnp_nameservers(const char *pnp_file);
269 #include <connman/resolver.h>
271 int __connman_resolver_init(gboolean dnsproxy);
272 void __connman_resolver_cleanup(void);
273 void __connman_resolver_append_fallback_nameservers(void);
274 int __connman_resolvfile_append(int index, const char *domain, const char *server);
275 int __connman_resolvfile_remove(int index, const char *domain, const char *server);
276 int __connman_resolver_redo_servers(int index);
277 int __connman_resolver_set_mdns(int index, bool enabled);
279 GKeyFile *__connman_storage_open_global(void);
280 GKeyFile *__connman_storage_load_global(void);
281 int __connman_storage_save_global(GKeyFile *keyfile);
282 void __connman_storage_delete_global(void);
283 #if defined TIZEN_EXT
284 GKeyFile *__connman_storage_load_ins(void);
285 int __connman_storage_save_ins(GKeyFile *keyfile);
288 GKeyFile *__connman_storage_load_config(const char *ident);
289 GKeyFile *__connman_storage_load_provider_config(const char *ident);
291 GKeyFile *__connman_storage_open_service(const char *ident);
292 int __connman_storage_save_service(GKeyFile *keyfile, const char *ident);
293 GKeyFile *__connman_storage_load_provider(const char *identifier);
294 void __connman_storage_save_provider(GKeyFile *keyfile, const char *identifier);
295 bool __connman_storage_remove_provider(const char *identifier);
296 char **__connman_storage_get_providers(void);
297 bool __connman_storage_remove_service(const char *service_id);
299 int __connman_detect_init(void);
300 void __connman_detect_cleanup(void);
302 #include <connman/inotify.h>
304 int __connman_inotify_init(void);
305 void __connman_inotify_cleanup(void);
307 #include <connman/proxy.h>
309 int __connman_proxy_init(void);
310 void __connman_proxy_cleanup(void);
312 #include <connman/ipconfig.h>
314 struct connman_ipaddress {
316 unsigned char prefixlen;
323 struct connman_ipconfig_ops {
324 void (*up) (struct connman_ipconfig *ipconfig, const char *ifname);
325 void (*down) (struct connman_ipconfig *ipconfig, const char *ifname);
326 void (*lower_up) (struct connman_ipconfig *ipconfig, const char *ifname);
327 void (*lower_down) (struct connman_ipconfig *ipconfig, const char *ifname);
328 void (*ip_bound) (struct connman_ipconfig *ipconfig, const char *ifname);
329 void (*ip_release) (struct connman_ipconfig *ipconfig, const char *ifname);
330 void (*route_set) (struct connman_ipconfig *ipconfig, const char *ifname);
331 void (*route_unset) (struct connman_ipconfig *ipconfig, const char *ifname);
334 struct connman_ipconfig *__connman_ipconfig_create(int index,
335 enum connman_ipconfig_type type);
337 #define __connman_ipconfig_ref(ipconfig) \
338 __connman_ipconfig_ref_debug(ipconfig, __FILE__, __LINE__, __func__)
339 #define __connman_ipconfig_unref(ipconfig) \
340 __connman_ipconfig_unref_debug(ipconfig, __FILE__, __LINE__, __func__)
342 struct connman_ipconfig *
343 __connman_ipconfig_ref_debug(struct connman_ipconfig *ipconfig,
344 const char *file, int line, const char *caller);
345 void __connman_ipconfig_unref_debug(struct connman_ipconfig *ipconfig,
346 const char *file, int line, const char *caller);
348 void __connman_ipconfig_clear_address(struct connman_ipconfig *ipconfig);
349 void *__connman_ipconfig_get_data(struct connman_ipconfig *ipconfig);
350 void __connman_ipconfig_set_data(struct connman_ipconfig *ipconfig, void *data);
352 int __connman_ipconfig_get_index(struct connman_ipconfig *ipconfig);
354 void __connman_ipconfig_set_ops(struct connman_ipconfig *ipconfig,
355 const struct connman_ipconfig_ops *ops);
356 int __connman_ipconfig_set_method(struct connman_ipconfig *ipconfig,
357 enum connman_ipconfig_method method);
358 void __connman_ipconfig_disable_ipv6(struct connman_ipconfig *ipconfig);
359 void __connman_ipconfig_enable_ipv6(struct connman_ipconfig *ipconfig);
361 int __connman_ipconfig_init(void);
362 void __connman_ipconfig_cleanup(void);
364 struct rtnl_link_stats;
366 void __connman_ipconfig_newlink(int index, unsigned short type,
367 unsigned int flags, const char *address,
369 struct rtnl_link_stats *stats);
370 void __connman_ipconfig_dellink(int index, struct rtnl_link_stats *stats);
371 int __connman_ipconfig_newaddr(int index, int family, const char *label,
372 unsigned char prefixlen, const char *address);
373 void __connman_ipconfig_deladdr(int index, int family, const char *label,
374 unsigned char prefixlen, const char *address);
375 void __connman_ipconfig_newroute(int index, int family, unsigned char scope,
376 const char *dst, const char *gateway);
377 void __connman_ipconfig_delroute(int index, int family, unsigned char scope,
378 const char *dst, const char *gateway);
380 void __connman_ipconfig_foreach(void (*function) (int index, void *user_data),
382 enum connman_ipconfig_type __connman_ipconfig_get_config_type(
383 struct connman_ipconfig *ipconfig);
384 unsigned short __connman_ipconfig_get_type_from_index(int index);
385 unsigned int __connman_ipconfig_get_flags_from_index(int index);
386 const char *__connman_ipconfig_get_gateway_from_index(int index,
387 enum connman_ipconfig_type type);
388 void __connman_ipconfig_set_index(struct connman_ipconfig *ipconfig, int index);
390 const char *__connman_ipconfig_get_local(struct connman_ipconfig *ipconfig);
391 void __connman_ipconfig_set_local(struct connman_ipconfig *ipconfig, const char *address);
392 const char *__connman_ipconfig_get_peer(struct connman_ipconfig *ipconfig);
393 void __connman_ipconfig_set_peer(struct connman_ipconfig *ipconfig, const char *address);
394 const char *__connman_ipconfig_get_broadcast(struct connman_ipconfig *ipconfig);
395 void __connman_ipconfig_set_broadcast(struct connman_ipconfig *ipconfig, const char *broadcast);
396 const char *__connman_ipconfig_get_gateway(struct connman_ipconfig *ipconfig);
397 void __connman_ipconfig_set_gateway(struct connman_ipconfig *ipconfig, const char *gateway);
399 #if defined TIZEN_EXT
400 void __connman_ipconfig_set_dhcp_lease_duration(struct connman_ipconfig *ipconfig, int dhcp_lease_duration);
403 unsigned char __connman_ipconfig_get_prefixlen(struct connman_ipconfig *ipconfig);
404 void __connman_ipconfig_set_prefixlen(struct connman_ipconfig *ipconfig, unsigned char prefixlen);
406 int __connman_ipconfig_enable(struct connman_ipconfig *ipconfig);
407 int __connman_ipconfig_disable(struct connman_ipconfig *ipconfig);
408 bool __connman_ipconfig_is_usable(struct connman_ipconfig *ipconfig);
410 const char *__connman_ipconfig_method2string(enum connman_ipconfig_method method);
411 const char *__connman_ipconfig_type2string(enum connman_ipconfig_type type);
412 enum connman_ipconfig_method __connman_ipconfig_string2method(const char *method);
414 void __connman_ipconfig_append_ipv4(struct connman_ipconfig *ipconfig,
415 DBusMessageIter *iter);
416 void __connman_ipconfig_append_ipv4config(struct connman_ipconfig *ipconfig,
417 DBusMessageIter *iter);
418 void __connman_ipconfig_append_ipv6(struct connman_ipconfig *ipconfig,
419 DBusMessageIter *iter,
420 struct connman_ipconfig *ip4config);
421 void __connman_ipconfig_append_ipv6config(struct connman_ipconfig *ipconfig,
422 DBusMessageIter *iter);
423 int __connman_ipconfig_set_config(struct connman_ipconfig *ipconfig,
424 DBusMessageIter *array);
425 void __connman_ipconfig_append_ethernet(struct connman_ipconfig *ipconfig,
426 DBusMessageIter *iter);
427 enum connman_ipconfig_method __connman_ipconfig_get_method(
428 struct connman_ipconfig *ipconfig);
430 int __connman_ipconfig_address_add(struct connman_ipconfig *ipconfig);
431 int __connman_ipconfig_address_remove(struct connman_ipconfig *ipconfig);
432 int __connman_ipconfig_address_unset(struct connman_ipconfig *ipconfig);
433 #if defined TIZEN_EXT
435 * Description: __connman_service_lookup_from_index cannot find correct service
436 * e.g. same interface or same APN of cellular profile
438 int __connman_ipconfig_gateway_add(struct connman_ipconfig *ipconfig, struct connman_service *service);
440 int __connman_ipconfig_gateway_add(struct connman_ipconfig *ipconfig);
442 void __connman_ipconfig_gateway_remove(struct connman_ipconfig *ipconfig);
444 int __connman_ipconfig_set_proxy_autoconfig(struct connman_ipconfig *ipconfig,
446 const char *__connman_ipconfig_get_proxy_autoconfig(struct connman_ipconfig *ipconfig);
447 void __connman_ipconfig_set_dhcp_address(struct connman_ipconfig *ipconfig,
448 const char *address);
449 char *__connman_ipconfig_get_dhcp_address(struct connman_ipconfig *ipconfig);
450 void __connman_ipconfig_set_dhcpv6_prefixes(struct connman_ipconfig *ipconfig,
452 char **__connman_ipconfig_get_dhcpv6_prefixes(struct connman_ipconfig *ipconfig);
454 int __connman_ipconfig_load(struct connman_ipconfig *ipconfig,
455 GKeyFile *keyfile, const char *identifier, const char *prefix);
456 int __connman_ipconfig_save(struct connman_ipconfig *ipconfig,
457 GKeyFile *keyfile, const char *identifier, const char *prefix);
458 bool __connman_ipconfig_ipv6_privacy_enabled(struct connman_ipconfig *ipconfig);
459 int __connman_ipconfig_ipv6_reset_privacy(struct connman_ipconfig *ipconfig);
460 int __connman_ipconfig_ipv6_set_privacy(struct connman_ipconfig *ipconfig,
462 bool __connman_ipconfig_ipv6_is_enabled(struct connman_ipconfig *ipconfig);
464 int __connman_ipconfig_set_rp_filter();
465 void __connman_ipconfig_unset_rp_filter(int old_value);
467 #include <connman/utsname.h>
469 int __connman_utsname_set_hostname(const char *hostname);
470 int __connman_utsname_set_domainname(const char *domainname);
472 #include <connman/timeserver.h>
474 int __connman_timeserver_init(void);
475 void __connman_timeserver_cleanup(void);
477 char **__connman_timeserver_system_get();
479 GSList *__connman_timeserver_add_list(GSList *server_list,
480 const char *timeserver);
481 GSList *__connman_timeserver_get_all(struct connman_service *service);
482 int __connman_timeserver_sync(struct connman_service *service);
484 enum __connman_dhcpv6_status {
485 CONNMAN_DHCPV6_STATUS_FAIL = 0,
486 CONNMAN_DHCPV6_STATUS_SUCCEED = 1,
487 CONNMAN_DHCPV6_STATUS_RESTART = 2,
490 #if defined TIZEN_EXT
491 void set_dhcp_discover_timeout(int timeout_value);
492 void set_dhcp_discover_retry_count(int retry_count);
495 typedef void (* dhcpv6_cb) (struct connman_network *network,
496 enum __connman_dhcpv6_status status, gpointer data);
498 typedef void (* dhcp_cb) (struct connman_ipconfig *ipconfig,
499 struct connman_network *opt_network,
500 bool success, gpointer data);
501 char *__connman_dhcp_get_server_address(struct connman_ipconfig *ipconfig);
502 int __connman_dhcp_start(struct connman_ipconfig *ipconfig,
503 struct connman_network *network, dhcp_cb callback,
505 void __connman_dhcp_stop(struct connman_ipconfig *ipconfig);
506 void __connman_dhcp_decline(struct connman_ipconfig *ipconfig);
507 int __connman_dhcp_init(void);
508 void __connman_dhcp_cleanup(void);
509 int __connman_dhcpv6_init(void);
510 void __connman_dhcpv6_cleanup(void);
511 int __connman_dhcpv6_start_info(struct connman_network *network,
513 void __connman_dhcpv6_stop(struct connman_network *network);
514 int __connman_dhcpv6_start(struct connman_network *network,
515 GSList *prefixes, dhcpv6_cb callback);
516 int __connman_dhcpv6_start_renew(struct connman_network *network,
518 int __connman_dhcpv6_start_release(struct connman_network *network,
520 int __connman_dhcpv6_start_pd(int index, GSList *prefixes, dhcpv6_cb callback);
521 void __connman_dhcpv6_stop_pd(int index);
522 int __connman_dhcpv6_start_pd_renew(struct connman_network *network,
524 int __connman_dhcpv6_start_pd_release(struct connman_network *network,
527 int __connman_ipv4_init(void);
528 void __connman_ipv4_cleanup(void);
530 int __connman_connection_init(void);
531 void __connman_connection_cleanup(void);
533 int __connman_connection_gateway_add(struct connman_service *service,
535 enum connman_ipconfig_type type,
537 void __connman_connection_gateway_remove(struct connman_service *service,
538 enum connman_ipconfig_type type);
539 int __connman_connection_get_vpn_index(int phy_index);
541 bool __connman_connection_update_gateway(void);
543 typedef void (*__connman_ntp_cb_t) (bool success, void *user_data);
544 int __connman_ntp_start(char *server, __connman_ntp_cb_t callback,
546 void __connman_ntp_stop();
548 int __connman_wpad_init(void);
549 void __connman_wpad_cleanup(void);
550 int __connman_wpad_start(struct connman_service *service);
551 void __connman_wpad_stop(struct connman_service *service);
553 int __connman_wispr_init(void);
554 void __connman_wispr_cleanup(void);
555 int __connman_wispr_start(struct connman_service *service,
556 enum connman_ipconfig_type type);
557 void __connman_wispr_stop(struct connman_service *service);
559 #include <connman/technology.h>
561 void __connman_technology_list_struct(DBusMessageIter *array);
563 int __connman_technology_add_device(struct connman_device *device);
564 int __connman_technology_remove_device(struct connman_device *device);
565 int __connman_technology_enabled(enum connman_service_type type);
566 int __connman_technology_disabled(enum connman_service_type type);
567 int __connman_technology_set_offlinemode(bool offlinemode);
568 bool __connman_technology_get_offlinemode(void);
569 void __connman_technology_set_connected(enum connman_service_type type,
572 int __connman_technology_add_rfkill(unsigned int index,
573 enum connman_service_type type,
576 int __connman_technology_update_rfkill(unsigned int index,
577 enum connman_service_type type,
580 int __connman_technology_remove_rfkill(unsigned int index,
581 enum connman_service_type type);
583 void __connman_technology_scan_started(struct connman_device *device);
584 void __connman_technology_scan_stopped(struct connman_device *device,
585 enum connman_service_type type);
586 void __connman_technology_add_interface(enum connman_service_type type,
587 int index, const char *ident);
588 void __connman_technology_remove_interface(enum connman_service_type type,
589 int index, const char *ident);
590 void __connman_technology_notify_regdom_by_device(struct connman_device *device,
591 int result, const char *alpha2);
593 #if defined TIZEN_EXT
601 int set_connman_bssid(enum bssid_type mode, char *bssid, const char *ifname);
602 void technology_save_device(struct connman_device *device);
605 #include <connman/device.h>
607 int __connman_device_init(const char *device, const char *nodevice);
608 void __connman_device_cleanup(void);
610 void __connman_device_list(DBusMessageIter *iter, void *user_data);
612 enum connman_service_type __connman_device_get_service_type(struct connman_device *device);
613 struct connman_device *__connman_device_find_device(enum connman_service_type type);
614 int __connman_device_request_scan(enum connman_service_type type);
615 int __connman_device_request_scan_full(enum connman_service_type type);
616 int __connman_device_request_hidden_scan(struct connman_device *device,
617 const char *ssid, unsigned int ssid_len,
618 const char *identity, const char *passphrase,
619 const char *security, void *user_data);
620 void __connman_device_stop_scan(enum connman_service_type type);
621 #if defined TIZEN_EXT
622 int __connman_device_request_specific_scan(enum connman_service_type type,
623 const char *ifname, int scan_type, GSList *specific_scan_list);
624 int connman_device_request_device_scan(enum connman_service_type type,
625 const char * ifname, bool force_full_scan);
628 bool __connman_device_isfiltered(const char *devname);
630 void __connman_device_set_network(struct connman_device *device,
631 struct connman_network *network);
632 void __connman_device_cleanup_networks(struct connman_device *device);
634 int __connman_device_enable(struct connman_device *device);
635 int __connman_device_disable(struct connman_device *device);
636 int __connman_device_disconnect(struct connman_device *device);
638 bool __connman_device_has_driver(struct connman_device *device);
640 const char *__connman_device_get_type(struct connman_device *device);
642 int __connman_rfkill_init(void);
643 void __connman_rfkill_cleanup(void);
644 int __connman_rfkill_block(enum connman_service_type type, bool block);
646 #if defined TIZEN_EXT
647 char *index2ident(int index, const char *prefix);
648 char *index2addr(int index);
651 #include <connman/network.h>
653 int __connman_network_init(void);
654 void __connman_network_cleanup(void);
656 void __connman_network_set_device(struct connman_network *network,
657 struct connman_device *device);
659 int __connman_network_connect(struct connman_network *network);
660 int __connman_network_disconnect(struct connman_network *network);
661 int __connman_network_clear_ipconfig(struct connman_network *network,
662 struct connman_ipconfig *ipconfig);
663 int __connman_network_enable_ipconfig(struct connman_network *network,
664 struct connman_ipconfig *ipconfig);
666 const char *__connman_network_get_type(struct connman_network *network);
667 const char *__connman_network_get_group(struct connman_network *network);
668 const char *__connman_network_get_ident(struct connman_network *network);
669 bool __connman_network_get_weakness(struct connman_network *network);
671 int __connman_config_init();
672 void __connman_config_cleanup(void);
674 int __connman_config_load_service(GKeyFile *keyfile, const char *group,
676 int __connman_config_provision_service(struct connman_service *service);
677 int __connman_config_provision_service_ident(struct connman_service *service,
678 const char *ident, const char *file, const char *entry);
680 char *__connman_config_get_string(GKeyFile *key_file,
681 const char *group_name, const char *key, GError **error);
683 char **__connman_config_get_string_list(GKeyFile *key_file,
684 const char *group_name, const char *key, gsize *length, GError **error);
686 bool __connman_config_get_bool(GKeyFile *key_file,
687 const char *group_name, const char *key, GError **error);
688 bool __connman_config_address_provisioned(const char *address,
689 const char *netmask);
691 #include <connman/tethering.h>
693 int __connman_tethering_init(void);
694 void __connman_tethering_cleanup(void);
696 const char *__connman_tethering_get_bridge(void);
697 int __connman_tethering_set_enabled(void);
698 void __connman_tethering_set_disabled(void);
699 void __connman_tethering_list_clients(DBusMessageIter *array);
701 int __connman_private_network_request(DBusMessage *msg, const char *owner);
702 int __connman_private_network_release(const char *path);
704 int __connman_ipv6pd_setup(const char *bridge);
705 void __connman_ipv6pd_cleanup(void);
707 #include <connman/provider.h>
709 bool __connman_provider_check_routes(struct connman_provider *provider);
710 int __connman_provider_append_user_route(struct connman_provider *provider,
711 int family, const char *network, const char *netmask);
712 void __connman_provider_append_properties(struct connman_provider *provider, DBusMessageIter *iter);
713 void __connman_provider_list(DBusMessageIter *iter, void *user_data);
714 bool __connman_provider_is_immutable(struct connman_provider *provider);
715 int __connman_provider_create_and_connect(DBusMessage *msg);
716 const char * __connman_provider_get_ident(struct connman_provider *provider);
717 int __connman_provider_indicate_state(struct connman_provider *provider,
718 enum connman_provider_state state);
719 int __connman_provider_indicate_error(struct connman_provider *provider,
720 enum connman_provider_error error);
721 int __connman_provider_connect(struct connman_provider *provider,
722 const char *dbus_sender);
723 int __connman_provider_remove_by_path(const char *path);
724 void __connman_provider_cleanup(void);
725 int __connman_provider_init(void);
727 #include <connman/service.h>
729 int __connman_service_init(void);
730 void __connman_service_cleanup(void);
731 int __connman_service_load_modifiable(struct connman_service *service);
733 void __connman_service_list_struct(DBusMessageIter *iter);
734 #if defined TIZEN_EXT_INS
735 void __connman_ins_list_struct(DBusMessageIter *iter);
738 #if defined TIZEN_EXT
739 int connman_service_get_ipv6_dns_method(struct connman_service *service);
740 enum connman_dnsconfig_method {
741 CONNMAN_DNSCONFIG_METHOD_UNKNOWN = 0,
742 CONNMAN_DNSCONFIG_METHOD_MANUAL = 1,
743 CONNMAN_DNSCONFIG_METHOD_DHCP = 2,
747 int __connman_service_compare(const struct connman_service *a,
748 const struct connman_service *b);
750 struct connman_service *__connman_service_lookup_from_index(int index);
751 struct connman_service *__connman_service_create_from_network(struct connman_network *network);
752 struct connman_service *__connman_service_create_from_provider(struct connman_provider *provider);
753 bool __connman_service_index_is_default(int index);
754 #if defined TIZEN_EXT
755 void __connman_service_notify_strength_changed(struct connman_network *network);
757 void __connman_service_update_from_network(struct connman_network *network);
758 void __connman_service_remove_from_network(struct connman_network *network);
759 void __connman_service_read_ip4config(struct connman_service *service);
760 void __connman_service_read_ip6config(struct connman_service *service);
762 struct connman_ipconfig *__connman_service_get_ip4config(
763 struct connman_service *service);
764 struct connman_ipconfig *__connman_service_get_ip6config(
765 struct connman_service *service);
766 struct connman_ipconfig *__connman_service_get_ipconfig(
767 struct connman_service *service, int family);
768 void __connman_service_notify_ipv4_configuration(
769 struct connman_service *service);
770 void __connman_service_wispr_start(struct connman_service *service,
771 enum connman_ipconfig_type type);
772 bool __connman_service_is_connected_state(struct connman_service *service,
773 enum connman_ipconfig_type type);
774 const char *__connman_service_get_path(struct connman_service *service);
775 const char *__connman_service_get_name(struct connman_service *service);
776 struct connman_network *__connman_service_get_network(struct connman_service *service);
777 enum connman_service_security __connman_service_get_security(struct connman_service *service);
778 const char *__connman_service_get_phase2(struct connman_service *service);
779 bool __connman_service_wps_enabled(struct connman_service *service);
780 #if defined TIZEN_EXT
781 void __connman_service_set_storage_reload(struct connman_service *service,
782 bool storage_reload);
784 int __connman_service_set_favorite(struct connman_service *service,
786 int __connman_service_set_favorite_delayed(struct connman_service *service,
788 bool delay_ordering);
789 int __connman_service_set_immutable(struct connman_service *service,
791 int __connman_service_set_ignore(struct connman_service *service,
793 void __connman_service_set_search_domains(struct connman_service *service,
795 int __connman_service_set_mdns(struct connman_service *service,
798 void __connman_service_set_string(struct connman_service *service,
799 const char *key, const char *value);
800 int __connman_service_online_check_failed(struct connman_service *service,
801 enum connman_ipconfig_type type);
802 int __connman_service_ipconfig_indicate_state(struct connman_service *service,
803 enum connman_service_state new_state,
804 enum connman_ipconfig_type type);
805 enum connman_service_state __connman_service_ipconfig_get_state(
806 struct connman_service *service,
807 enum connman_ipconfig_type type);
809 #if defined TIZEN_EXT
810 void connman_check_proxy_setup_and_wispr_start(struct connman_service *service);
813 int __connman_service_indicate_error(struct connman_service *service,
814 enum connman_service_error error);
815 int __connman_service_clear_error(struct connman_service *service);
816 int __connman_service_indicate_default(struct connman_service *service);
818 int __connman_service_connect(struct connman_service *service,
819 enum connman_service_connect_reason reason);
820 int __connman_service_disconnect(struct connman_service *service);
821 int __connman_service_disconnect_all(void);
822 void __connman_service_set_active_session(bool enable, GSList *list);
823 void __connman_service_auto_connect(enum connman_service_connect_reason reason);
825 #if defined TIZEN_EXT
826 bool __connman_service_get_auto_connect_mode(void);
827 void __connman_service_set_auto_connect_mode(bool enable);
830 #if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET
831 int __connman_service_get_use_eapol(struct connman_service *service);
832 #endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */
834 bool __connman_service_remove(struct connman_service *service);
835 bool __connman_service_is_provider_pending(struct connman_service *service);
836 void __connman_service_set_provider_pending(struct connman_service *service,
838 void __connman_service_set_hidden_data(struct connman_service *service,
840 void __connman_service_return_error(struct connman_service *service,
841 int error, gpointer user_data);
843 int __connman_service_provision_changed(const char *ident);
844 void __connman_service_set_config(struct connman_service *service,
845 const char *file_id, const char *section);
847 const char *__connman_service_type2string(enum connman_service_type type);
848 enum connman_service_type __connman_service_string2type(const char *str);
849 enum connman_service_security __connman_service_string2security(const char *str);
851 #if defined TIZEN_EXT
852 int __connman_service_nameserver_append(struct connman_service *service,
853 const char *nameserver, bool is_auto,
854 enum connman_ipconfig_type type);
855 int __connman_service_nameserver_remove(struct connman_service *service,
856 const char *nameserver, bool is_auto,
857 enum connman_ipconfig_type type);
859 int __connman_service_nameserver_append(struct connman_service *service,
860 const char *nameserver, bool is_auto);
861 int __connman_service_nameserver_remove(struct connman_service *service,
862 const char *nameserver, bool is_auto);
864 void __connman_service_nameserver_clear(struct connman_service *service);
865 void __connman_service_nameserver_add_routes(struct connman_service *service,
867 void __connman_service_nameserver_del_routes(struct connman_service *service,
868 enum connman_ipconfig_type type);
869 void __connman_service_set_timeservers(struct connman_service *service,
871 int __connman_service_timeserver_append(struct connman_service *service,
872 const char *timeserver);
873 int __connman_service_timeserver_remove(struct connman_service *service,
874 const char *timeserver);
875 void __connman_service_timeserver_changed(struct connman_service *service,
877 void __connman_service_set_pac(struct connman_service *service,
879 #if defined TIZEN_EXT
881 * Returns profile count if there is any connected profiles
882 * that use same interface
884 int __connman_service_get_connected_count_of_iface(struct connman_service *service);
885 void __connman_service_set_proxy(struct connman_service *service,
886 const char *proxies);
887 int check_passphrase_ext(struct connman_network *network,
888 const char *passphrase);
890 bool __connman_service_is_hidden(struct connman_service *service);
891 bool __connman_service_is_split_routing(struct connman_service *service);
892 bool __connman_service_index_is_split_routing(int index);
893 int __connman_service_get_index(struct connman_service *service);
894 void __connman_service_set_hidden(struct connman_service *service);
895 void __connman_service_set_hostname(struct connman_service *service,
896 const char *hostname);
897 const char *__connman_service_get_hostname(struct connman_service *service);
898 void __connman_service_set_domainname(struct connman_service *service,
899 const char *domainname);
900 const char *__connman_service_get_nameserver(struct connman_service *service);
901 void __connman_service_set_proxy_autoconfig(struct connman_service *service,
904 void __connman_service_set_identity(struct connman_service *service,
905 const char *identity);
906 void __connman_service_set_anonymous_identity(struct connman_service *service,
907 const char *anonymous_identity);
908 void __connman_service_set_subject_match(struct connman_service *service,
909 const char *subject_match);
910 void __connman_service_set_altsubject_match(struct connman_service *service,
911 const char *altsubject_match);
912 void __connman_service_set_domain_suffix_match(struct connman_service *service,
913 const char *domain_suffix_match);
914 void __connman_service_set_domain_match(struct connman_service *service,
915 const char *domain_match);
916 void __connman_service_set_agent_identity(struct connman_service *service,
917 const char *agent_identity);
918 int __connman_service_set_passphrase(struct connman_service *service,
919 const char *passphrase);
920 const char *__connman_service_get_passphrase(struct connman_service *service);
921 int __connman_service_check_passphrase(enum connman_service_security security,
922 const char *passphrase);
923 int __connman_service_reset_ipconfig(struct connman_service *service,
924 enum connman_ipconfig_type type, DBusMessageIter *array,
925 enum connman_service_state *new_state);
927 void __connman_service_notify(struct connman_service *service,
928 unsigned int rx_packets, unsigned int tx_packets,
929 unsigned int rx_bytes, unsigned int tx_bytes,
930 unsigned int rx_error, unsigned int tx_error,
931 unsigned int rx_dropped, unsigned int tx_dropped);
933 int __connman_service_counter_register(const char *counter);
934 void __connman_service_counter_unregister(const char *counter);
936 #include <connman/peer.h>
938 int __connman_peer_init(void);
939 void __connman_peer_cleanup(void);
941 void __connman_peer_list_struct(DBusMessageIter *array);
942 const char *__connman_peer_get_path(struct connman_peer *peer);
943 void __connman_peer_disconnect_all(void);
945 int __connman_peer_service_init(void);
946 void __connman_peer_service_cleanup(void);
948 void __connman_peer_service_set_driver(struct connman_peer_driver *driver);
949 int __connman_peer_service_register(const char *owner, DBusMessage *msg,
950 const unsigned char *specification,
951 int specification_length,
952 const unsigned char *query,
953 int query_length, int version,
955 int __connman_peer_service_unregister(const char *owner,
956 const unsigned char *specification,
957 int specification_length,
958 const unsigned char *query,
959 int query_length, int version);
961 #if defined TIZEN_EXT_WIFI_MESH
962 #include <connman/mesh.h>
964 int __connman_mesh_init(void);
965 void __connman_mesh_cleanup(void);
966 bool __connman_technology_get_connected(enum connman_service_type type);
967 void __connman_technology_mesh_interface_create_finished(
968 enum connman_service_type type, bool success,
970 void __connman_technology_mesh_interface_remove_finished(
971 enum connman_service_type type, bool success);
972 void __connman_mesh_peer_list_struct(DBusMessageIter *array);
973 void __connman_mesh_connected_peer_list_struct(DBusMessageIter *array);
974 void __connman_mesh_disconnected_peer_list_struct(DBusMessageIter *array);
975 int __connman_mesh_dhcp_start(struct connman_ipconfig *ipconfig,
976 dhcp_cb callback, gpointer user_data);
977 int __connman_device_abort_scan(enum connman_service_type type);
978 void __connman_technology_notify_abort_scan(enum connman_service_type type,
980 int __connman_device_request_mesh_specific_scan(enum connman_service_type type,
981 const char *name, unsigned int freq);
982 void __connman_mesh_auto_connect(void);
983 #endif /* TIZEN_EXT_WIFI_MESH */
985 #include <connman/session.h>
987 void __connman_service_mark_dirty();
988 void __connman_service_save(struct connman_service *service);
990 #include <connman/notifier.h>
992 int __connman_technology_init(void);
993 void __connman_technology_cleanup(void);
995 int __connman_notifier_init(void);
996 void __connman_notifier_cleanup(void);
998 void __connman_notifier_service_add(struct connman_service *service,
1000 void __connman_notifier_service_remove(struct connman_service *service);
1001 void __connman_notifier_enter_online(enum connman_service_type type);
1002 void __connman_notifier_leave_online(enum connman_service_type type);
1003 void __connman_notifier_connect(enum connman_service_type type);
1004 void __connman_notifier_disconnect(enum connman_service_type type);
1005 void __connman_notifier_offlinemode(bool enabled);
1006 void __connman_notifier_default_changed(struct connman_service *service);
1007 void __connman_notifier_proxy_changed(struct connman_service *service);
1008 void __connman_notifier_service_state_changed(struct connman_service *service,
1009 enum connman_service_state state);
1010 void __connman_notifier_ipconfig_changed(struct connman_service *service,
1011 struct connman_ipconfig *ipconfig);
1013 bool __connman_notifier_is_connected(void);
1014 const char *__connman_notifier_get_state(void);
1016 #include <connman/rtnl.h>
1018 #if defined TIZEN_EXT
1019 int __connman_rtnl_init(int retry_count);
1021 int __connman_rtnl_init(void);
1023 void __connman_rtnl_start(void);
1024 void __connman_rtnl_cleanup(void);
1026 #if defined TIZEN_EXT
1027 void __connman_wifi_vsie_list_struct(DBusMessageIter *iter);
1030 enum connman_device_type __connman_rtnl_get_device_type(int index);
1031 unsigned int __connman_rtnl_update_interval_add(unsigned int interval);
1032 unsigned int __connman_rtnl_update_interval_remove(unsigned int interval);
1033 int __connman_rtnl_request_update(void);
1034 int __connman_rtnl_send(const void *buf, size_t len);
1036 #if defined TIZEN_EXT
1037 void rtnl_nameserver_add_all(struct connman_service *service,
1038 enum connman_ipconfig_type type);
1041 bool __connman_session_policy_autoconnect(enum connman_service_connect_reason reason);
1043 int __connman_session_create(DBusMessage *msg);
1044 int __connman_session_destroy(DBusMessage *msg);
1046 int __connman_session_init(void);
1047 void __connman_session_cleanup(void);
1049 struct connman_stats_data {
1050 unsigned int rx_packets;
1051 unsigned int tx_packets;
1052 unsigned int rx_bytes;
1053 unsigned int tx_bytes;
1054 unsigned int rx_errors;
1055 unsigned int tx_errors;
1056 unsigned int rx_dropped;
1057 unsigned int tx_dropped;
1061 int __connman_stats_init(void);
1062 void __connman_stats_cleanup(void);
1063 int __connman_stats_service_register(struct connman_service *service);
1064 void __connman_stats_service_unregister(struct connman_service *service);
1065 int __connman_stats_update(struct connman_service *service,
1067 struct connman_stats_data *data);
1068 int __connman_stats_get(struct connman_service *service,
1070 struct connman_stats_data *data);
1072 int __connman_iptables_dump(int type,
1073 const char *table_name);
1074 int __connman_iptables_new_chain(int type,
1075 const char *table_name,
1077 int __connman_iptables_delete_chain(int type,
1078 const char *table_name,
1080 int __connman_iptables_flush_chain(int type,
1081 const char *table_name,
1083 int __connman_iptables_find_chain(int type,
1084 const char *table_name,
1086 int __connman_iptables_change_policy(int type,
1087 const char *table_name,
1089 const char *policy);
1090 int __connman_iptables_append(int type,
1091 const char *table_name,
1093 const char *rule_spec);
1094 int __connman_iptables_insert(int type,
1095 const char *table_name,
1097 const char *rule_spec);
1098 int __connman_iptables_delete(int type,
1099 const char *table_name,
1101 const char *rule_spec);
1103 typedef void (*connman_iptables_iterate_chains_cb_t) (const char *chain_name,
1105 int __connman_iptables_iterate_chains(int type,
1106 const char *table_name,
1107 connman_iptables_iterate_chains_cb_t cb,
1110 int __connman_iptables_init(void);
1111 void __connman_iptables_cleanup(void);
1112 int __connman_iptables_commit(int type, const char *table_name);
1114 int __connman_dnsproxy_init(void);
1115 void __connman_dnsproxy_cleanup(void);
1116 int __connman_dnsproxy_add_listener(int index);
1117 void __connman_dnsproxy_remove_listener(int index);
1118 int __connman_dnsproxy_append(int index, const char *domain, const char *server);
1119 int __connman_dnsproxy_remove(int index, const char *domain, const char *server);
1120 int __connman_dnsproxy_set_mdns(int index, bool enabled);
1122 int __connman_6to4_probe(struct connman_service *service);
1123 void __connman_6to4_remove(struct connman_ipconfig *ipconfig);
1124 int __connman_6to4_check(struct connman_ipconfig *ipconfig);
1126 struct connman_ippool;
1128 typedef void (*ippool_collision_cb_t) (struct connman_ippool *pool,
1131 int __connman_ippool_init(void);
1132 void __connman_ippool_cleanup(void);
1134 void __connman_ippool_free(struct connman_ippool *pool);
1136 struct connman_ippool *__connman_ippool_create(int index,
1139 ippool_collision_cb_t collision_cb,
1142 const char *__connman_ippool_get_gateway(struct connman_ippool *pool);
1143 const char *__connman_ippool_get_broadcast(struct connman_ippool *pool);
1144 const char *__connman_ippool_get_subnet_mask(struct connman_ippool *pool);
1145 const char *__connman_ippool_get_start_ip(struct connman_ippool *pool);
1146 const char *__connman_ippool_get_end_ip(struct connman_ippool *pool);
1148 void __connman_ippool_newaddr(int index, const char *address,
1149 unsigned char prefixlen);
1150 void __connman_ippool_deladdr(int index, const char *address,
1151 unsigned char prefixlen);
1153 int __connman_bridge_create(const char *name);
1154 int __connman_bridge_remove(const char *name);
1155 int __connman_bridge_enable(const char *name, const char *ip_address,
1156 int prefix_len, const char *broadcast);
1157 int __connman_bridge_disable(const char *name);
1159 int __connman_nat_init(void);
1160 void __connman_nat_cleanup(void);
1162 int __connman_nat_enable(const char *name, const char *address,
1163 unsigned char prefixlen);
1164 void __connman_nat_disable(const char *name);
1166 struct firewall_context;
1168 struct firewall_context *__connman_firewall_create(void);
1169 void __connman_firewall_destroy(struct firewall_context *ctx);
1170 int __connman_firewall_enable_nat(struct firewall_context *ctx,
1171 char *address, unsigned char prefixlen,
1173 int __connman_firewall_disable_nat(struct firewall_context *ctx);
1174 int __connman_firewall_enable_snat(struct firewall_context *ctx,
1175 int index, const char *ifname,
1177 int __connman_firewall_disable_snat(struct firewall_context *ctx);
1178 int __connman_firewall_enable_marking(struct firewall_context *ctx,
1179 enum connman_session_id_type id_type,
1180 char *id, const char *src_ip,
1182 int __connman_firewall_disable_marking(struct firewall_context *ctx);
1184 int __connman_firewall_init(void);
1185 void __connman_firewall_cleanup(void);
1187 typedef int (* connman_nfacct_flush_cb_t) (unsigned int error, void *user_data);
1189 int __connman_nfacct_flush(connman_nfacct_flush_cb_t cb, void *user_data);
1191 struct nfacct_context;
1193 typedef void (* connman_nfacct_enable_cb_t) (unsigned int error,
1194 struct nfacct_context *ctx,
1196 typedef void (* connman_nfacct_disable_cb_t) (unsigned int error,
1197 struct nfacct_context *ctx,
1199 typedef void (* connman_nfacct_stats_cb_t) (struct nfacct_context *ctx,
1204 struct nfacct_context *__connman_nfacct_create_context(void);
1205 void __connman_nfacct_destroy_context(struct nfacct_context *ctx);
1207 int __connman_nfacct_add(struct nfacct_context *ctx, const char *name,
1208 connman_nfacct_stats_cb_t cb,
1210 int __connman_nfacct_enable(struct nfacct_context *ctx,
1211 connman_nfacct_enable_cb_t cb,
1213 int __connman_nfacct_disable(struct nfacct_context *ctx,
1214 connman_nfacct_disable_cb_t cb,
1217 void __connman_nfacct_cleanup(void);
1219 #include <connman/machine.h>
1221 int __connman_machine_init(void);
1222 void __connman_machine_cleanup(void);
1224 int __connman_util_get_random(uint64_t *val);
1225 unsigned int __connman_util_random_delay_ms(unsigned int secs);
1226 int __connman_util_init(void);
1227 void __connman_util_cleanup(void);
1230 __attribute__ ((unused)) static int __tizentvextension = -1;
1231 #define TIZEN_TV_EXT (__builtin_expect(__tizentvextension != -1, 1) ? \
1232 __tizentvextension : \
1233 (__tizentvextension = connman_setting_get_bool("TizenTVExtension")))
1234 #else /* TIZEN_EXT */
1235 #define TIZEN_TV_EXT (0) /* Always False */
1236 #endif /* TIZEN_EXT */