summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNishant Chaprana <n.chaprana@samsung.com>2019-07-04 17:41:09 +0530
committerNishant Chaprana <n.chaprana@samsung.com>2019-07-04 17:41:17 +0530
commit6b2381a2adabea7d8309ff158ef675ff88184305 (patch)
tree2c9b2bb6d8b214acc18b8e784e6841f468a5a040 /include
parent9362752a471a5c892d679548fbf2828d5fc5684b (diff)
downloadconnman-6b2381a2adabea7d8309ff158ef675ff88184305.tar.gz
connman-6b2381a2adabea7d8309ff158ef675ff88184305.tar.bz2
connman-6b2381a2adabea7d8309ff158ef675ff88184305.zip
Imported Upstream version 1.37upstream/1.37
Change-Id: Ib5957e7ee3a9315ee86a331189bc3e9e71751ee8 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/acd.h65
-rw-r--r--include/dbus.h2
-rw-r--r--include/device.h23
-rw-r--r--include/inet.h1
-rw-r--r--include/network.h7
-rw-r--r--include/notifier.h4
-rw-r--r--include/service.h10
-rw-r--r--include/session.h1
-rw-r--r--include/technology.h2
-rw-r--r--include/tethering.h37
-rw-r--r--include/vpn-dbus.h1
11 files changed, 143 insertions, 10 deletions
diff --git a/include/acd.h b/include/acd.h
new file mode 100644
index 00000000..0d777963
--- /dev/null
+++ b/include/acd.h
@@ -0,0 +1,65 @@
+/*
+ *
+ * Connection Manager
+ *
+ * Copyright (C) 2018 Commend International. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+/*
+ * Address Conflict Detection (RFC 5227)
+ *
+ * based on DHCP client library with GLib integration,
+ * Copyright (C) 2009-2014 Intel Corporation. All rights reserved.
+ *
+ */
+
+#ifndef __CONNMAN_ACD_H
+#define __CONNMAN_ACD_H
+
+#include <stdint.h>
+#include <glib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct acd_host;
+
+struct acd_host *acd_host_new(int ifindex, const char* path);
+void acd_host_free(struct acd_host *acd);
+int acd_host_start(struct acd_host *acd, uint32_t ip);
+void acd_host_stop(struct acd_host *acd);
+
+typedef void (*acd_host_cb_t) (struct acd_host *acd, gpointer user_data);
+
+enum acd_host_event {
+ ACD_HOST_EVENT_IPV4_AVAILABLE,
+ ACD_HOST_EVENT_IPV4_LOST,
+ ACD_HOST_EVENT_IPV4_CONFLICT,
+ ACD_HOST_EVENT_IPV4_MAXCONFLICT,
+};
+
+void acd_host_register_event(struct acd_host *acd,
+ enum acd_host_event event,
+ acd_host_cb_t func,
+ gpointer user_data);
+
+void acd_host_append_dbus_property(struct acd_host *acd, DBusMessageIter *dict);
+
+unsigned int acd_host_get_conflicts_count(struct acd_host *acd);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONNMAN_ACD_H */
diff --git a/include/dbus.h b/include/dbus.h
index 26f94d63..bcab4189 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -31,7 +31,6 @@ extern "C" {
#define CONNMAN_SERVICE "net.connman"
#define CONNMAN_PATH "/net/connman"
-#define CONNMAN_DEBUG_INTERFACE CONNMAN_SERVICE ".Debug"
#define CONNMAN_ERROR_INTERFACE CONNMAN_SERVICE ".Error"
#define CONNMAN_AGENT_INTERFACE CONNMAN_SERVICE ".Agent"
#define CONNMAN_COUNTER_INTERFACE CONNMAN_SERVICE ".Counter"
@@ -42,7 +41,6 @@ extern "C" {
#define CONNMAN_CLOCK_INTERFACE CONNMAN_SERVICE ".Clock"
#define CONNMAN_TASK_INTERFACE CONNMAN_SERVICE ".Task"
#define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE ".Service"
-#define CONNMAN_PROVIDER_INTERFACE CONNMAN_SERVICE ".Provider"
#define CONNMAN_TECHNOLOGY_INTERFACE CONNMAN_SERVICE ".Technology"
#define CONNMAN_SESSION_INTERFACE CONNMAN_SERVICE ".Session"
#define CONNMAN_NOTIFICATION_INTERFACE CONNMAN_SERVICE ".Notification"
diff --git a/include/device.h b/include/device.h
index 9ac800a2..0fc06bd0 100644
--- a/include/device.h
+++ b/include/device.h
@@ -50,6 +50,17 @@ enum connman_device_type {
#define CONNMAN_DEVICE_PRIORITY_DEFAULT 0
#define CONNMAN_DEVICE_PRIORITY_HIGH 100
+struct connman_device_scan_params {
+ enum connman_service_type type;
+ const char *ssid;
+ unsigned int ssid_len;
+ const char *identity;
+ const char* passphrase;
+ const char *security;
+ bool force_full_scan;
+ void *user_data;
+};
+
struct connman_device;
struct connman_device *connman_device_create(const char *node,
@@ -82,7 +93,8 @@ int connman_device_set_powered(struct connman_device *device,
bool connman_device_get_powered(struct connman_device *device);
int connman_device_set_scanning(struct connman_device *device,
enum connman_service_type type, bool scanning);
-bool connman_device_get_scanning(struct connman_device *device);
+bool connman_device_get_scanning(struct connman_device *device,
+ enum connman_service_type type);
void connman_device_reset_scanning(struct connman_device *device);
int connman_device_set_string(struct connman_device *device,
@@ -119,11 +131,10 @@ struct connman_device_driver {
void (*remove) (struct connman_device *device);
int (*enable) (struct connman_device *device);
int (*disable) (struct connman_device *device);
- int (*scan)(enum connman_service_type type,
- struct connman_device *device,
- const char *ssid, unsigned int ssid_len,
- const char *identity, const char* passphrase,
- const char *security, void *user_data);
+ int (*scan)(struct connman_device *device,
+ struct connman_device_scan_params *params);
+ void (*stop_scan) (enum connman_service_type type,
+ struct connman_device *device);
int (*set_regdom) (struct connman_device *device,
const char *alpha2);
};
diff --git a/include/inet.h b/include/inet.h
index 6482934a..9c1918f3 100644
--- a/include/inet.h
+++ b/include/inet.h
@@ -38,6 +38,7 @@ char *connman_inet_ifname(int index);
int connman_inet_ifup(int index);
int connman_inet_ifdown(int index);
+bool connman_inet_is_ifup(int index);
int connman_inet_set_address(int index, struct connman_ipaddress *ipaddress);
int connman_inet_clear_address(int index, struct connman_ipaddress *ipaddress);
diff --git a/include/network.h b/include/network.h
index 4fc20c1c..8f87d7c5 100644
--- a/include/network.h
+++ b/include/network.h
@@ -25,6 +25,8 @@
#include <stdbool.h>
#include <stdint.h>
+#include <dbus/dbus.h>
+
#include <connman/device.h>
#include <connman/ipconfig.h>
@@ -100,6 +102,8 @@ void connman_network_set_error(struct connman_network *network,
int connman_network_set_connected(struct connman_network *network,
bool connected);
bool connman_network_get_connected(struct connman_network *network);
+void connman_network_set_connected_dhcp_later(struct connman_network *network,
+ uint32_t sec);
bool connman_network_get_associating(struct connman_network *network);
@@ -162,6 +166,9 @@ struct connman_network_driver {
int connman_network_driver_register(struct connman_network_driver *driver);
void connman_network_driver_unregister(struct connman_network_driver *driver);
+void connman_network_append_acddbus(DBusMessageIter *dict,
+ struct connman_network *network);
+
#ifdef __cplusplus
}
#endif
diff --git a/include/notifier.h b/include/notifier.h
index 50b5fb4c..9c0909c7 100644
--- a/include/notifier.h
+++ b/include/notifier.h
@@ -57,8 +57,8 @@ struct connman_notifier {
void (*idle_state) (bool idle);
};
-int connman_notifier_register(struct connman_notifier *notifier);
-void connman_notifier_unregister(struct connman_notifier *notifier);
+int connman_notifier_register(const struct connman_notifier *notifier);
+void connman_notifier_unregister(const struct connman_notifier *notifier);
#ifdef __cplusplus
}
diff --git a/include/service.h b/include/service.h
index 958e7fd1..97fdf7d5 100644
--- a/include/service.h
+++ b/include/service.h
@@ -114,9 +114,12 @@ void connman_service_unref_debug(struct connman_service *service,
const char *file, int line, const char *caller);
enum connman_service_type connman_service_get_type(struct connman_service *service);
+enum connman_service_state connman_service_get_state(struct connman_service *service);
char *connman_service_get_interface(struct connman_service *service);
+const char *connman_service_get_identifier(struct connman_service *service);
const char *connman_service_get_domainname(struct connman_service *service);
+const char *connman_service_get_dbuspath(struct connman_service *service);
char **connman_service_get_nameservers(struct connman_service *service);
char **connman_service_get_timeservers_config(struct connman_service *service);
char **connman_service_get_timeservers(struct connman_service *service);
@@ -129,6 +132,13 @@ const char *connman_service_get_proxy_autoconfig(struct connman_service *service
bool connman_service_get_favorite(struct connman_service *service);
bool connman_service_get_autoconnect(struct connman_service *service);
+/* Return non-zero value to terminate the loop, zero to continue */
+typedef int (* connman_service_iterate_cb) (struct connman_service *service,
+ void *user_data);
+int connman_service_iterate_services(connman_service_iterate_cb cb,
+ void *user_data);
+
+struct connman_service *connman_service_get_default(void);
struct connman_service *connman_service_lookup_from_network(struct connman_network *network);
struct connman_service *connman_service_lookup_from_identifier(const char* identifier);
diff --git a/include/session.h b/include/session.h
index 5106e886..39f33685 100644
--- a/include/session.h
+++ b/include/session.h
@@ -74,6 +74,7 @@ struct connman_session_config {
GSList *allowed_bearers;
char *allowed_interface;
bool source_ip_rule;
+ char *context_identifier;
};
typedef int (* connman_session_config_func_t) (struct connman_session *session,
diff --git a/include/technology.h b/include/technology.h
index 97db6607..7508a9a1 100644
--- a/include/technology.h
+++ b/include/technology.h
@@ -42,6 +42,8 @@ int connman_technology_set_regdom(const char *alpha2);
void connman_technology_regdom_notify(struct connman_technology *technology,
const char *alpha2);
+enum connman_service_type connman_technology_get_type
+ (struct connman_technology *technology);
bool connman_technology_get_wifi_tethering(const char **ssid,
const char **psk);
bool connman_technology_is_tethering_allowed(enum connman_service_type type);
diff --git a/include/tethering.h b/include/tethering.h
new file mode 100644
index 00000000..827f29af
--- /dev/null
+++ b/include/tethering.h
@@ -0,0 +1,37 @@
+/*
+ *
+ * Connection Manager
+ *
+ * Copyright (C) 2007-2013 Intel Corporation. All rights reserved.
+ * Copyright (C) 2018 GlobalLogic. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __CONNMAN_TETHERING_H
+#define __CONNMAN_TETHERING_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void __connman_tethering_client_register(const char *addr);
+void __connman_tethering_client_unregister(const char *addr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONNMAN_TETHERING_H */
diff --git a/include/vpn-dbus.h b/include/vpn-dbus.h
index 01780cbd..07743bd0 100644
--- a/include/vpn-dbus.h
+++ b/include/vpn-dbus.h
@@ -48,6 +48,7 @@ extern "C" {
#define PROPERTY_CHANGED "PropertyChanged"
#define GET_CONNECTIONS "GetConnections"
#define VPN_CONNECT "Connect"
+#define VPN_CONNECT2 "Connect2"
#define VPN_DISCONNECT "Disconnect"
#define VPN_REMOVE "Remove"