summaryrefslogtreecommitdiff
path: root/src/connman.h
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-11-21 16:25:11 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-11-22 13:23:56 +0200
commit99e49dd2add20aecafe79b24effb4b87353449f9 (patch)
tree921fa679315338259ce489bb03c96ccd172aa476 /src/connman.h
parent86f21518b2ad016df155610524d9fc3f72018861 (diff)
downloadconnman-99e49dd2add20aecafe79b24effb4b87353449f9.tar.gz
connman-99e49dd2add20aecafe79b24effb4b87353449f9.tar.bz2
connman-99e49dd2add20aecafe79b24effb4b87353449f9.zip
core: Use interface index instead of interface name
Service and network code use only interface indexes. Convert the rest of the code using interface names to use interface indexes instead. The files affected are: include/resolver.h src/connman.h src/dnsproxy.c src/resolver.c src/rtnl.c src/service.c src/tethering.c As the network and service code used interface indexes, the interface name had to be looked up via a SIOCGIFNAME ioctl when needed. If a service was removed due to the interface and network being taken down, the lookup wouldn't work. This caused DNS servers to be left behind with broken sockets since removing the DNS servers was done using the interface name.
Diffstat (limited to 'src/connman.h')
-rw-r--r--src/connman.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/connman.h b/src/connman.h
index 2472dab0..613d1dc9 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -204,9 +204,9 @@ int __connman_inet_rtnl_addattr32(struct nlmsghdr *n, size_t maxlen,
int __connman_resolver_init(connman_bool_t dnsproxy);
void __connman_resolver_cleanup(void);
-int __connman_resolvfile_append(const char *interface, const char *domain, const char *server);
-int __connman_resolvfile_remove(const char *interface, const char *domain, const char *server);
-int __connman_resolver_redo_servers(const char *interface);
+int __connman_resolvfile_append(int index, const char *domain, const char *server);
+int __connman_resolvfile_remove(int index, const char *domain, const char *server);
+int __connman_resolver_redo_servers(int index);
void __connman_storage_migrate(void);
GKeyFile *__connman_storage_open_global(void);
@@ -790,10 +790,10 @@ int __connman_iptables_commit(const char *table_name);
int __connman_dnsproxy_init(void);
void __connman_dnsproxy_cleanup(void);
-int __connman_dnsproxy_add_listener(const char *interface);
-void __connman_dnsproxy_remove_listener(const char *interface);
-int __connman_dnsproxy_append(const char *interface, const char *domain, const char *server);
-int __connman_dnsproxy_remove(const char *interface, const char *domain, const char *server);
+int __connman_dnsproxy_add_listener(int index);
+void __connman_dnsproxy_remove_listener(int index);
+int __connman_dnsproxy_append(int index, const char *domain, const char *server);
+int __connman_dnsproxy_remove(int index, const char *domain, const char *server);
void __connman_dnsproxy_flush(void);
int __connman_6to4_probe(struct connman_service *service);