Commit graph

34 commits

Author SHA1 Message Date
daisuke niwa
c855bddc67 Improving the time to wait for assigning IP address
Framework always spends 600msec for getting IP address.
DhcpStateMachine.runDhcp calls NetworkUtils.stopDhcp.
After that, it calls NetworkUtils.runDhcp.
In this case, wait_for_property of dhcp_utils.c calls three times.
At least three times, usleep is called.
So move usleep statement after property_get statement.

Change-Id: I77ffb9a5a64875b47bb528b494bb60b68c1acb5a
2015-02-27 09:50:01 +01:00
Andreas Gampe
a5d5d84773 Libnetutils: Remove unused functions & variables
For build-system CFLAGS clean-up, remove unused functions and
variables.

Change-Id: I40a78d5a532dc32b53beb1cfc1b7645bab8add16
2014-11-24 10:43:53 -08: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
Colin Cross
0a0a8768cb resolved conflicts for merge of c0df50af to stage-aosp-master
Change-Id: I949cce9e1f14cd33162b81fbc6728c64e2b09b7c
2013-06-10 15:06:43 -07:00
Michael Wu
897df50f4c fix bad return value in dhcp_do_request_*
1. bad return status make it return uninitialized prefixLength with a magic
number in android_net_utils_runDhcpCommon()
2. it will make DhcpInfoInternal.makeLinkAddress() to throw
IllegalArgumentException when try to connect a Wifi AP
3. the exception will make system reboot, of cource it random.

Change-Id: Iabc0cd5b69c1316f4eeae0aa1b8a91444dca4562
Signed-off-by: Michael Wu <michaelstay@gmail.com>
2013-06-05 08:42:22 +08:00
Robert Greenwalt
c93d30f50d Merge "Support 4 dns servers, up from 2" 2013-01-11 15:38:59 -08:00
Robert Greenwalt
fdd573188d Support 4 dns servers, up from 2
bug:5958524
Change-Id: I61c25e23d21e92653ec9b874d3d456a330d8fe05
2013-01-10 11:36:09 -08:00
Elliott Hughes
273f504c14 am bab2ba3e: am 6d9589c3: Merge "Fix dhcpcd startup when net.hostname is not set"
* commit 'bab2ba3e730d610883added31ff806da352cbb07':
  Fix dhcpcd startup when net.hostname is not set
2013-01-07 12:26:21 -08:00
Matt Gumbel
ba2ba5c011 Fix dhcpcd startup when net.hostname is not set
Commit 62d6f74 swapped p2p_interface and DHCP_CONFIG_PATH
erroneously. This reverts them to their correct ordering and makes dhcpcd
startup work again.

Change-Id: Iea033a7e0dad98bb2a63fb39755330675cfbb0ab
Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com>
2013-01-04 10:18:45 -08:00
Irfan Sheriff
94cecfc4a0 Handle empty gateways
Change-Id: Icbc1859125bae0bc222685bfbc18af38273d6827
2012-12-07 10:36:29 -08:00
Irfan Sheriff
35c625194b Remove dead code
Remove unnecessary DHCP properties

Change-Id: I27b5d0a2d8fd67c911d04bb2d18dc1b3f10e7c2a
2012-12-06 12:08:05 -08:00
Robert Greenwalt
6ecbdca4c1 Read domain name from dhcp system prop
This property is set by the dhcpcd daemon.

bug:6799630
Change-Id: I21002e286819cff420ec72e3857764e5f58ecfe4
2012-11-13 12:04:09 -08:00
Dmitry Shmidt
62d6f74863 dhcp_utils: Add -f dhcpcd.conf processing
Change-Id: Idd5c8734fafd27c76f61820f223627af4c71a271
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-07-23 17:39:30 -07:00
Irfan Sheriff
89f58cf827 Reuse system properties for p2p
p2p interfaces keep increasing. Reuse a single "p2p" phrase to track all
p2p specific properties.

