History log of /system/netd/server/Network.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3667936aadcabddc708797ac38ce1ffb2f992cb3 25-Feb-2015 Lorenzo Colitti <lorenzo@google.com> Add a dummy network that discards all packets.

Bug: 19500693
Change-Id: Ic25f2d8c481f1528e887e43ca3fa868189582110
/system/netd/server/Network.h
48e19b037e7e20674048ef76bf31ce65c741347c 23-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Implement the fallthrough rule to support split tunnel VPNs.

Change-Id: Ibc48caedb5954c6b12bfa553d978bab56c4b09aa
/system/netd/server/Network.h
6a773534e7f8541f221f27fb8063af079b1a5936 11-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Fix tethering in the case of a regular upstream connection.

Fixes tethering via Ethernet, Bluetooth and WiFi (hotspot).

Tethering when the upstream has a DUN-specific APN is likely still broken
(untested).

For now, assign a fixed NetId (a hack) until we can change the framework to
create a valid NetworkAgent and all that jazz.

Bug: 15968336
Bug: 14988803
Change-Id: Idcf4d492d9329a9c87913e27be6dd835a792bea2
/system/netd/server/Network.h
e09b20aee85f1dfd8c18c3d8581ac875d939ba70 06-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Add full support for UIDs in VPNs.

Major:
+ Implement the functions mentioned in http://go/android-multinetwork-routing
correctly, including handling accept(), connect(), setNetworkForSocket()
and protect() and supporting functions like canUserSelectNetwork().
+ Eliminate the old code path of getting/setting UID ranges through
SecondaryTableController (which is currently unused) and mUidMap.

Minor:
+ Rename some methods/variables for clarity and consistency.
+ Moved some methods in .cpp files to match declaration order in the .h files.

Bug: 15409918
Change-Id: Ic6ce3646c58cf645db0d9a53cbeefdd7ffafff93
/system/netd/server/Network.h
89dad013e4dd98434b0409a84567f38782894029 02-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Keep track of users allowed to call protect() explicitly.

This is an API change between ConnectivityService and Netd.

The ownerUid was meant for this purpose, but it's insufficient, as apps need to
call protect() _before_ they create a VPN.

Bug: 15409918
Change-Id: If804aa106002e96d5ffb623d32db35fd76928367
/system/netd/server/Network.h
36ed53e37b2639681055b2d3d8777241e7dd6982 02-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Cosmetic: Add a way to query the type of a network.

This is a cosmetic change, i.e., there's no change in functionality.

This is the poor man's RTTI. It turns out that maintaining separate lists (or
maps) of the different types of networks gets burdensome pretty quickly
(especially in an upcoming CL where we add functions like
canUserSelectNetwork()).

Change-Id: If5250c0fc106045f681d0fd71278b793addbe1e3
/system/netd/server/Network.h
f4f6c8de3f091be4b91a5a9d7f14e8882ec6d502 23-Jun-2014 Sreeram Ramachandran <sreeram@google.com> Refactor: Encapsulate permissions and interfaces into a Network class.

Currently, there's a lot of logic in NetworkController surrounding events such
as interface addition/removal, network creation/destruction and default network
change, because these events are interwined. For example, adding an interface
means also adding a corresponding default network rule if the interface is being
added to the current default network.

When we introduce VPNs into this mix, things will get hairy real quick for all
this logic in NetworkController.

In this refactor, we introduce an abstract base class Network which supports
adding and removing interfaces. The main concrete implementation of this is
PhysicalNetwork, which allows setting permissions and "default network" state.

Since we've moved network permissions into the above class, and user permissions
into NetworkController, PermissionsController is unused and has been removed.

Also fix a few bugs in RouteController:
+ Use uidEnd correctly.
+ Check for all error cases in inet_pton.
+ Check the return value of android_fork_execvp() correctly.
+ The "return cmd1() && cmd2()" pattern is wrong. Rewrite that code.

Also (non-functional changes):
+ Remove instantiations of RouteController. It has static methods only.
+ Reorder some blocks in CommandListener so that the most frequent commands are
checked first.
+ Remove unused paramError() and clearNetworkPreference().
+ Change all return codes to int (negative errno) wherever applicable.
+ Add WARN_UNUSED_RESULT everywhere.
+ Cleanup some style in RouteController and NetworkController.
+ Use uid_t instead of unsigned for user IDs.
+ Add clearer log messages at the source of failures.
+ Add a check for when fwmark bits are set without corresponding mask bits.

Bug: 15409918

Change-Id: Ibba78b0850160f9f3d17d476f16331a6db0025d1
/system/netd/server/Network.h