diff options
author | Martin Xu <martin.xu@intel.com> | 2009-12-30 16:24:08 +0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-30 00:52:19 -0800 |
commit | ffb30866441664a7c2adcc3147ae4c8f34097692 (patch) | |
tree | e579dc649c9aaf67a8d21aea4fa417c880ecd1ab | |
parent | 0e3be5d1dbec15d15718093e5eeb9ec7d3dbd61f (diff) | |
download | connman-ffb30866441664a7c2adcc3147ae4c8f34097692.tar.gz connman-ffb30866441664a7c2adcc3147ae4c8f34097692.tar.bz2 connman-ffb30866441664a7c2adcc3147ae4c8f34097692.zip |
Add function connman_network_set_method()
-rw-r--r-- | include/network.h | 4 | ||||
-rw-r--r-- | src/network.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/network.h b/include/network.h index 13cdccb0..bde00028 100644 --- a/include/network.h +++ b/include/network.h @@ -24,6 +24,7 @@ #include <connman/types.h> #include <connman/device.h> +#include <connman/ipconfig.h> #ifdef __cplusplus extern "C" { @@ -94,6 +95,9 @@ connman_bool_t connman_network_get_connected(struct connman_network *network); connman_bool_t connman_network_get_associating(struct connman_network *network); +void connman_network_set_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, diff --git a/src/network.c b/src/network.c index 83b12fd3..226d3a7d 100644 --- a/src/network.c +++ b/src/network.c @@ -652,6 +652,12 @@ static void set_associate_error(struct connman_network *network) CONNMAN_SERVICE_STATE_FAILURE); } +void connman_network_set_method(struct connman_network *network, + enum connman_ipconfig_method method) +{ + network->element.ipv4.method = method; +} + void connman_network_set_error(struct connman_network *network, enum connman_network_error error) { |