summaryrefslogtreecommitdiffstats
path: root/include/netutils
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2011-09-26 10:49:41 -0700
committerLorenzo Colitti <lorenzo@google.com>2011-09-28 17:12:13 -0700
commit47ddb515b7d59b29d83628c1b4e48642dc0e49ba (patch)
treef83ba9b3d9e329c43e3cfba6414ffb8af6a6ef3f /include/netutils
parentb14bbf02980fdb87437c1054037fda09286be6a4 (diff)
downloadsystem_core-47ddb515b7d59b29d83628c1b4e48642dc0e49ba.zip
system_core-47ddb515b7d59b29d83628c1b4e48642dc0e49ba.tar.gz
system_core-47ddb515b7d59b29d83628c1b4e48642dc0e49ba.tar.bz2
Support adding, deleting, and clearing IPv6 addrs.
- Provide a function to add and delete IPv4/IPv6 addresses using netlink. - Provide a function that clears all IP addresses on an interface that can be used by netd. Also, a couple of cleanups: - Update the header file to match reality, and include the header file in the implementation. Also fix a caller that has an incorrect method signature. - Fix whitespace in Android.mk. Change-Id: Ifba9d60cdfffb0b7e5c3b9c6ab328f5f77d259c4
Diffstat (limited to 'include/netutils')
-rw-r--r--include/netutils/ifc.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/netutils/ifc.h b/include/netutils/ifc.h
index 575e72e..67a4a45 100644
--- a/include/netutils/ifc.h
+++ b/include/netutils/ifc.h
@@ -38,9 +38,13 @@ extern int ifc_reset_connections(const char *ifname, const int reset_mask);
extern int ifc_get_addr(const char *name, in_addr_t *addr);
extern int ifc_set_addr(const char *name, in_addr_t addr);
-extern int ifc_get_prefixLength(const char *name, uint32_t *prefixLength);
-extern int ifc_set_prefixLength(const char *name, uint32_t prefixLength);
+extern int ifc_add_address(const char *name, const char *address,
+ int prefixlen);
+extern int ifc_del_address(const char *name, const char *address,
+ int prefixlen);
+extern int ifc_set_prefixLength(const char *name, int prefixLength);
extern int ifc_set_hwaddr(const char *name, const void *ptr);
+extern int ifc_clear_addresses(const char *name);
/* This function is deprecated. Use ifc_add_route instead. */
extern int ifc_add_host_route(const char *name, in_addr_t addr);
@@ -53,9 +57,10 @@ extern int ifc_create_default_route(const char *name, in_addr_t addr);
extern int ifc_remove_default_route(const char *ifname);
extern int ifc_add_route(const char *name, const char *addr, int prefix_length,
const char *gw);
-
-extern int ifc_get_info(const char *name, in_addr_t *addr, in_addr_t *mask,
- in_addr_t *flags);
+extern int ifc_remove_route(const char *ifname, const char *dst,
+ int prefix_length, const char *gw);
+extern int ifc_get_info(const char *name, in_addr_t *addr, int *prefixLength,
+ unsigned *flags);
extern int ifc_configure(const char *ifname, in_addr_t address,
uint32_t prefixLength, in_addr_t gateway,