struct connman_ipconfig;
+struct connman_ipconfig_ops {
+ void (*up) (struct connman_ipconfig *ipconfig);
+ void (*down) (struct connman_ipconfig *ipconfig);
+ void (*lower_up) (struct connman_ipconfig *ipconfig);
+ void (*lower_down) (struct connman_ipconfig *ipconfig);
+};
+
struct connman_ipconfig *connman_ipconfig_create(int index);
struct connman_ipconfig *connman_ipconfig_ref(struct connman_ipconfig *ipconfig);
void connman_ipconfig_unref(struct connman_ipconfig *ipconfig);
+void *connman_ipconfig_get_data(struct connman_ipconfig *ipconfig);
+void connman_ipconfig_set_data(struct connman_ipconfig *ipconfig, void *data);
+
+void connman_ipconfig_set_ops(struct connman_ipconfig *ipconfig,
+ struct connman_ipconfig_ops *ops);
+
int connman_ipconfig_set_method(struct connman_ipconfig *ipconfig,
enum connman_ipconfig_method method);
char *interface;
unsigned short type;
unsigned int flags;
+
+ struct connman_ipconfig_ops *ops;
+ void *ops_data;
+
enum connman_ipconfig_method method;
GSList *address_list;
char *gateway;
}
/**
+ * connman_ipconfig_get_data:
+ * @ipconfig: ipconfig structure
+ *
+ * Get private data pointer
+ */
+void *connman_ipconfig_get_data(struct connman_ipconfig *ipconfig)
+{
+ return ipconfig->ops_data;
+}
+
+/**
+ * connman_ipconfig_set_data:
+ * @ipconfig: ipconfig structure
+ * @data: data pointer
+ *
+ * Set private data pointer
+ */
+void connman_ipconfig_set_data(struct connman_ipconfig *ipconfig, void *data)
+{
+ ipconfig->ops_data = data;
+}
+
+/**
+ * connman_ipconfig_set_ops:
+ * @ipconfig: ipconfig structure
+ * @ops: operation callbacks
+ *
+ * Set the operation callbacks
+ */
+void connman_ipconfig_set_ops(struct connman_ipconfig *ipconfig,
+ struct connman_ipconfig_ops *ops)
+{
+ ipconfig->ops = ops;
+}
+
+/**
* connman_ipconfig_set_method:
* @ipconfig: ipconfig structure
* @method: configuration method