summaryrefslogtreecommitdiffstats
path: root/libnetutils/ifc_utils.c
diff options
context:
space:
mode:
authorJake Hamby <jhamby@google.com>2011-04-11 19:46:41 -0700
committerJake Hamby <jhamby@google.com>2011-04-11 19:46:41 -0700
commit6f49d5f266dffee103a3af07a7f6266f405d2924 (patch)
tree0fe1fb58fbf46f563a2f46074cf10916248166df /libnetutils/ifc_utils.c
parent203f9513fd720c091c0bb4289f1c4211aaf1cedc (diff)
downloadcore-6f49d5f266dffee103a3af07a7f6266f405d2924.tar.gz
core-6f49d5f266dffee103a3af07a7f6266f405d2924.tar.bz2
core-6f49d5f266dffee103a3af07a7f6266f405d2924.zip
Add missing function required to load Crespo RIL library.
ifc_set_mask() function was removed in a previous change. This function is called by the Crespo RIL, so we can't remove it yet. Bug: 4268537 Change-Id: I634580ee8d2a1aff069178837cc121c89c5e73f9
Diffstat (limited to 'libnetutils/ifc_utils.c')
-rw-r--r--libnetutils/ifc_utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c
index 946c39de9..92b96816f 100644
--- a/libnetutils/ifc_utils.c
+++ b/libnetutils/ifc_utils.c
@@ -206,6 +206,16 @@ int ifc_set_hwaddr(const char *name, const void *ptr)
return ioctl(ifc_ctl_sock, SIOCSIFHWADDR, &ifr);
}
+int ifc_set_mask(const char *name, in_addr_t mask)
+{
+ struct ifreq ifr;
+
+ ifc_init_ifr(name, &ifr);
+ init_sockaddr_in(&ifr.ifr_addr, mask);
+
+ return ioctl(ifc_ctl_sock, SIOCSIFNETMASK, &ifr);
+}
+
int ifc_set_prefixLength(const char *name, int prefixLength)
{
struct ifreq ifr;