Joe Onorato
f188d41fa2
Turn down the logging a little bit and don't do a log wrapper function.
...
Change-Id: I109f04c2c2299f26e21b076df3a935ce2d356bdf
2016-03-04 12:21:30 -08:00
Erik Kline
24f7d5e655
Add 464xlat notification callback
...
am: 8d6edc3270
* commit '8d6edc3270616b119645fbdf8752c0ea37de0731':
Add 464xlat notification callback
2016-03-02 08:37:06 +00:00
Erik Kline
8d6edc3270
Add 464xlat notification callback
...
Bug: 26238390
Bug: 26991160
Change-Id: I556e779c642d19cd8d26637dd98055157d005f77
2016-03-02 16:50:46 +09:00
Erik Kline
e5a5f84fef
Add constructor with more inputs for dependency injection.
...
am: b9df11099f
* commit 'b9df11099f16ca816a69e06f1327eb1f86723578':
Add constructor with more inputs for dependency injection.
2016-03-01 06:10:40 +00:00
Erik Kline
b9df11099f
Add constructor with more inputs for dependency injection.
...
Bug: 26991160
Bug: 27406552
Change-Id: If4a0a2f1afb1da4ad59df9eb31c540047c84659b
2016-03-01 14:58:30 +09:00
Erik Kline
13daed9fea
Add WaitForProvisioningCallback
...
am: 111d55658b
* commit '111d55658bce1bcc3eb61b4aeaa4d8a256165b02':
Add WaitForProvisioningCallback
2016-02-22 04:29:37 +00:00
Erik Kline
69ce6a0fc5
Support setting TCP buffer sizes and HTTP Proxy config
...
am: d0e843b8ef
* commit 'd0e843b8ef4218ba8f69a8a53b3eeaf21e667deb':
Support setting TCP buffer sizes and HTTP Proxy config
2016-02-22 04:11:28 +00:00
Erik Kline
111d55658b
Add WaitForProvisioningCallback
...
This centralizes code that is shared by both bluetooth and ethernet
transport layers.
Bug: 26991160
Change-Id: I8e2dd8580c29c86394119768e3a5529850b4b859
2016-02-22 13:02:02 +09:00
Erik Kline
d0e843b8ef
Support setting TCP buffer sizes and HTTP Proxy config
...
This allows IpManager to send callback recipients a more satisfying
LinkProperties.
Bug: 26991160
Change-Id: I2eb60dc633e5be38dad9410a1096d0095ddf57a0
2016-02-22 12:50:44 +09:00
Lorenzo Colitti
a2a9ab947f
Add a MessageUtils class to convert int constants to strings.
...
am: d2457a3ee3
* commit 'd2457a3ee39ea55ed8e302bd93feede793cb5055':
Add a MessageUtils class to convert int constants to strings.
2016-02-19 05:01:56 +00:00
Lorenzo Colitti
d2457a3ee3
Add a MessageUtils class to convert int constants to strings.
...
This class uses reflection to find accessible static integer
members in a specified list of classes and returns a SparseArray
mapping the integers to their names. This will allow us to
replace various 400-line switch statements with a simple
array access.
Change-Id: I3607e6389a423cde0bd83270c00b3c863ae1bb29
2016-02-19 10:26:55 +09:00
Erik Kline
7651b21fe9
{,Base}DhcpStateMachine is no more
...
am: efa4209fe0
* commit 'efa4209fe022d007f48edc3c4feaef00a9865cb5':
{,Base}DhcpStateMachine is no more
2016-02-18 04:38:38 +00:00
Erik Kline
efa4209fe0
{,Base}DhcpStateMachine is no more
...
Bug: 26991160
Change-Id: I21f8c30627bf2a7fbcd5b4d5f1f1ad1a2dda759b
2016-02-18 12:56:45 +09:00
Erik Kline
907b255ebf
Remove references to BaseDhcpStateMachine and DhcpStateMachine
...
am: 29a215268d
* commit '29a215268dfa18f5023dc3c06b33db68e91ae316':
Remove references to BaseDhcpStateMachine and DhcpStateMachine
2016-02-17 13:06:49 +00:00
Erik Kline
29a215268d
Remove references to BaseDhcpStateMachine and DhcpStateMachine
...
Bug: 26991160
Change-Id: I3742780a4e5121c163d9d1380951e25edaba19f3
2016-02-17 21:44:25 +09:00
Erik Kline
5c78685d56
Add IpManager#shutdown() to terminate the state machine.
...
am: b1ee39540e
* commit 'b1ee39540ead2e4ee74d4dba9ee1b84211766221':
Add IpManager#shutdown() to terminate the state machine.
2016-02-17 12:20:19 +00:00
Erik Kline
b1ee39540e
Add IpManager#shutdown() to terminate the state machine.
...
Additionally, remove IpManager.Callback#usingIpReachabilityMonitor()
now that this is now longer used.
Bug: 26991160
Change-Id: I9a17497c82238a9fb37a20d01aeca7bc4913ae2c
2016-02-17 20:54:10 +09:00
Erik Kline
209fd91dae
Add IpManager.ProvisioningRequest class
...
am: 93b1a36e31
* commit '93b1a36e31b42c5b33a0164f2832ab9aa12d9a00':
Add IpManager.ProvisioningRequest class
2016-02-16 10:15:09 +00:00
Erik Kline
93b1a36e31
Add IpManager.ProvisioningRequest class
...
This class captures provisioning request parameters to be passed to
IpManager#startProvisioning().
Bug: 26991160
Change-Id: I56652bbc4b9ae6cfca3f225a8d99cdfc01bb54d9
2016-02-16 18:11:47 +09:00
Erik Kline
09bf13574e
Duplicate DhcpStateMachine public constants into DhcpClient
...
This is so we can ultimately delete DhcpStateMachine altogether.
Bug: 24837343
Bug: 26991160
Change-Id: If116639e5f72c97cfc67f748dc5f6433dccd9cf0
2016-02-12 19:02:39 +09:00
Erik Kline
3b74289fdf
Duplicate DhcpStateMachine public constants into DhcpClient
...
This is so we can ultimately delete DhcpStateMachine altogether.
Bug: 24837343
Bug: 26991160
Change-Id: If116639e5f72c97cfc67f748dc5f6433dccd9cf0
2016-02-12 17:10:15 +09:00
Erik Kline
16e1e55271
Use IpManager.ifname as the tag in log messages.
...
am: ef1f39abff
* commit 'ef1f39abff088789853e8747418310534cf2127e':
Use IpManager.ifname as the tag in log messages.
2016-02-11 13:27:27 +00:00
Erik Kline
ef1f39abff
Use IpManager.ifname as the tag in log messages.
...
Bug: 26991160
Change-Id: Idc9231819298b65da3cc3baa88f1f0cd18ab6df7
2016-02-11 21:07:07 +09:00
Erik Kline
db338c2e90
Merge "Incorporate historical WifiStateMachine notions of provisioning." into mm-wireless-dev
...
am: f94dc18746
* commit 'f94dc18746d93e98d2e48cdd25b799aa20a142ab':
Incorporate historical WifiStateMachine notions of provisioning.
2016-02-10 22:13:31 +00:00
Erik Kline
990fc4968d
Incorporate historical WifiStateMachine notions of provisioning.
...
Also: considerably expand logging capabilities.
Bug: 26991160
Change-Id: I36c3c1d2158ffd178e8ce163b8799d62938f39c7
2016-02-11 03:21:48 +09:00
Paul Jensen
8514a8131f
Merge "Android packet filtering program interpreter test & program generator" into mm-wireless-dev
...
am: 44307adcf3
* commit '44307adcf371bacad4de6925a9207bdbfdc6f874':
Android packet filtering program interpreter test & program generator
2016-02-03 17:12:47 +00:00
Paul Jensen
44307adcf3
Merge "Android packet filtering program interpreter test & program generator" into mm-wireless-dev
2016-02-03 16:48:43 +00:00
Paul Jensen
d38fb7662d
Android packet filtering program interpreter test & program generator
...
Change-Id: I17951bd6320b9eb3b6c43f2ae37f62c2025705c1
2016-02-03 10:19:13 -05:00
Erik Kline
3d51d8bacc
Ignore link properties updates when nothing actually changed.
...
am: 6076cb0b85
* commit '6076cb0b859185b075d3a70655afb192d68d0774':
Ignore link properties updates when nothing actually changed.
2016-02-03 14:37:11 +00:00
Erik Kline
d33e6232fe
Partial unification of DHCPv4 and static IPv4 configuration codepaths
...
am: 8deac7793c
* commit '8deac7793c32be0c3b64b64d48dd9c0e2407e8db':
Partial unification of DHCPv4 and static IPv4 configuration codepaths
2016-02-03 14:29:32 +00:00
Erik Kline
6076cb0b85
Ignore link properties updates when nothing actually changed.
...
Change-Id: Ia3c0a652cb3b67707a5c5a0bb40f991ef1e6f777
2016-02-03 22:42:54 +09:00
Erik Kline
8deac7793c
Partial unification of DHCPv4 and static IPv4 configuration codepaths
...
Change-Id: Ic796f9b7bb853a332175c34e0f557588efb6247a
2016-02-03 22:42:53 +09:00
Erik Kline
0c96d715c1
Move DHCPv4 mechanics into IpManager
...
am: 8afa558c52
* commit '8afa558c527b4be4e0e489b17485577e23148636':
Move DHCPv4 mechanics into IpManager
2016-02-03 08:44:13 +00:00
Erik Kline
8afa558c52
Move DHCPv4 mechanics into IpManager
...
Bug: 17345682
Change-Id: I2c3d9d665ff3c38f02084c0cf86cd76035e7b0aa
2016-02-03 17:23:45 +09:00
Erik Kline
59235e66a5
Support static IP configuration internally
...
am: 1e91e4ebb6
* commit '1e91e4ebb65e63969e6ae45503257852be017aee':
Support static IP configuration internally
2016-02-02 04:07:58 +00:00
Erik Kline
1e91e4ebb6
Support static IP configuration internally
...
Also, stop passing around "reason" for IPv4 provision success
or failure.
Bug: 17345682
Change-Id: I4c4b22977a93048e0b291206721d0ccc77cfaaf2
2016-02-01 22:32:21 +09:00
Erik Kline
4cc9ef8c74
Initial refactoring to group IP-related elements into an IpManager
...
am: a636761bd6
* commit 'a636761bd67963385397ee920dcf76ec7cf113fb':
Initial refactoring to group IP-related elements into an IpManager
2016-02-01 10:08:40 +00:00
Erik Kline
a636761bd6
Initial refactoring to group IP-related elements into an IpManager
...
Bug: 17345682
Change-Id: I88f3f4bd32d18cd8d4f1404493648c8bcc1deeec
2016-02-01 17:59:47 +09:00
Erik Kline
7cb501310e
DO NOT MERGE Refactor netlink and IpReachabilityMonitor into services/net
...
- netlink from core to services/net/netlink
- IpReachabilityMonitor from core to services/net/ip
Cherry-picked from 02cc5a030a
Change-Id: I45ac3f591bade45dd5ec441111b02b621234c0e4
2015-12-10 16:06:50 -08:00
Lorenzo Colitti
bda01cc5e3
Fix canceling renew alarms.
...
1. Entering DhcpBoundState cancels the renew alarm, but at that
point the renew alarm is guaranteed not to have been scheduled.
This is harmless, but results in an "unknown listener" message
in the AlarmManager logs.
2. We don't cancel the renew alarm when exiting DhcpBoundState.
This is also harmless, because that alarm does nothing except
in DhcpBoundState, and we cancel it whenever we enter
DhcpBoundState. But canceling it on exit is more correct.
Change-Id: I60dfcf00f243253b81b8906540e0a6218a7a489c
2015-12-10 12:58:27 +00:00
Lorenzo Colitti
9d3aadb247
Add a new WakeupMessage class and use it in two places.
...
This is useful when using the new AlarmManager direct callback
interface to wake up the system and request that an object whose
API consists of messages (such as a StateMachine) perform some
action.
In this situation, using AlarmManager.onAlarmListener by itself
will wake up the system to send the message, but does not
guarantee that the system will be awake until the target object
has processed it. This is because as soon as the onAlarmListener
sends the message and returns, the system is free to go to sleep
again.
Bug: 20157436
Bug: 25823676
Change-Id: Idff20029d287f26347441a2523b7fb20eda6a8b0
2015-12-08 23:50:23 +09:00
Lorenzo Colitti
c415f72b66
Merge changes I456984a2,Id4d1031b
...
* changes:
Switch the DHCP client to the new AlarmManager callback interface
Refactor alarm setting code in preparation for switch to callback
2015-11-25 04:37:59 +00:00
Lorenzo Colitti
831204c651
Switch the DHCP client to the new AlarmManager callback interface
...
Bug: 24224067
Bug: 25823676
Change-Id: I456984a2f6243f92edb63b8599d861627e2de1cf
2015-11-24 13:47:15 +09:00
Lorenzo Colitti
e5f11cd6cc
Refactor alarm setting code in preparation for switch to callback
...
Bug: 25823676
Change-Id: Id4d1031b5bd3a7f041c32ad4ac9384e045b385e8
2015-11-24 13:47:15 +09:00
Lorenzo Colitti
6c7acb6ec7
Add a test that checks the contents of DISCOVER packets.
...
Change-Id: I571d560cf7032babf7b7867ad748e2a896116ce7
2015-11-17 16:36:18 +09:00
Lorenzo Colitti
8a484fbb8c
Merge "Don\'t crash if a DHCP server doesn\'t send the server ID option." into mnc-dr-dev am: a2cc04736d am: e4aacaeec9 am: c52503acf0
...
am: bce5116b8d
* commit 'bce5116b8d10c91436445cd0a0830bb51702bfd4':
Don't crash if a DHCP server doesn't send the server ID option.
2015-10-29 18:20:30 +00:00
Lorenzo Colitti
7611f1cdb4
Don't crash if a DHCP server doesn't send the server ID option.
...
This violates a MUST in RFC2131, but apparently some
implementations don't know or care.
Bug: 25343517
Change-Id: I80459b58ffe231e7ed64e77bafa157a96b745149
2015-10-29 16:09:16 +09:00
Erik Kline
952159f3bc
Make all IpReachabilityMonitor log messages have the same tag
...
Change-Id: I463566a9efc52ea02d431fb859e915a615ad0dc6
2015-10-27 11:40:36 +09:00
Lorenzo Colitti
eda0ea4190
am 3d3f766c: am 871d96b4: am 13c5dd5c: am eb0bbd45: Merge changes Id6a0b0de,I5f03b8b2,I62464b92 into mnc-dr-dev
...
* commit '3d3f766c8b37dcf495235ca4a500494498712eed':
Support DHCP replies with multiple default gateways.
Accept DHCP responses from non-67 server source ports
Improve logging of DHCP parse errors using exceptions.
2015-10-12 17:12:08 +00:00
Lorenzo Colitti
4e4d59eeef
Connect the DHCP UDP socket to the server.
...
This makes it so that the socket cannot receive datagrams from
anybody except the DHCP server. This does not improve security,
because we never read from the UDP socket anyway, but it does
make ListeningPortsTest pass.
Bug: 23906864
Bug: 23933386
Change-Id: Ib090273a417f7eb2ac1ee3309260249b72fb8345
2015-10-11 16:06:11 +09:00