summaryrefslogtreecommitdiffstats
path: root/server/NetdNativeService.h
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2020-04-04 00:44:01 +0900
committerLorenzo Colitti <lorenzo@google.com>2020-04-06 09:25:06 +0900
commit182cd3c8f0f3637288ff07ccd64e77c96afc3a0a (patch)
tree19094ae136fc9f46a99f49883a53b232d94f7626 /server/NetdNativeService.h
parentecd5bf4633fe1fce0ff5503862e6be0e51bec686 (diff)
downloadplatform_system_netd-182cd3c8f0f3637288ff07ccd64e77c96afc3a0a.tar.gz
platform_system_netd-182cd3c8f0f3637288ff07ccd64e77c96afc3a0a.tar.bz2
platform_system_netd-182cd3c8f0f3637288ff07ccd64e77c96afc3a0a.zip
Convert tethering offload IPCs from primitive args to a parcel.
Defining stable AIDL IPCs with primitive args is not future-proof because AIDL does not support method overloading, so any time a parameter is added a new method needs to be created. It's better to use parcelables for parameters instead, because parcelables can be extended in subsequent version. Define a TetherOffloadRuleParcel data structure to represent tethering offload rules, and switch the tethering offload IPCs to it before we freeze the INetd AIDL. Bug: 140541991 Test: atest netd_integration_test Change-Id: I6e84b14872d38a897eb6a10fd37d816ec7e6da64
Diffstat (limited to 'server/NetdNativeService.h')
-rw-r--r--server/NetdNativeService.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/server/NetdNativeService.h b/server/NetdNativeService.h
index 0c241d736..0d95c8ea4 100644
--- a/server/NetdNativeService.h
+++ b/server/NetdNativeService.h
@@ -136,12 +136,9 @@ class NetdNativeService : public BinderService<NetdNativeService>, public BnNetd
const std::string& extIface) override;
binder::Status tetherRemoveForward(const std::string& intIface,
const std::string& extIface) override;
- binder::Status tetherRuleAddDownstreamIpv6(int intIfaceIndex, int extIfaceIndex,
- const std::vector<uint8_t>& ipAddress,
- const std::vector<uint8_t>& srcL2Address,
- const std::vector<uint8_t>& dstL2Address) override;
- binder::Status tetherRuleRemoveDownstreamIpv6(int extIfaceIndex,
- const std::vector<uint8_t>& ipAddress) override;
+ binder::Status tetherOffloadRuleAdd(const android::net::TetherOffloadRuleParcel& rule) override;
+ binder::Status tetherOffloadRuleRemove(
+ const android::net::TetherOffloadRuleParcel& rule) override;
// Interface-related commands.
binder::Status interfaceAddAddress(const std::string &ifName,