@@ -222,3 +222,33 @@ out:
return err;
}
+unsigned int vpn_util_resolve_hostname(GResolv *resolv,
+ const char *hostname, GResolvResultFunc func,
+ gpointer user_data)
+{
+ DBG("resolve %s", hostname);
+
+ return g_resolv_lookup_hostname(resolv, hostname, func, user_data);
+}
+
+bool vpn_util_cancel_resolve(GResolv *resolv, unsigned int id)
+{
+ DBG("");
+
+ return g_resolv_cancel_lookup(resolv, id);
+}
+
+GResolv *vpn_util_resolve_new(int index)
+{
+ return g_resolv_new(index);
+}
+
+void vpn_util_resolve_unref(GResolv *resolv)
+{
+ g_resolv_unref(resolv);
+}
+
+int vpn_util_get_resolve_error(GResolv *resolv)
+{
+ return g_resolv_get_error(resolv);
+}
@@ -134,3 +134,13 @@ bool vpn_settings_is_system_user(const char *user);
struct passwd *vpn_util_get_passwd(const char *username);
struct group *vpn_util_get_group(const char *groupname);
int vpn_util_create_path(const char *path, uid_t uid, gid_t grp, int mode);
+
+#include <gweb/gresolv.h>
+
+unsigned int vpn_util_resolve_hostname(GResolv *resolv,
+ const char *hostname, GResolvResultFunc func,
+ gpointer user_data);
+bool vpn_util_cancel_resolve(GResolv *resolv, unsigned int id);
+GResolv *vpn_util_resolve_new(int index);
+void vpn_util_resolve_unref(GResolv *resolv);
+int vpn_util_get_resolve_error(GResolv *resolv);