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);
66 DBusMessage *__connman_error_operation_canceled(DBusMessage *msg);
68 int __connman_manager_init(void);
69 void __connman_manager_cleanup(void);
72 TIME_UPDATES_UNKNOWN = 0,
73 TIME_UPDATES_MANUAL = 1,
74 TIME_UPDATES_AUTO = 2,
77 enum time_updates __connman_clock_timeupdates(void);
78 int __connman_clock_init(void);
79 void __connman_clock_cleanup(void);
81 void __connman_clock_update_timezone(void);
83 void __connman_clock_set_time_updated(bool updated);
86 int __connman_timezone_init(void);
87 void __connman_timezone_cleanup(void);
89 char *__connman_timezone_lookup(void);
90 int __connman_timezone_change(const char *zone);
92 int __connman_agent_init(void);
93 void __connman_agent_cleanup(void);
95 void __connman_counter_send_usage(const char *path,
96 DBusMessage *message);
97 int __connman_counter_register(const char *owner, const char *path,
98 unsigned int interval);
99 int __connman_counter_unregister(const char *owner, const char *path);
101 int __connman_counter_init(void);
102 void __connman_counter_cleanup(void);
104 #include <connman/agent.h>
106 struct connman_service;
109 void __connman_agent_cancel(struct connman_service *service);
111 typedef void (* authentication_cb_t) (struct connman_service *service,
112 bool values_received,
113 const char *name, int name_len,
114 const char *identifier, const char *secret,
115 bool wps, const char *wpspin,
116 const char *error, void *user_data);
117 typedef void (* browser_authentication_cb_t) (struct connman_service *service,
118 bool authentication_done,
119 const char *error, void *user_data);
120 typedef void (* peer_wps_cb_t) (struct connman_peer *peer, bool choice_done,
121 const char *wpspin, const char *error,
123 int __connman_agent_request_passphrase_input(struct connman_service *service,
124 authentication_cb_t callback,
125 const char *dbus_sender, void *user_data);
126 int __connman_agent_request_login_input(struct connman_service *service,
127 authentication_cb_t callback, void *user_data);
128 int __connman_agent_request_browser(struct connman_service *service,
129 browser_authentication_cb_t callback,
130 const char *url, void *user_data);
131 int __connman_agent_report_peer_error(struct connman_peer *peer,
132 const char *path, const char *error,
133 report_error_cb_t callback,
134 const char *dbus_sender,
136 int __connman_agent_request_peer_authorization(struct connman_peer *peer,
137 peer_wps_cb_t callback,
139 const char *dbus_sender,
142 #include <connman/log.h>
144 int __connman_log_init(const char *program, const char *debug,
145 gboolean detach, gboolean backtrace,
146 const char *program_name, const char *program_version);
147 void __connman_log_cleanup(gboolean backtrace);
148 void __connman_log_enable(struct connman_debug_desc *start,
149 struct connman_debug_desc *stop);
151 #include <connman/backtrace.h>
153 #include <connman/setting.h>
155 #include <connman/plugin.h>
157 int __connman_plugin_init(const char *pattern, const char *exclude);
158 void __connman_plugin_cleanup(void);
160 #include <connman/task.h>
162 int __connman_task_init(void);
163 void __connman_task_cleanup(void);
165 #include <connman/inet.h>
167 char **__connman_inet_get_running_interfaces(void);
168 int __connman_inet_modify_address(int cmd, int flags, int index, int family,
171 unsigned char prefixlen,
172 const char *broadcast,
174 int __connman_inet_get_interface_address(int index, int family, void *address);
175 int __connman_inet_get_interface_ll_address(int index, int family, void *address);
176 int __connman_inet_get_interface_mac_address(int index, uint8_t *mac_address);
178 bool __connman_inet_is_any_addr(const char *address, int family);
180 #include <netinet/ip6.h>
181 #include <netinet/icmp6.h>
183 typedef void (*__connman_inet_rs_cb_t) (struct nd_router_advert *reply,
184 unsigned int length, void *user_data);
186 int __connman_inet_ipv6_send_rs(int index, int timeout,
187 __connman_inet_rs_cb_t callback, void *user_data);
188 int __connman_inet_ipv6_send_ra(int index, struct in6_addr *src_addr,
189 GSList *prefixes, int router_lifetime);
190 #if defined TIZEN_EXT
191 void __connman_network_set_auto_ipv6_gateway(char *gateway, void *user_data);
194 typedef void (*__connman_inet_ns_cb_t) (struct nd_neighbor_advert *reply,
196 struct in6_addr *addr,
198 int __connman_inet_ipv6_do_dad(int index, int timeout_ms,
199 struct in6_addr *addr,
200 __connman_inet_ns_cb_t callback, void *user_data);
202 typedef void (*__connman_inet_recv_rs_cb_t) (struct nd_router_solicit *reply,
203 unsigned int length, void *user_data);
204 int __connman_inet_ipv6_start_recv_rs(int index,
205 __connman_inet_recv_rs_cb_t callback,
206 void *user_data, void **context);
207 void __connman_inet_ipv6_stop_recv_rs(void *context);
209 int __connman_network_refresh_rs_ipv6(struct connman_network *network, int index);
211 GSList *__connman_inet_ipv6_get_prefixes(struct nd_router_advert *hdr,
212 unsigned int length);
213 typedef void (*connman_inet_addr_cb_t) (const char *src_address, int index,
215 int __connman_inet_get_route(const char *dst_address,
216 connman_inet_addr_cb_t callback, void *user_data);
218 struct __connman_inet_rtnl_handle {
220 struct sockaddr_nl local;
221 struct sockaddr_nl peer;
232 struct ifaddrmsg ifa;
239 int __connman_inet_rtnl_open(struct __connman_inet_rtnl_handle *rth);
240 typedef void (*__connman_inet_rtnl_cb_t) (struct nlmsghdr *answer,
242 int __connman_inet_rtnl_talk(struct __connman_inet_rtnl_handle *rtnl,
243 struct nlmsghdr *n, int timeout,
244 __connman_inet_rtnl_cb_t callback, void *user_data);
246 int __connman_inet_rtnl_send(struct __connman_inet_rtnl_handle *rtnl,
249 return __connman_inet_rtnl_talk(rtnl, n, 0, NULL, NULL);
252 void __connman_inet_rtnl_close(struct __connman_inet_rtnl_handle *rth);
253 int __connman_inet_rtnl_addattr_l(struct nlmsghdr *n, size_t max_length,
254 int type, const void *data, size_t data_length);
255 int __connman_inet_rtnl_addattr32(struct nlmsghdr *n, size_t maxlen,
256 int type, __u32 data);
258 int __connman_inet_add_fwmark_rule(uint32_t table_id, int family, uint32_t fwmark);
259 int __connman_inet_del_fwmark_rule(uint32_t table_id, int family, uint32_t fwmark);
260 int __connman_inet_add_default_to_table(uint32_t table_id, int ifindex, const char *gateway);
261 int __connman_inet_add_subnet_to_table(uint32_t table_id, int ifindex,
262 const char *gateway, unsigned char prefixlen);
263 int __connman_inet_del_default_from_table(uint32_t table_id, int ifindex, const char *gateway);
264 int __connman_inet_del_subnet_from_table(uint32_t table_id, int ifindex,
265 const char *gateway, unsigned char prefixlen);
266 int __connman_inet_get_address_netmask(int ifindex,
267 struct sockaddr_in *address, struct sockaddr_in *netmask);
269 bool __connman_inet_isrootnfs_device(const char *devname);
270 char **__connman_inet_get_pnp_nameservers(const char *pnp_file);
272 #include <connman/resolver.h>
274 int __connman_resolver_init(gboolean dnsproxy);
275 void __connman_resolver_cleanup(void);
276 void __connman_resolver_append_fallback_nameservers(void);
277 int __connman_resolvfile_append(int index, const char *domain, const char *server);
278 int __connman_resolvfile_remove(int index, const char *domain, const char *server);
279 int __connman_resolver_redo_servers(int index);
280 int __connman_resolver_set_mdns(int index, bool enabled);
282 GKeyFile *__connman_storage_open_global(void);
283 GKeyFile *__connman_storage_load_global(void);
284 int __connman_storage_save_global(GKeyFile *keyfile);
285 void __connman_storage_delete_global(void);
286 #if defined TIZEN_EXT
287 GKeyFile *__connman_storage_load_ins(void);
288 int __connman_storage_save_ins(GKeyFile *keyfile);
291 GKeyFile *__connman_storage_load_config(const char *ident);
292 GKeyFile *__connman_storage_load_provider_config(const char *ident);
294 int __connman_storage_save_service(GKeyFile *keyfile, const char *ident);
295 GKeyFile *__connman_storage_load_provider(const char *identifier);
296 void __connman_storage_save_provider(GKeyFile *keyfile, const char *identifier);
297 bool __connman_storage_remove_provider(const char *identifier);
298 char **__connman_storage_get_providers(void);
299 bool __connman_storage_remove_service(const char *service_id);
301 int __connman_detect_init(void);
302 void __connman_detect_cleanup(void);
304 #include <connman/inotify.h>
306 int __connman_inotify_init(void);
307 void __connman_inotify_cleanup(void);
309 #include <connman/proxy.h>
311 int __connman_proxy_init(void);
312 void __connman_proxy_cleanup(void);
314 #include <connman/ipconfig.h>
316 struct connman_ipaddress {
318 unsigned char prefixlen;
323 bool is_p2p; /* P2P connection or VPN, broadcast is excluded. */
326 struct connman_ipconfig_ops {
327 void (*up) (struct connman_ipconfig *ipconfig, const char *ifname);
328 void (*down) (struct connman_ipconfig *ipconfig, const char *ifname);
329 void (*lower_up) (struct connman_ipconfig *ipconfig, const char *ifname);
330 void (*lower_down) (struct connman_ipconfig *ipconfig, const char *ifname);
331 void (*ip_bound) (struct connman_ipconfig *ipconfig, const char *ifname);
332 void (*ip_release) (struct connman_ipconfig *ipconfig, const char *ifname);
333 void (*route_set) (struct connman_ipconfig *ipconfig, const char *ifname);
334 void (*route_unset) (struct connman_ipconfig *ipconfig, const char *ifname);
337 struct connman_ipconfig *__connman_ipconfig_create(int index,
338 enum connman_ipconfig_type type);
340 #define __connman_ipconfig_ref(ipconfig) \
341 __connman_ipconfig_ref_debug(ipconfig, __FILE__, __LINE__, __func__)
342 #define __connman_ipconfig_unref(ipconfig) \
343 __connman_ipconfig_unref_debug(ipconfig, __FILE__, __LINE__, __func__)
345 struct connman_ipconfig *
346 __connman_ipconfig_ref_debug(struct connman_ipconfig *ipconfig,
347 const char *file, int line, const char *caller);
348 void __connman_ipconfig_unref_debug(struct connman_ipconfig *ipconfig,
349 const char *file, int line, const char *caller);
351 void *__connman_ipconfig_get_data(struct connman_ipconfig *ipconfig);
352 void __connman_ipconfig_set_data(struct connman_ipconfig *ipconfig, void *data);
354 int __connman_ipconfig_get_index(struct connman_ipconfig *ipconfig);
356 void __connman_ipconfig_set_ops(struct connman_ipconfig *ipconfig,
357 const struct connman_ipconfig_ops *ops);
358 int __connman_ipconfig_set_method(struct connman_ipconfig *ipconfig,
359 enum connman_ipconfig_method method);
360 void __connman_ipconfig_disable_ipv6(struct connman_ipconfig *ipconfig);
361 void __connman_ipconfig_enable_ipv6(struct connman_ipconfig *ipconfig);
363 int __connman_ipconfig_init(void);
364 void __connman_ipconfig_cleanup(void);
366 struct rtnl_link_stats;
368 void __connman_ipconfig_newlink(int index, unsigned short type,
369 unsigned int flags, const char *address,
371 struct rtnl_link_stats *stats);
372 void __connman_ipconfig_dellink(int index, struct rtnl_link_stats *stats);
373 int __connman_ipconfig_newaddr(int index, int family, const char *label,
374 unsigned char prefixlen, const char *address);
375 void __connman_ipconfig_deladdr(int index, int family, const char *label,
376 unsigned char prefixlen, const char *address);
377 void __connman_ipconfig_newroute(int index, int family, unsigned char scope,
378 const char *dst, const char *gateway);
379 void __connman_ipconfig_delroute(int index, int family, unsigned char scope,
380 const char *dst, const char *gateway);
382 void __connman_ipconfig_foreach(void (*function) (int index, void *user_data),
384 enum connman_ipconfig_type __connman_ipconfig_get_config_type(
385 struct connman_ipconfig *ipconfig);
386 unsigned short __connman_ipconfig_get_type_from_index(int index);
387 unsigned int __connman_ipconfig_get_flags_from_index(int index);
388 const char *__connman_ipconfig_get_gateway_from_index(int index,
389 enum connman_ipconfig_type type);
390 void __connman_ipconfig_set_index(struct connman_ipconfig *ipconfig, int index);
392 const char *__connman_ipconfig_get_local(struct connman_ipconfig *ipconfig);
393 void __connman_ipconfig_set_local(struct connman_ipconfig *ipconfig, const char *address);
394 const char *__connman_ipconfig_get_peer(struct connman_ipconfig *ipconfig);
395 void __connman_ipconfig_set_peer(struct connman_ipconfig *ipconfig, const char *address);
396 const char *__connman_ipconfig_get_broadcast(struct connman_ipconfig *ipconfig);
397 void __connman_ipconfig_set_broadcast(struct connman_ipconfig *ipconfig, const char *broadcast);
398 const char *__connman_ipconfig_get_gateway(struct connman_ipconfig *ipconfig);
399 void __connman_ipconfig_set_gateway(struct connman_ipconfig *ipconfig, const char *gateway);
401 #if defined TIZEN_EXT
402 void __connman_ipconfig_set_dhcp_lease_duration(struct connman_ipconfig *ipconfig, int dhcp_lease_duration);
403 void __connman_ipconfig_set_dhcp_vsie(struct connman_ipconfig *ipconfig, char *dhcp_vsie);
406 unsigned char __connman_ipconfig_get_prefixlen(struct connman_ipconfig *ipconfig);
407 void __connman_ipconfig_set_prefixlen(struct connman_ipconfig *ipconfig, unsigned char prefixlen);
409 int __connman_ipconfig_enable(struct connman_ipconfig *ipconfig);
410 int __connman_ipconfig_disable(struct connman_ipconfig *ipconfig);
411 bool __connman_ipconfig_is_usable(struct connman_ipconfig *ipconfig);
413 const char *__connman_ipconfig_method2string(enum connman_ipconfig_method method);
414 const char *__connman_ipconfig_type2string(enum connman_ipconfig_type type);
415 enum connman_ipconfig_method __connman_ipconfig_string2method(const char *method);
417 void __connman_ipconfig_append_ipv4(struct connman_ipconfig *ipconfig,
418 DBusMessageIter *iter);
419 void __connman_ipconfig_append_ipv4config(struct connman_ipconfig *ipconfig,
420 DBusMessageIter *iter);
421 void __connman_ipconfig_append_ipv6(struct connman_ipconfig *ipconfig,
422 DBusMessageIter *iter,
423 struct connman_ipconfig *ip4config);
424 void __connman_ipconfig_append_ipv6config(struct connman_ipconfig *ipconfig,
425 DBusMessageIter *iter);
426 int __connman_ipconfig_set_config(struct connman_ipconfig *ipconfig,
427 DBusMessageIter *array);
428 void __connman_ipconfig_append_ethernet(struct connman_ipconfig *ipconfig,
429 DBusMessageIter *iter);
430 enum connman_ipconfig_method __connman_ipconfig_get_method(
431 struct connman_ipconfig *ipconfig);
433 int __connman_ipconfig_address_add(struct connman_ipconfig *ipconfig);
434 int __connman_ipconfig_address_remove(struct connman_ipconfig *ipconfig);
435 int __connman_ipconfig_address_unset(struct connman_ipconfig *ipconfig);
436 #if defined TIZEN_EXT
438 * Description: __connman_service_lookup_from_index cannot find correct service
439 * e.g. same interface or same APN of cellular profile
441 int __connman_ipconfig_gateway_add(struct connman_ipconfig *ipconfig, struct connman_service *service);
443 int __connman_ipconfig_gateway_add(struct connman_ipconfig *ipconfig);
445 void __connman_ipconfig_gateway_remove(struct connman_ipconfig *ipconfig);
447 int __connman_ipconfig_set_proxy_autoconfig(struct connman_ipconfig *ipconfig,
449 const char *__connman_ipconfig_get_proxy_autoconfig(struct connman_ipconfig *ipconfig);
450 void __connman_ipconfig_set_dhcp_address(struct connman_ipconfig *ipconfig,
451 const char *address);
452 char *__connman_ipconfig_get_dhcp_address(struct connman_ipconfig *ipconfig);
453 void __connman_ipconfig_set_dhcpv6_prefixes(struct connman_ipconfig *ipconfig,
455 char **__connman_ipconfig_get_dhcpv6_prefixes(struct connman_ipconfig *ipconfig);
457 void __connman_ipconfig_load(struct connman_ipconfig *ipconfig,
458 GKeyFile *keyfile, const char *identifier, const char *prefix);
459 void __connman_ipconfig_save(struct connman_ipconfig *ipconfig,
460 GKeyFile *keyfile, const char *identifier, const char *prefix);
461 bool __connman_ipconfig_ipv6_privacy_enabled(struct connman_ipconfig *ipconfig);
462 int __connman_ipconfig_ipv6_reset_privacy(struct connman_ipconfig *ipconfig);
463 int __connman_ipconfig_ipv6_set_privacy(struct connman_ipconfig *ipconfig,
465 bool __connman_ipconfig_ipv6_is_enabled(struct connman_ipconfig *ipconfig);
467 int __connman_ipconfig_set_rp_filter();
468 void __connman_ipconfig_unset_rp_filter(int old_value);
470 #include <connman/utsname.h>
472 int __connman_utsname_set_hostname(const char *hostname);
473 int __connman_utsname_set_domainname(const char *domainname);
475 #include <connman/timeserver.h>
477 int __connman_timeserver_init(void);
478 void __connman_timeserver_cleanup(void);
480 char **__connman_timeserver_system_get();
482 GSList *__connman_timeserver_add_list(GSList *server_list,
483 const char *timeserver);
484 GSList *__connman_timeserver_get_all(struct connman_service *service);
485 void __connman_timeserver_sync(struct connman_service *service);
486 void __connman_timeserver_conf_update(struct connman_service *service);
488 bool __connman_timeserver_is_synced(void);
489 void __connman_timeserver_set_synced(bool status);
491 enum __connman_dhcpv6_status {
492 CONNMAN_DHCPV6_STATUS_FAIL = 0,
493 CONNMAN_DHCPV6_STATUS_SUCCEED = 1,
494 CONNMAN_DHCPV6_STATUS_RESTART = 2,
497 #if defined TIZEN_EXT
498 void set_dhcp_discover_timeout(int timeout_value);
499 void set_dhcp_discover_retry_count(int retry_count);
502 typedef void (* dhcpv6_cb) (struct connman_network *network,
503 enum __connman_dhcpv6_status status, gpointer data);
505 typedef void (* dhcp_cb) (struct connman_ipconfig *ipconfig,
506 struct connman_network *opt_network,
507 bool success, gpointer data);
508 char *__connman_dhcp_get_server_address(struct connman_ipconfig *ipconfig);
509 int __connman_dhcp_start(struct connman_ipconfig *ipconfig,
510 struct connman_network *network, dhcp_cb callback,
512 void __connman_dhcp_stop(struct connman_ipconfig *ipconfig);
513 void __connman_dhcp_decline(struct connman_ipconfig *ipconfig);
514 int __connman_dhcp_init(void);
515 void __connman_dhcp_cleanup(void);
516 int __connman_dhcpv6_init(void);
517 void __connman_dhcpv6_cleanup(void);
518 int __connman_dhcpv6_start_info(struct connman_network *network,
520 void __connman_dhcpv6_stop(struct connman_network *network);
521 int __connman_dhcpv6_start(struct connman_network *network,
522 GSList *prefixes, dhcpv6_cb callback);
523 int __connman_dhcpv6_start_renew(struct connman_network *network,
525 int __connman_dhcpv6_start_release(struct connman_network *network,
527 int __connman_dhcpv6_start_pd(int index, GSList *prefixes, dhcpv6_cb callback);
528 void __connman_dhcpv6_stop_pd(int index);
529 int __connman_dhcpv6_start_pd_renew(struct connman_network *network,
531 int __connman_dhcpv6_start_pd_release(struct connman_network *network,
534 int __connman_ipv4_init(void);
535 void __connman_ipv4_cleanup(void);
537 int __connman_connection_init(void);
538 void __connman_connection_cleanup(void);
540 int __connman_connection_gateway_add(struct connman_service *service,
542 enum connman_ipconfig_type type,
544 void __connman_connection_gateway_remove(struct connman_service *service,
545 enum connman_ipconfig_type type);
546 int __connman_connection_get_vpn_index(int phy_index);
547 int __connman_connection_get_vpn_phy_index(int vpn_index);
549 bool __connman_connection_update_gateway(void);
551 typedef void (*__connman_ntp_cb_t) (bool success, void *user_data);
552 int __connman_ntp_start(char *server, __connman_ntp_cb_t callback,
554 void __connman_ntp_stop();
556 int __connman_wpad_init(void);
557 void __connman_wpad_cleanup(void);
558 int __connman_wpad_start(struct connman_service *service);
559 void __connman_wpad_stop(struct connman_service *service);
561 int __connman_wispr_init(void);
562 void __connman_wispr_cleanup(void);
563 int __connman_wispr_start(struct connman_service *service,
564 enum connman_ipconfig_type type);
565 void __connman_wispr_stop(struct connman_service *service);
567 #include <connman/technology.h>
569 void __connman_technology_list_struct(DBusMessageIter *array);
571 int __connman_technology_add_device(struct connman_device *device);
572 int __connman_technology_remove_device(struct connman_device *device);
573 int __connman_technology_enabled(enum connman_service_type type);
574 int __connman_technology_disabled(enum connman_service_type type);
575 int __connman_technology_set_offlinemode(bool offlinemode);
576 bool __connman_technology_get_offlinemode(void);
577 void __connman_technology_set_connected(enum connman_service_type type,
580 int __connman_technology_add_rfkill(unsigned int index,
581 enum connman_service_type type,
584 int __connman_technology_update_rfkill(unsigned int index,
585 enum connman_service_type type,
588 int __connman_technology_remove_rfkill(unsigned int index,
589 enum connman_service_type type);
591 void __connman_technology_scan_started(struct connman_device *device);
592 void __connman_technology_scan_stopped(struct connman_device *device,
593 enum connman_service_type type);
594 void __connman_technology_add_interface(enum connman_service_type type,
595 int index, const char *ident);
596 void __connman_technology_remove_interface(enum connman_service_type type,
597 int index, const char *ident);
598 void __connman_technology_notify_regdom_by_device(struct connman_device *device,
599 int result, const char *alpha2);
601 #if defined TIZEN_EXT
602 void __connman_technology_notify_mac_policy_by_device(struct connman_device *device,
603 int result, unsigned int policy);
604 void __connman_technology_notify_preassoc_mac_policy_by_device(struct connman_device *device,
605 int result, unsigned int policy);
606 void __connman_technology_notify_random_mac_lifetime_by_device(struct connman_device *device,
607 int result, unsigned int lifetime);
616 int set_connman_bssid(enum bssid_type mode, char *bssid, const char *ifname);
617 void technology_save_device(struct connman_device *device);
620 #include <connman/device.h>
622 int __connman_device_init(const char *device, const char *nodevice);
623 void __connman_device_cleanup(void);
625 void __connman_device_list(DBusMessageIter *iter, void *user_data);
627 enum connman_service_type __connman_device_get_service_type(struct connman_device *device);
628 struct connman_device *__connman_device_find_device(enum connman_service_type type);
629 int __connman_device_request_scan(enum connman_service_type type);
630 int __connman_device_request_scan_full(enum connman_service_type type);
631 int __connman_device_request_hidden_scan(struct connman_device *device,
632 const char *ssid, unsigned int ssid_len,
633 const char *identity, const char *passphrase,
634 const char *security, void *user_data);
635 void __connman_device_stop_scan(enum connman_service_type type);
636 #if defined TIZEN_EXT
637 int __connman_device_request_specific_scan(enum connman_service_type type,
638 const char *ifname, int scan_type, GSList *specific_scan_list);
639 int connman_device_request_device_scan(enum connman_service_type type,
640 const char * ifname, bool force_full_scan);
643 bool __connman_device_isfiltered(const char *devname);
645 void __connman_device_set_network(struct connman_device *device,
646 struct connman_network *network);
647 void __connman_device_cleanup_networks(struct connman_device *device);
649 int __connman_device_enable(struct connman_device *device);
650 int __connman_device_disable(struct connman_device *device);
651 int __connman_device_disconnect(struct connman_device *device);
653 bool __connman_device_has_driver(struct connman_device *device);
655 const char *__connman_device_get_type(struct connman_device *device);
657 int __connman_rfkill_init(void);
658 void __connman_rfkill_cleanup(void);
659 int __connman_rfkill_block(enum connman_service_type type, bool block);
661 #if defined TIZEN_EXT
662 char *index2ident(int index, const char *prefix);
663 char *index2addr(int index);
664 char *_get_wifi_ident(void);
665 char *_get_wifi_addr(void);
668 #include <connman/network.h>
670 int __connman_network_init(void);
671 void __connman_network_cleanup(void);
673 void __connman_network_set_device(struct connman_network *network,
674 struct connman_device *device);
676 int __connman_network_connect(struct connman_network *network);
677 int __connman_network_disconnect(struct connman_network *network);
678 int __connman_network_clear_ipconfig(struct connman_network *network,
679 struct connman_ipconfig *ipconfig);
680 int __connman_network_enable_ipconfig(struct connman_network *network,
681 struct connman_ipconfig *ipconfig);
683 const char *__connman_network_get_type(struct connman_network *network);
684 const char *__connman_network_get_group(struct connman_network *network);
685 const char *__connman_network_get_ident(struct connman_network *network);
686 bool __connman_network_get_weakness(struct connman_network *network);
687 bool __connman_network_native_autoconnect(struct connman_network *network);
688 #if defined TIZEN_EXT
689 char *__connman_network_get_dhcp_status(const char *ifname);
690 dbus_bool_t __connman_network_notify_dhcp_changed(const char *key, const char *val);
691 bool connman_network_get_psk_sha256(struct connman_network *network);
692 void connman_network_set_psk_sha256(struct connman_network *network, bool is_psk_sha256);
695 int __connman_config_init();
696 void __connman_config_cleanup(void);
698 int __connman_config_load_service(GKeyFile *keyfile, const char *group,
700 int __connman_config_provision_service(struct connman_service *service);
701 int __connman_config_provision_service_ident(struct connman_service *service,
702 const char *ident, const char *file, const char *entry);
704 char *__connman_config_get_string(GKeyFile *key_file,
705 const char *group_name, const char *key, GError **error);
707 char **__connman_config_get_string_list(GKeyFile *key_file,
708 const char *group_name, const char *key, gsize *length, GError **error);
710 bool __connman_config_get_bool(GKeyFile *key_file,
711 const char *group_name, const char *key, GError **error);
712 bool __connman_config_address_provisioned(const char *address,
713 const char *netmask);
715 #include <connman/tethering.h>
717 int __connman_tethering_init(void);
718 void __connman_tethering_cleanup(void);
720 const char *__connman_tethering_get_bridge(void);
721 int __connman_tethering_set_enabled(void);
722 void __connman_tethering_set_disabled(void);
723 void __connman_tethering_list_clients(DBusMessageIter *array);
725 int __connman_private_network_request(DBusMessage *msg, const char *owner);
726 int __connman_private_network_release(const char *path);
728 int __connman_ipv6pd_setup(const char *bridge);
729 void __connman_ipv6pd_cleanup(void);
731 #include <connman/provider.h>
733 bool __connman_provider_check_routes(struct connman_provider *provider);
734 int __connman_provider_append_user_route(struct connman_provider *provider,
735 int family, const char *network, const char *netmask);
736 void __connman_provider_append_properties(struct connman_provider *provider, DBusMessageIter *iter);
737 void __connman_provider_list(DBusMessageIter *iter, void *user_data);
738 bool __connman_provider_is_immutable(struct connman_provider *provider);
739 int __connman_provider_create_and_connect(DBusMessage *msg);
740 const char * __connman_provider_get_ident(struct connman_provider *provider);
741 const char * __connman_provider_get_transport_ident(
742 struct connman_provider *provider);
743 int __connman_provider_indicate_state(struct connman_provider *provider,
744 enum connman_provider_state state);
745 int __connman_provider_indicate_error(struct connman_provider *provider,
746 enum connman_provider_error error);
747 int __connman_provider_connect(struct connman_provider *provider,
748 const char *dbus_sender);
749 int __connman_provider_remove_by_path(const char *path);
750 void __connman_provider_cleanup(void);
751 int __connman_provider_init(void);
753 #include <connman/service.h>
755 int __connman_service_init(void);
756 void __connman_service_cleanup(void);
757 int __connman_service_move(struct connman_service *service,
758 struct connman_service *target, bool before);
759 int __connman_service_load_modifiable(struct connman_service *service);
761 void __connman_service_list_struct(DBusMessageIter *iter);
762 #if defined TIZEN_EXT
763 void __connman_ins_list_struct(DBusMessageIter *iter);
765 int connman_service_get_ipv6_dns_method(struct connman_service *service);
766 enum connman_dnsconfig_method {
767 CONNMAN_DNSCONFIG_METHOD_UNKNOWN = 0,
768 CONNMAN_DNSCONFIG_METHOD_MANUAL = 1,
769 CONNMAN_DNSCONFIG_METHOD_DHCP = 2,
773 int __connman_service_compare(const struct connman_service *a,
774 const struct connman_service *b);
776 struct connman_service *__connman_service_lookup_from_index(int index);
777 struct connman_service *__connman_service_create_from_network(struct connman_network *network);
778 struct connman_service *__connman_service_create_from_provider(struct connman_provider *provider);
779 bool __connman_service_index_is_default(int index);
780 #if defined TIZEN_EXT
781 void __connman_service_notify_strength_changed(struct connman_network *network);
783 void __connman_service_update_from_network(struct connman_network *network);
784 void __connman_service_remove_from_network(struct connman_network *network);
785 void __connman_service_read_ip4config(struct connman_service *service);
786 void __connman_service_read_ip6config(struct connman_service *service);
788 struct connman_ipconfig *__connman_service_get_ip4config(
789 struct connman_service *service);
790 struct connman_ipconfig *__connman_service_get_ip6config(
791 struct connman_service *service);
792 struct connman_ipconfig *__connman_service_get_ipconfig(
793 struct connman_service *service, int family);
794 void __connman_service_notify_ipv4_configuration(
795 struct connman_service *service);
796 void __connman_service_wispr_start(struct connman_service *service,
797 enum connman_ipconfig_type type);
798 bool __connman_service_is_connected_state(struct connman_service *service,
799 enum connman_ipconfig_type type);
800 const char *__connman_service_get_path(struct connman_service *service);
801 const char *__connman_service_get_name(struct connman_service *service);
802 struct connman_network *__connman_service_get_network(struct connman_service *service);
803 enum connman_service_security __connman_service_get_security(struct connman_service *service);
804 const char *__connman_service_get_phase2(struct connman_service *service);
805 bool __connman_service_wps_enabled(struct connman_service *service);
806 #if defined TIZEN_EXT
807 void __connman_service_set_storage_reload(struct connman_service *service,
808 bool storage_reload);
810 int __connman_service_set_favorite(struct connman_service *service,
812 int __connman_service_set_favorite_delayed(struct connman_service *service,
814 bool delay_ordering);
815 int __connman_service_set_immutable(struct connman_service *service,
817 int __connman_service_set_ignore(struct connman_service *service,
819 void __connman_service_set_search_domains(struct connman_service *service,
821 int __connman_service_set_mdns(struct connman_service *service,
824 void __connman_service_set_string(struct connman_service *service,
825 const char *key, const char *value);
826 void __connman_service_online_check(struct connman_service *service,
827 enum connman_ipconfig_type type,
829 int __connman_service_ipconfig_indicate_state(struct connman_service *service,
830 enum connman_service_state new_state,
831 enum connman_ipconfig_type type);
832 enum connman_service_state __connman_service_ipconfig_get_state(
833 struct connman_service *service,
834 enum connman_ipconfig_type type);
836 #if defined TIZEN_EXT
837 void connman_check_proxy_setup_and_wispr_start(struct connman_service *service);
840 int __connman_service_indicate_error(struct connman_service *service,
841 enum connman_service_error error);
842 int __connman_service_clear_error(struct connman_service *service);
843 int __connman_service_indicate_default(struct connman_service *service);
845 int __connman_service_connect(struct connman_service *service,
846 enum connman_service_connect_reason reason);
847 int __connman_service_disconnect(struct connman_service *service);
848 void __connman_service_set_active_session(bool enable, GSList *list);
849 void __connman_service_auto_connect(enum connman_service_connect_reason reason);
851 #if defined TIZEN_EXT
852 bool __connman_service_get_auto_connect_mode(void);
853 void __connman_service_set_auto_connect_mode(bool enable);
856 #if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET
857 int __connman_service_get_use_eapol(struct connman_service *service);
858 int __connman_service_get_connect_reason(struct connman_service *service);
859 #endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */
861 bool __connman_service_remove(struct connman_service *service);
862 bool __connman_service_is_provider_pending(struct connman_service *service);
863 void __connman_service_set_provider_pending(struct connman_service *service,
865 void __connman_service_set_hidden_data(struct connman_service *service,
867 void __connman_service_return_error(struct connman_service *service,
868 int error, gpointer user_data);
870 int __connman_service_provision_changed(const char *ident);
871 void __connman_service_set_config(struct connman_service *service,
872 const char *file_id, const char *section);
874 const char *__connman_service_type2string(enum connman_service_type type);
875 enum connman_service_type __connman_service_string2type(const char *str);
876 enum connman_service_security __connman_service_string2security(const char *str);
878 #if defined TIZEN_EXT
879 int __connman_service_nameserver_append(struct connman_service *service,
880 const char *nameserver, bool is_auto,
881 enum connman_ipconfig_type type);
882 int __connman_service_nameserver_remove(struct connman_service *service,
883 const char *nameserver, bool is_auto,
884 enum connman_ipconfig_type type);
886 int __connman_service_nameserver_append(struct connman_service *service,
887 const char *nameserver, bool is_auto);
888 int __connman_service_nameserver_remove(struct connman_service *service,
889 const char *nameserver, bool is_auto);
891 void __connman_service_nameserver_clear(struct connman_service *service);
892 void __connman_service_nameserver_add_routes(struct connman_service *service,
894 void __connman_service_nameserver_del_routes(struct connman_service *service,
895 enum connman_ipconfig_type type);
896 void __connman_service_set_timeservers(struct connman_service *service,
898 int __connman_service_timeserver_append(struct connman_service *service,
899 const char *timeserver);
900 int __connman_service_timeserver_remove(struct connman_service *service,
901 const char *timeserver);
902 void __connman_service_timeserver_changed(struct connman_service *service,
904 void __connman_service_set_pac(struct connman_service *service,
906 #if defined TIZEN_EXT
908 * Returns profile count if there is any connected profiles
909 * that use same interface
911 int __connman_service_get_connected_count_of_iface(struct connman_service *service);
912 void __connman_service_set_proxy(struct connman_service *service,
913 const char *proxies);
914 int check_passphrase_ext(struct connman_network *network,
915 const char *passphrase);
917 bool __connman_service_is_hidden(struct connman_service *service);
918 bool __connman_service_is_split_routing(struct connman_service *service);
919 bool __connman_service_index_is_split_routing(int index);
920 void __connman_service_set_split_routing(struct connman_service *service,
922 void __connman_service_split_routing_changed(struct connman_service *service);
923 int __connman_service_get_index(struct connman_service *service);
924 void __connman_service_set_hidden(struct connman_service *service);
925 void __connman_service_set_hostname(struct connman_service *service,
926 const char *hostname);
927 const char *__connman_service_get_hostname(struct connman_service *service);
928 void __connman_service_set_domainname(struct connman_service *service,
929 const char *domainname);
930 const char *__connman_service_get_nameserver(struct connman_service *service);
931 void __connman_service_set_proxy_autoconfig(struct connman_service *service,
934 void __connman_service_set_identity(struct connman_service *service,
935 const char *identity);
936 void __connman_service_set_anonymous_identity(struct connman_service *service,
937 const char *anonymous_identity);
938 void __connman_service_set_subject_match(struct connman_service *service,
939 const char *subject_match);
940 void __connman_service_set_altsubject_match(struct connman_service *service,
941 const char *altsubject_match);
942 void __connman_service_set_domain_suffix_match(struct connman_service *service,
943 const char *domain_suffix_match);
944 void __connman_service_set_domain_match(struct connman_service *service,
945 const char *domain_match);
946 void __connman_service_set_agent_identity(struct connman_service *service,
947 const char *agent_identity);
948 int __connman_service_set_passphrase(struct connman_service *service,
949 const char *passphrase);
950 const char *__connman_service_get_passphrase(struct connman_service *service);
951 int __connman_service_check_passphrase(enum connman_service_security security,
952 const char *passphrase);
953 int __connman_service_reset_ipconfig(struct connman_service *service,
954 enum connman_ipconfig_type type, DBusMessageIter *array,
955 enum connman_service_state *new_state);
957 void __connman_service_notify(struct connman_service *service,
958 unsigned int rx_packets, unsigned int tx_packets,
959 unsigned int rx_bytes, unsigned int tx_bytes,
960 unsigned int rx_error, unsigned int tx_error,
961 unsigned int rx_dropped, unsigned int tx_dropped);
963 int __connman_service_counter_register(const char *counter);
964 void __connman_service_counter_unregister(const char *counter);
966 #include <connman/peer.h>
968 int __connman_peer_init(void);
969 void __connman_peer_cleanup(void);
971 void __connman_peer_list_struct(DBusMessageIter *array);
972 const char *__connman_peer_get_path(struct connman_peer *peer);
973 void __connman_peer_disconnect_all(void);
975 int __connman_peer_service_init(void);
976 void __connman_peer_service_cleanup(void);
978 void __connman_peer_service_set_driver(struct connman_peer_driver *driver);
979 int __connman_peer_service_register(const char *owner, DBusMessage *msg,
980 const unsigned char *specification,
981 int specification_length,
982 const unsigned char *query,
983 int query_length, int version,
985 int __connman_peer_service_unregister(const char *owner,
986 const unsigned char *specification,
987 int specification_length,
988 const unsigned char *query,
989 int query_length, int version);
991 #if defined TIZEN_EXT_WIFI_MESH
992 #include <connman/mesh.h>
994 int __connman_mesh_init(void);
995 void __connman_mesh_cleanup(void);
996 bool __connman_technology_get_connected(enum connman_service_type type);
997 void __connman_technology_mesh_interface_create_finished(
998 enum connman_service_type type, bool success,
1000 void __connman_technology_mesh_interface_remove_finished(
1001 enum connman_service_type type, bool success);
1002 void __connman_mesh_peer_list_struct(DBusMessageIter *array);
1003 void __connman_mesh_connected_peer_list_struct(DBusMessageIter *array);
1004 void __connman_mesh_disconnected_peer_list_struct(DBusMessageIter *array);
1005 int __connman_mesh_dhcp_start(struct connman_ipconfig *ipconfig,
1006 dhcp_cb callback, gpointer user_data);
1007 int __connman_device_abort_scan(enum connman_service_type type);
1008 void __connman_technology_notify_abort_scan(enum connman_service_type type,
1010 int __connman_device_request_mesh_specific_scan(enum connman_service_type type,
1011 const char *name, unsigned int freq);
1012 void __connman_mesh_auto_connect(void);
1013 #endif /* TIZEN_EXT_WIFI_MESH */
1015 #include <connman/session.h>
1017 void __connman_service_mark_dirty();
1018 void __connman_service_save(struct connman_service *service);
1020 #include <connman/notifier.h>
1022 int __connman_technology_init(void);
1023 void __connman_technology_cleanup(void);
1025 int __connman_notifier_init(void);
1026 void __connman_notifier_cleanup(void);
1028 void __connman_notifier_service_add(struct connman_service *service,
1030 void __connman_notifier_service_remove(struct connman_service *service);
1031 void __connman_notifier_enter_online(enum connman_service_type type);
1032 void __connman_notifier_leave_online(enum connman_service_type type);
1033 void __connman_notifier_connect(enum connman_service_type type);
1034 void __connman_notifier_disconnect(enum connman_service_type type);
1035 void __connman_notifier_offlinemode(bool enabled);
1036 void __connman_notifier_default_changed(struct connman_service *service);
1037 void __connman_notifier_proxy_changed(struct connman_service *service);
1038 void __connman_notifier_service_state_changed(struct connman_service *service,
1039 enum connman_service_state state);
1040 void __connman_notifier_ipconfig_changed(struct connman_service *service,
1041 struct connman_ipconfig *ipconfig);
1043 bool __connman_notifier_is_connected(void);
1044 const char *__connman_notifier_get_state(void);
1046 #include <connman/rtnl.h>
1048 #if defined TIZEN_EXT
1049 int __connman_rtnl_init(int retry_count);
1051 int __connman_rtnl_init(void);
1053 void __connman_rtnl_start(void);
1054 void __connman_rtnl_cleanup(void);
1056 #if defined TIZEN_EXT
1057 void __connman_wifi_vsie_list_struct(DBusMessageIter *iter);
1060 enum connman_device_type __connman_rtnl_get_device_type(int index);
1061 unsigned int __connman_rtnl_update_interval_add(unsigned int interval);
1062 unsigned int __connman_rtnl_update_interval_remove(unsigned int interval);
1063 int __connman_rtnl_request_update(void);
1064 int __connman_rtnl_send(const void *buf, size_t len);
1066 #if defined TIZEN_EXT
1067 void rtnl_nameserver_add_all(struct connman_service *service,
1068 enum connman_ipconfig_type type);
1071 bool __connman_session_policy_autoconnect(enum connman_service_connect_reason reason);
1073 int __connman_session_create(DBusMessage *msg);
1074 int __connman_session_destroy(DBusMessage *msg);
1076 int __connman_session_init(void);
1077 void __connman_session_cleanup(void);
1079 struct connman_stats_data {
1080 unsigned int rx_packets;
1081 unsigned int tx_packets;
1082 unsigned int rx_bytes;
1083 unsigned int tx_bytes;
1084 unsigned int rx_errors;
1085 unsigned int tx_errors;
1086 unsigned int rx_dropped;
1087 unsigned int tx_dropped;
1091 int __connman_stats_init(void);
1092 void __connman_stats_cleanup(void);
1093 int __connman_stats_service_register(struct connman_service *service);
1094 void __connman_stats_service_unregister(struct connman_service *service);
1095 int __connman_stats_update(struct connman_service *service,
1097 struct connman_stats_data *data);
1098 int __connman_stats_get(struct connman_service *service,
1100 struct connman_stats_data *data);
1102 int __connman_iptables_dump(int type,
1103 const char *table_name);
1104 int __connman_iptables_new_chain(int type,
1105 const char *table_name,
1107 int __connman_iptables_delete_chain(int type,
1108 const char *table_name,
1110 int __connman_iptables_flush_chain(int type,
1111 const char *table_name,
1113 int __connman_iptables_find_chain(int type,
1114 const char *table_name,
1116 int __connman_iptables_change_policy(int type,
1117 const char *table_name,
1119 const char *policy);
1120 int __connman_iptables_append(int type,
1121 const char *table_name,
1123 const char *rule_spec);
1124 int __connman_iptables_insert(int type,
1125 const char *table_name,
1127 const char *rule_spec);
1128 int __connman_iptables_delete(int type,
1129 const char *table_name,
1131 const char *rule_spec);
1133 typedef void (*connman_iptables_iterate_chains_cb_t) (const char *chain_name,
1135 int __connman_iptables_iterate_chains(int type,
1136 const char *table_name,
1137 connman_iptables_iterate_chains_cb_t cb,
1140 int __connman_iptables_init(void);
1141 void __connman_iptables_cleanup(void);
1142 int __connman_iptables_commit(int type, const char *table_name);
1144 int __connman_dnsproxy_init(void);
1145 void __connman_dnsproxy_cleanup(void);
1146 int __connman_dnsproxy_add_listener(int index);
1147 void __connman_dnsproxy_remove_listener(int index);
1148 int __connman_dnsproxy_append(int index, const char *domain, const char *server);
1149 int __connman_dnsproxy_remove(int index, const char *domain, const char *server);
1150 int __connman_dnsproxy_set_mdns(int index, bool enabled);
1152 int __connman_6to4_probe(struct connman_service *service);
1153 void __connman_6to4_remove(struct connman_ipconfig *ipconfig);
1154 int __connman_6to4_check(struct connman_ipconfig *ipconfig);
1156 struct connman_ippool;
1158 typedef void (*ippool_collision_cb_t) (struct connman_ippool *pool,
1161 int __connman_ippool_init(void);
1162 void __connman_ippool_cleanup(void);
1164 void __connman_ippool_free(struct connman_ippool *pool);
1166 struct connman_ippool *__connman_ippool_create(int index,
1169 ippool_collision_cb_t collision_cb,
1172 const char *__connman_ippool_get_gateway(struct connman_ippool *pool);
1173 const char *__connman_ippool_get_broadcast(struct connman_ippool *pool);
1174 const char *__connman_ippool_get_subnet_mask(struct connman_ippool *pool);
1175 const char *__connman_ippool_get_start_ip(struct connman_ippool *pool);
1176 const char *__connman_ippool_get_end_ip(struct connman_ippool *pool);
1178 void __connman_ippool_newaddr(int index, const char *address,
1179 unsigned char prefixlen);
1180 void __connman_ippool_deladdr(int index, const char *address,
1181 unsigned char prefixlen);
1183 int __connman_bridge_create(const char *name);
1184 int __connman_bridge_remove(const char *name);
1185 int __connman_bridge_enable(const char *name, const char *ip_address,
1186 int prefix_len, const char *broadcast);
1187 int __connman_bridge_disable(const char *name);
1189 int __connman_nat_init(void);
1190 void __connman_nat_cleanup(void);
1192 int __connman_nat_enable(const char *name, const char *address,
1193 unsigned char prefixlen);
1194 void __connman_nat_disable(const char *name);
1196 struct firewall_context;
1198 struct firewall_context *__connman_firewall_create(void);
1199 void __connman_firewall_destroy(struct firewall_context *ctx);
1200 int __connman_firewall_enable_nat(struct firewall_context *ctx,
1201 char *address, unsigned char prefixlen,
1203 int __connman_firewall_disable_nat(struct firewall_context *ctx);
1204 int __connman_firewall_enable_snat(struct firewall_context *ctx,
1205 int index, const char *ifname,
1207 int __connman_firewall_disable_snat(struct firewall_context *ctx);
1208 int __connman_firewall_enable_marking(struct firewall_context *ctx,
1209 enum connman_session_id_type id_type,
1210 char *id, const char *src_ip,
1212 int __connman_firewall_disable_marking(struct firewall_context *ctx);
1214 int __connman_firewall_init(void);
1215 void __connman_firewall_cleanup(void);
1217 typedef int (* connman_nfacct_flush_cb_t) (unsigned int error, void *user_data);
1219 int __connman_nfacct_flush(connman_nfacct_flush_cb_t cb, void *user_data);
1221 struct nfacct_context;
1223 typedef void (* connman_nfacct_enable_cb_t) (unsigned int error,
1224 struct nfacct_context *ctx,
1226 typedef void (* connman_nfacct_disable_cb_t) (unsigned int error,
1227 struct nfacct_context *ctx,
1229 typedef void (* connman_nfacct_stats_cb_t) (struct nfacct_context *ctx,
1234 struct nfacct_context *__connman_nfacct_create_context(void);
1235 void __connman_nfacct_destroy_context(struct nfacct_context *ctx);
1237 int __connman_nfacct_add(struct nfacct_context *ctx, const char *name,
1238 connman_nfacct_stats_cb_t cb,
1240 int __connman_nfacct_enable(struct nfacct_context *ctx,
1241 connman_nfacct_enable_cb_t cb,
1243 int __connman_nfacct_disable(struct nfacct_context *ctx,
1244 connman_nfacct_disable_cb_t cb,
1247 void __connman_nfacct_cleanup(void);
1249 #include <connman/machine.h>
1251 int __connman_machine_init(void);
1252 void __connman_machine_cleanup(void);
1254 int __connman_util_get_random(uint64_t *val);
1255 unsigned int __connman_util_random_delay_ms(unsigned int secs);
1256 int __connman_util_init(void);
1257 void __connman_util_cleanup(void);
1260 __attribute__ ((unused)) static int __tizentvextension = -1;
1261 #define TIZEN_TV_EXT (__builtin_expect(__tizentvextension != -1, 1) ? \
1262 __tizentvextension : \
1263 (__tizentvextension = connman_setting_get_bool("TizenTVExtension")))
1264 #else /* TIZEN_EXT */
1265 #define TIZEN_TV_EXT (0) /* Always False */
1266 #endif /* TIZEN_EXT */