Commit graph

19 commits

Author SHA1 Message Date
Elliott Hughes
847d963598 Remove a dead header (<netutils/dhcp.h>).
9c07eb9dd8 removed the implementation, but
missed the header file.

Bug: http://b/27192644
Change-Id: I809a3eb0081b05783b70dbca0274cdde6b1b31a6
2016-05-18 14:22:15 -07:00
Erik Kline
c2291a7ed3 Refactor dhcp_utils for more flexible uses.
Separate out fetching DHCP results from starting the daemon
(for either discover or renew).

Renamed dhcp_do_request() to dhcp_start().
Renamed dhcp_do_request_renew() to dhcp_start_renew().
Added new dhcp_get_results().

Callers of the prior versions of dhcp_do_request* now separately
call dhcp_get_results().

Bug: 19422416
Change-Id: I05447853d444015e6014661dda1bb177b58fe463
2015-03-02 12:26:53 +09:00
Sreeram Ramachandran
17622d09d5 Support resetting connections tied to any nonexistent address.
Bug: 15414453
Change-Id: Ibf1f052e12b88838a328148e25817a96f10d50f5
2014-09-08 23:35:52 -07:00
Sreeram Ramachandran
eec232603d Put back some deleted code.
http://ag/507249 removed a bunch of supposedly dead (unused) code. It turns out
at least ifc_disable() is being used in some protected partner branches. Put
back that as well as ifc_enable() to keep it symmetric.

Bug: 15413389
Change-Id: Ibec83a66e5d9079876ccf36d250b95b7c0294c03
2014-07-23 09:30:53 -07:00
Sreeram Ramachandran
a723689eca Cleanup: Delete dead code.
Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
2014-07-22 15:00:21 -07:00
Dmitry Shmidt
be06210c50 libnetutils: Get mtu together with dhcp session results
Change-Id: I517fd1f62d451b07466a21a2b770d9ce389dac19
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-08-02 14:09:09 -07:00
Robert Greenwalt
fdd573188d Support 4 dns servers, up from 2
bug:5958524
Change-Id: I61c25e23d21e92653ec9b874d3d456a330d8fe05
2013-01-10 11:36:09 -08:00
Ed Heyl
3cac204d35 Merge remote-tracking branch 'goog/jb-dev-mako' into jb-mr1-dev 2012-07-28 11:48:12 -07:00
Dmitry Shmidt
22bb8fc5fe netutils: Make visible prefixLengthToIpv4Netmask() function
Change-Id: I316b192ce753daa838ea44001f899ea508adf75c
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-07-23 15:41:54 -07:00
Alex Yakavenka
7c3d1c291a Export flags needed for ifc_reset_connections API in netutils
Code using ifc_reset_connections api needs to have access to
predefined masks for reset_mask parameter

Change-Id: I90bc5e1b62ae4a88501c8ad4e353c0d93d319579
2012-06-21 16:56:01 -07:00
Jeff Sharkey
0fb8ec8e9a Pipe DHCP vendor info towards framework.
Bug: 6344821
Change-Id: Iebce3e1b36175fc88f44e18db647c43b1245f18f
2012-04-19 10:36:05 -07:00
Lorenzo Colitti
47ddb515b7 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
2011-09-28 17:12:13 -07:00
Wink Saville
979203ee34 Add reset_mask as parameter to ifc_reset_connections
The reset_mask allows either IPv4 and or IPv6 connections
of an interface to be reset.

Bug: 4981919
Change-Id: Id2d9ab90e30091d3d0764c66d4b01b73c0edbfcc
2011-07-07 12:16:12 -07:00
Robert Greenwalt
09dd819d27 Stop using netmask in the framework
This pushes prefixLength down as far as we can.

bug:2542681
Change-Id: I94b7cde9d10e97ee2c071d92f25555cff5934f0b
2011-02-02 14:18:44 -08:00
Dmitry Shmidt
b42db825e1 Merge "libnetutils: Clean all IPs assigned to the interface on cleaning" 2011-01-27 15:59:52 -08:00
Dmitry Shmidt
9092b91cca libnetutils: Clean all IPs assigned to the interface on cleaning
Change-Id: Ic285bbb4b224fc4e62e88e76b8b448edbe814a17
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-01-27 14:16:20 -08:00
Robert Greenwalt
faab26d542 Change our dhcp interface to be IPv6 compat.
Doesn't do IPv6, but removes v4-specific structures from the framework
(netmask, ints for addrs)
bug:2542681

Change-Id: I1110e6f32d42a472b104835a4298e18b391db0a7
2011-01-25 11:21:04 -08:00
Banavathu, Srinivas Naik
8984bb9691 Add API to add a route to IPv4/IPv6 host/gateway.
Add API to create a route to an IPv4/IPv6 host/gateway through a particular
interface.

Change-Id: I0ab5d2d211e0fc05f65ee6bb202b7f435cccae2a
2010-08-17 21:50:41 -07:00
Szymon Jakubczak
c88e09cb98 - creates proper ifc.h and dhcp.h headers for libnetutils
- adds ifc_set_hwaddr
- adds hwaddr command to netcfg
- code reuse: dhcp_configure calls ifc_configure; inet_ntoa is used for printing
- consistency: use net.XXX.dnsX properties in favor of dhcp.XXX.dnsX properties
  (see related change to WifiStateTracker)
- updated system/core/nexus to use new headers, although not sure if
anybody still uses nexus

Change-Id: Idd70c0ac6e89b38e86816578c33eff805d30cac4
2010-06-09 16:11:09 -04:00