Longer term, we will remove the use of system properties for dhcp

Also, fixed some warnings

Bug: 6522164
Change-Id: Ibe9a68a1b5db9d5b0fe88c854d9f94b1b9930970
2012-05-23 14:13:40 -07:00
Jeff Sharkey
0fb8ec8e9a Pipe DHCP vendor info towards framework.
Bug: 6344821
Change-Id: Iebce3e1b36175fc88f44e18db647c43b1245f18f
2012-04-19 10:36:05 -07:00
Irfan Sheriff
da96a66b88 Merge "Fix dhcp comments" 2011-11-09 13:42:27 -08:00
Irfan Sheriff
35c28608bf Fix dhcp comments
Change-Id: Ia99b2c10ff6cf8c75c23db49f1e9cf7a043141cc
2011-11-09 11:11:21 -08:00
tk.mun
ed21633a5e Wimax: wimax related changes for libnetutils
- Modified dhcp renew code for the new conenctivity changes in ICS

Change-Id: I614dfc62a875b79dbd8b7c46f4d87f366a3c3661
Signed-off-by: tk.mun <tk.mun@samsung.com>
bug:5486930
2011-11-07 17:15:19 -08:00
repo sync
a329b4296c Update dhcp for p2p
Bug: 5002384
Change-Id: I4ee4f80e2bc2966aa30d1344182d90f30117fbae
2011-08-12 15:07:14 -07:00
Irfan Sheriff
bdaaec1ba0 Use DHCP server as gateway when it is absent
Some routers can return 0.0.0.0 as gateway address,
use DHCP server as gateway in such instances

Change-Id: I7e8db8e619475efce53ce391f77f2c13c3b7268c
2011-04-15 16:35:59 -07:00
TK MUN
9d15787034 Add per interface dhcp client support
Added when using dhcp on both wimax and wifi. But should be useful across multiple
services running dhcp now. Also adds a renewal api

Change-Id: Ic850a612dd429cd675b5b0224ff58895f9d8e4d9
Signed-off-by: TK MUN <tk.mun@samsung.com>
2011-03-23 16:24:13 -07: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
Irfan Sheriff
b1723b6892 Reduce polling interval to 200ms
DHCP success can take up to 2 seconds to
be reported to the statemachine. Move wait
time after check and reduce it to 200ms

Change-Id: I6b2546f80435a84ee6f44f4d91f348bacfdc8433
2010-12-21 11:15:28 -08:00
Olivier Bailly
b93e5812fa Add missing headers for compilation on x86 targets
Change-Id: I5f4dc797b353a0f01fa00d38375ec303bf863254
2010-11-17 11:47:23 -08:00
Szymon Jakubczak
8c85a00db6 - 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-08-25 08:13:42 -07:00
Jean-Baptiste Queru
58b64acef0 Revert "- creates proper ifc.h and dhcp.h headers for libnetutils"
This reverts commit c88e09cb98.
2010-08-18 11:16:00 -07:00
The Android Open Source Project
1adbb607d2 merge from open-source master
Change-Id: I8cfc9c0b699eceef77a905ca2f8cbdb1ab06bf1d
2010-06-15 11:33:39 -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
Dmitry Shmidt
9363b7d5da dhcp: Add hostname support
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2009-12-14 16:05:34 -08:00
The Android Open Source Project
dd7bc3319d auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
The Android Open Source Project
e54eebbf1a auto import from //depot/cupcake/@135843 2009-03-03 18:29:04 -08:00
The Android Open Source Project
1b8e5a6b14 auto import from //branches/cupcake/...@131421 2009-02-13 12:57:54 -08:00
The Android Open Source Project
35237d1358 Code drop from //branches/cupcake/...@124589 2008-12-17 18:08:08 -08:00
The Android Open Source Project
4f6e8d7a00 Initial Contribution 2008-10-21 07:00:00 -07:00