*
* Connection Manager
*
- * Copyright (C) 2007-2009 Intel Corporation. All rights reserved.
+ * Copyright (C) 2007-2010 Intel Corporation. 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
#include <connman/types.h>
#include <connman/device.h>
+#include <connman/ipconfig.h>
#ifdef __cplusplus
extern "C" {
CONNMAN_NETWORK_TYPE_BLUETOOTH_PAN = 8,
CONNMAN_NETWORK_TYPE_BLUETOOTH_DUN = 9,
CONNMAN_NETWORK_TYPE_CELLULAR = 10,
- CONNMAN_NETWORK_TYPE_MBM = 22,
- CONNMAN_NETWORK_TYPE_HSO = 23,
CONNMAN_NETWORK_TYPE_VENDOR = 10000,
};
-enum connman_network_protocol {
- CONNMAN_NETWORK_PROTOCOL_UNKNOWN = 0,
- CONNMAN_NETWORK_PROTOCOL_IP = 1,
- CONNMAN_NETWORK_PROTOCOL_PPP = 2,
-};
-
enum connman_network_error {
CONNMAN_NETWORK_ERROR_UNKNOWN = 0,
CONNMAN_NETWORK_ERROR_ASSOCIATE_FAIL = 1,
+ CONNMAN_NETWORK_ERROR_CONFIGURE_FAIL = 2,
};
+#define CONNMAN_NETWORK_PRIORITY_LOW -100
+#define CONNMAN_NETWORK_PRIORITY_DEFAULT 0
+#define CONNMAN_NETWORK_PRIORITY_HIGH 100
+
struct connman_network;
struct connman_network *connman_network_create(const char *identifier,
enum connman_network_type connman_network_get_type(struct connman_network *network);
const char *connman_network_get_identifier(struct connman_network *network);
-const char *connman_network_get_path(struct connman_network *network);
+struct connman_element *connman_network_get_element(
+ struct connman_network *network);
void connman_network_set_index(struct connman_network *network, int index);
int connman_network_get_index(struct connman_network *network);
-void connman_network_set_protocol(struct connman_network *network,
- enum connman_network_protocol protocol);
void connman_network_set_group(struct connman_network *network,
const char *group);
const char *connman_network_get_group(struct connman_network *network);
connman_bool_t connman_network_get_associating(struct connman_network *network);
+void connman_network_set_ipv4_method(struct connman_network *network,
+ enum connman_ipconfig_method method);
+void connman_network_set_ipv6_method(struct connman_network *network,
+ enum connman_ipconfig_method method);
+
int connman_network_set_address(struct connman_network *network,
const void *address, unsigned int size);
int connman_network_set_name(struct connman_network *network,
void *connman_network_get_data(struct connman_network *network);
void connman_network_set_data(struct connman_network *network, void *data);
+void connman_network_update(struct connman_network *network);
+
struct connman_network_driver {
const char *name;
enum connman_network_type type;
void (*remove) (struct connman_network *network);
int (*connect) (struct connman_network *network);
int (*disconnect) (struct connman_network *network);
+ int (*setup) (struct connman_network *network, const char *key);
};
int connman_network_driver_register(struct connman_network_driver *driver);