diff options
author | Mike Lockwood <lockwood@android.com> | 2009-07-10 17:21:17 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-07-10 17:29:47 -0400 |
commit | feb63e9e6f2d7aed5f0f21347992218ed8acb9f4 (patch) | |
tree | 3718d4fbfa3f15536a46e897d4d3152fe0a76831 /libnetutils/ifc_utils.c | |
parent | 2974d1fb8b0359c52765247aa2cd783e690e91de (diff) | |
download | system_core-feb63e9e6f2d7aed5f0f21347992218ed8acb9f4.zip system_core-feb63e9e6f2d7aed5f0f21347992218ed8acb9f4.tar.gz system_core-feb63e9e6f2d7aed5f0f21347992218ed8acb9f4.tar.bz2 |
libnetutils: Add ifc_enable(), for enabling a network interface.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'libnetutils/ifc_utils.c')
-rw-r--r-- | libnetutils/ifc_utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c index 88635d9..bde336f 100644 --- a/libnetutils/ifc_utils.c +++ b/libnetutils/ifc_utils.c @@ -224,6 +224,16 @@ int ifc_add_host_route(const char *name, in_addr_t addr) return result; } +int ifc_enable(const char *ifname) +{ + int result; + + ifc_init(); + result = ifc_up(ifname); + ifc_close(); + return result; +} + int ifc_disable(const char *ifname) { int result; |