summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/connman.h4
-rw-r--r--src/dhcp.c1
-rw-r--r--src/ipconfig.c13
-rw-r--r--src/provider.c8
-rw-r--r--src/service.c22
5 files changed, 43 insertions, 5 deletions
diff --git a/src/connman.h b/src/connman.h
index 38b3251a..72e3bae1 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -134,7 +134,9 @@ void __connman_ipconfig_append_ipv4config(struct connman_ipconfig *ipconfig,
DBusMessageIter *iter);
int __connman_ipconfig_set_ipv4config(struct connman_ipconfig *ipconfig,
DBusMessageIter *value);
-int __connman_ipconfig_append_ethernet(struct connman_ipconfig *ipconfig,
+void __connman_ipconfig_append_proxy(struct connman_ipconfig *ipconfig,
+ DBusMessageIter *iter);
+void __connman_ipconfig_append_ethernet(struct connman_ipconfig *ipconfig,
DBusMessageIter *iter);
int __connman_ipconfig_load(struct connman_ipconfig *ipconfig,
diff --git a/src/dhcp.c b/src/dhcp.c
index 7a301f67..0e890c2d 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -122,6 +122,7 @@ void connman_dhcp_set_value(struct connman_dhcp *dhcp,
g_free(dhcp->element->ipv4.timeserver);
dhcp->element->ipv4.timeserver = g_strdup(value);
} else if (g_strcmp0(key, "MTU") == 0) {
+ } else if (g_strcmp0(key, "PAC") == 0) {
}
}
diff --git a/src/ipconfig.c b/src/ipconfig.c
index a731a9a7..07fa7703 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -1118,7 +1118,16 @@ int __connman_ipconfig_set_ipv4config(struct connman_ipconfig *ipconfig,
return 0;
}
-int __connman_ipconfig_append_ethernet(struct connman_ipconfig *ipconfig,
+void __connman_ipconfig_append_proxy(struct connman_ipconfig *ipconfig,
+ DBusMessageIter *iter)
+{
+ const char *method = "direct";
+
+ connman_dbus_dict_append_basic(iter, "Method",
+ DBUS_TYPE_STRING, &method);
+}
+
+void __connman_ipconfig_append_ethernet(struct connman_ipconfig *ipconfig,
DBusMessageIter *iter)
{
const char *method = "auto";
@@ -1133,8 +1142,6 @@ int __connman_ipconfig_append_ethernet(struct connman_ipconfig *ipconfig,
if (ipconfig->mtu > 0)
connman_dbus_dict_append_basic(iter, "MTU",
DBUS_TYPE_UINT16, &ipconfig->mtu);
-
- return 0;
}
int __connman_ipconfig_load(struct connman_ipconfig *ipconfig,
diff --git a/src/provider.c b/src/provider.c
index 7fb6701d..e33f02e1 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -43,6 +43,7 @@ struct connman_provider {
enum connman_provider_error error;
char *name;
char *type;
+ char *pac;
char *dns;
char *domain;
DBusMessage *pending;
@@ -538,6 +539,7 @@ static void provider_free(gpointer user_data)
g_free(provider->domain);
g_free(provider->identifier);
g_free(provider->dns);
+ g_free(provider->pac);
}
static void unregister_provider(gpointer data)
@@ -577,6 +579,7 @@ static void __connman_provider_initialize(struct connman_provider *provider)
provider->name = NULL;
provider->type = NULL;
+ provider->pac = NULL;
provider->dns = NULL;
provider->domain = NULL;
provider->identifier = NULL;
@@ -793,10 +796,13 @@ int connman_provider_set_string(struct connman_provider *provider,
} else if (g_str_equal(key, "Netmask") == TRUE) {
g_free(provider->element.ipv4.netmask);
provider->element.ipv4.netmask = g_strdup(value);
+ } else if (g_str_equal(key, "PAC") == TRUE) {
+ g_free(provider->pac);
+ provider->pac = g_strdup(value);
} else if (g_str_equal(key, "DNS") == TRUE) {
g_free(provider->dns);
provider->dns = g_strdup(value);
- } else if (g_str_equal(key, "Domain")) {
+ } else if (g_str_equal(key, "Domain") == TRUE) {
g_free(provider->domain);
provider->domain = g_strdup(value);
}
diff --git a/src/service.c b/src/service.c
index ddb9fcb5..2970ad07 100644
--- a/src/service.c
+++ b/src/service.c
@@ -440,6 +440,26 @@ static void append_ipv4config(DBusMessageIter *iter, void *user_data)
__connman_ipconfig_append_ipv4config(service->ipconfig, iter);
}
+static void append_proxy(DBusMessageIter *iter, void *user_data)
+{
+ struct connman_service *service = user_data;
+
+ switch (service->state) {
+ case CONNMAN_SERVICE_STATE_UNKNOWN:
+ case CONNMAN_SERVICE_STATE_IDLE:
+ case CONNMAN_SERVICE_STATE_FAILURE:
+ case CONNMAN_SERVICE_STATE_DISCONNECT:
+ case CONNMAN_SERVICE_STATE_ASSOCIATION:
+ case CONNMAN_SERVICE_STATE_CONFIGURATION:
+ return;
+ case CONNMAN_SERVICE_STATE_READY:
+ break;
+ }
+
+ if (service->ipconfig != NULL)
+ __connman_ipconfig_append_proxy(service->ipconfig, iter);
+}
+
static void settings_changed(struct connman_service *service)
{
connman_dbus_property_changed_dict(service->path,
@@ -597,6 +617,8 @@ static DBusMessage *get_properties(DBusConnection *conn,
connman_dbus_dict_append_dict(&dict, "IPv4.Configuration",
append_ipv4config, service);
+ connman_dbus_dict_append_dict(&dict, "Proxy", append_proxy, service);
+
connman_dbus_dict_close(&array, &dict);
return reply;