the actual system configuration while this allows
user configuration.
+ dict Proxy [readonly]
+
+ string Method [readonly]
+
+ Possible values are "direct", "auto",
+ "manual" and "auto-config".
+
+ If the DHCP server provides an automatic
+ configuration URL, then this value is set
+ to "auto-config". The PAC file will be
+ referenced by the URL value.
+
+ If no automatic configuration is available,
+ then "direct" is set.
+
+ The values "auto" and "manual" are not yet
+ supported.
+
+ string URL [readonly]
+
+ Automatic proxy configuration URL.
+
dict Ethernet [readonly]
string Method [readonly]
connman_dhcp_set_value(dhcp, "Timeserver", value);
} else if (g_ascii_strcasecmp(key, "new_interface_mtu") == 0) {
connman_dhcp_set_value(dhcp, "MTU", value);
+ } else if (g_ascii_strcasecmp(key, "new_proxy_auto_config") == 0) {
+ connman_dhcp_set_value(dhcp, "PAC", value);
}
dbus_message_iter_next(&dict);
if (!strcmp(key, "INTERNAL_IP4_DNS"))
connman_provider_set_string(provider, "DNS", value);
+ if (!strcmp(key, "CISCO_PROXY_PAC"))
+ connman_provider_set_string(provider, "PAC", value);
+
if (domain == NULL && !strcmp(key, "CISCO_DEF_DOMAIN"))
domain = value;
send host-name "<hostname>";
+option proxy-auto-config code 252 = text;
request subnet-mask, broadcast-address, routers, host-name,
domain-search, domain-name, domain-name-servers,
- time-offset, time-servers, ntp-servers, interface-mtu;
+ time-offset, time-servers, ntp-servers, interface-mtu,
+ proxy-auto-config;
require subnet-mask, domain-name-servers;
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,
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) {
}
}
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";
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,
enum connman_provider_error error;
char *name;
char *type;
+ char *pac;
char *dns;
char *domain;
DBusMessage *pending;
g_free(provider->domain);
g_free(provider->identifier);
g_free(provider->dns);
+ g_free(provider->pac);
}
static void unregister_provider(gpointer data)
provider->name = NULL;
provider->type = NULL;
+ provider->pac = NULL;
provider->dns = NULL;
provider->domain = NULL;
provider->identifier = NULL;
} 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);
}
__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,
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;