Home
last modified time | relevance | path

Searched refs:iface (Results 1 – 25 of 95) sorted by relevance

1234

/system/netd/server/
DBandwidthController.cpp319 int BandwidthController::setInterfaceSharedQuota(const std::string& iface, int64_t maxBytes) { in setInterfaceSharedQuota() argument
330 if (!isIfaceName(iface)) in setInterfaceSharedQuota()
334 return removeInterfaceSharedQuota(iface); in setInterfaceSharedQuota()
337 auto it = mSharedQuotaIfaces.find(iface); in setInterfaceSharedQuota()
343 StringPrintf("-I bw_INPUT %d -i %s -j %s", ruleInsertPos, iface.c_str(), chain), in setInterfaceSharedQuota()
344 StringPrintf("-I bw_OUTPUT %d -o %s -j %s", ruleInsertPos, iface.c_str(), chain), in setInterfaceSharedQuota()
345 StringPrintf("-A bw_FORWARD -i %s -j %s", iface.c_str(), chain), in setInterfaceSharedQuota()
346 StringPrintf("-A bw_FORWARD -o %s -j %s", iface.c_str(), chain), in setInterfaceSharedQuota()
357 removeInterfaceSharedQuota(iface); in setInterfaceSharedQuota()
361 mSharedQuotaIfaces.insert(iface); in setInterfaceSharedQuota()
[all …]
DBandwidthControllerTest.cpp262 const std::vector<std::string> makeInterfaceQuotaCommands(const std::string& iface, int ruleIndex, in makeInterfaceQuotaCommands() argument
264 const std::string chain = "bw_costly_" + iface; in makeInterfaceQuotaCommands()
266 const char* c_iface = iface.c_str(); in makeInterfaceQuotaCommands()
282 const std::vector<std::string> removeInterfaceQuotaCommands(const std::string& iface) { in removeInterfaceQuotaCommands() argument
283 const std::string chain = "bw_costly_" + iface; in removeInterfaceQuotaCommands()
285 const char* c_iface = iface.c_str(); in removeInterfaceQuotaCommands()
301 const std::string iface = mTun.name(); in TEST_F() local
302 std::vector<std::string> expected = makeInterfaceQuotaCommands(iface, 1, kOldQuota); in TEST_F()
304 EXPECT_EQ(0, mBw.setInterfaceQuota(iface, kOldQuota)); in TEST_F()
310 EXPECT_EQ(0, mBw.setInterfaceQuota(iface, kNewQuota)); in TEST_F()
[all …]
DIdletimerController.cpp140 int IdletimerController::modifyInterfaceIdletimer(IptOp op, const char *iface, in modifyInterfaceIdletimer() argument
143 if (!isIfaceName(iface)) { in modifyInterfaceIdletimer()
152 addRemove, LOCAL_RAW_PREROUTING, iface, timeout, classLabel), in modifyInterfaceIdletimer()
156 addRemove, LOCAL_MANGLE_POSTROUTING, iface, timeout, classLabel), in modifyInterfaceIdletimer()
163 int IdletimerController::addInterfaceIdletimer(const char *iface, in addInterfaceIdletimer() argument
166 return modifyInterfaceIdletimer(IptOpAdd, iface, timeout, classLabel); in addInterfaceIdletimer()
169 int IdletimerController::removeInterfaceIdletimer(const char *iface, in removeInterfaceIdletimer() argument
172 return modifyInterfaceIdletimer(IptOpDelete, iface, timeout, classLabel); in removeInterfaceIdletimer()
DNetlinkHandler.cpp109 const char *iface = evt->findParam("INTERFACE") ?: ""; in onEvent() local
111 notifyInterfaceAdded(iface); in onEvent()
113 notifyInterfaceRemoved(iface); in onEvent()
118 notifyInterfaceLinkChanged(iface, true); in onEvent()
120 notifyInterfaceLinkChanged(iface, false); in onEvent()
136 ALOGE("invalid interface index: %s(%s)", iface, ifIndex); in onEvent()
160 if (iface && iface[0] && address && flags && scope) { in onEvent()
162 notifyAddressUpdated(address, iface, std::stoi(flags), std::stoi(scope)); in onEvent()
164 notifyAddressRemoved(address, iface, std::stoi(flags), std::stoi(scope)); in onEvent()
171 notifyInterfaceDnsServers(iface, strtol(lifetime, nullptr, 10), in onEvent()
[all …]
DFirewallController.cpp121 int FirewallController::setInterfaceRule(const char* iface, FirewallRule rule) { in setInterfaceRule() argument
127 if (!isIfaceName(iface)) { in setInterfaceRule()
136 if (rule == ALLOW && mIfaceRules.find(iface) == mIfaceRules.end()) { in setInterfaceRule()
138 mIfaceRules.insert(iface); in setInterfaceRule()
139 } else if (rule == DENY && mIfaceRules.find(iface) != mIfaceRules.end()) { in setInterfaceRule()
141 mIfaceRules.erase(iface); in setInterfaceRule()
148 StringPrintf("%s fw_INPUT -i %s -j RETURN", op, iface), in setInterfaceRule()
149 StringPrintf("%s fw_OUTPUT -o %s -j RETURN", op, iface), in setInterfaceRule()
DBandwidthController.h40 int setInterfaceSharedQuota(const std::string& iface, int64_t bytes);
42 int removeInterfaceSharedQuota(const std::string& iface);
44 int setInterfaceQuota(const std::string& iface, int64_t bytes);
45 int getInterfaceQuota(const std::string& iface, int64_t* bytes);
46 int removeInterfaceQuota(const std::string& iface);
61 int setInterfaceAlert(const std::string& iface, int64_t bytes);
62 int removeInterfaceAlert(const std::string& iface);
DRouteControllerTest.cpp52 uint32_t static fakeIfaceNameToIndexFunction(const char* iface) { in fakeIfaceNameToIndexFunction() argument
54 if (!strcmp(iface, "lo")) return LOOPBACK_IFINDEX; in fakeIfaceNameToIndexFunction()
55 if (!strcmp(iface, TEST_IFACE1)) return TEST_IFACE1_INDEX; in fakeIfaceNameToIndexFunction()
56 if (!strcmp(iface, TEST_IFACE2)) return TEST_IFACE2_INDEX; in fakeIfaceNameToIndexFunction()
135 bool hasLocalInterfaceInRouteTable(const char* iface) { in hasLocalInterfaceInRouteTable() argument
138 RouteController::ifNameToIndexFunction(iface)); in hasLocalInterfaceInRouteTable()
140 index + " " + std::string(iface) + std::string(RouteController::INTERFACE_LOCAL_SUFFIX); in hasLocalInterfaceInRouteTable()
DIdletimerController.h29 int addInterfaceIdletimer(const char *iface, uint32_t timeout,
31 int removeInterfaceIdletimer(const char *iface, uint32_t timeout,
42 int modifyInterfaceIdletimer(IptOp op, const char *iface, uint32_t timeout,
/system/tools/hidl/lint/lints/
Doneway.cpp39 static InterfaceMethodType getInterfaceOnewayType(const Interface& iface, in getInterfaceOnewayType() argument
43 const std::vector<Method*>& methods = iface.userDefinedMethods(); in getInterfaceOnewayType()
45 return (iface.superType() != nullptr && includeParentMethods) in getInterfaceOnewayType()
46 ? getInterfaceOnewayType(*iface.superType(), true) in getInterfaceOnewayType()
63 onewayType = onewayType | getInterfaceOnewayType(*iface.superType(), true); in getInterfaceOnewayType()
67 << iface.location(); in getInterfaceOnewayType()
73 const Interface* iface = ast.getInterface(); in onewayLint() local
74 if (iface == nullptr) { in onewayLint()
79 InterfaceMethodType ifaceType = getInterfaceOnewayType(*iface, false); in onewayLint()
92 errors->push_back(Lint(WARNING, iface->location()) in onewayLint()
[all …]
/system/libhidl/transport/
DHidlPassthroughSupport.cpp30 static sp<IBase> tryWrap(const std::string& descriptor, sp<IBase> iface) { in tryWrap() argument
33 return func(static_cast<void*>(iface.get())); in tryWrap()
38 sp<IBase> wrapPassthroughInternal(sp<IBase> iface) { in wrapPassthroughInternal() argument
39 if (iface == nullptr || iface->isRemote()) { in wrapPassthroughInternal()
41 return iface; in wrapPassthroughInternal()
54 auto ret = iface->interfaceChain([&](const auto& types) { in wrapPassthroughInternal()
56 base = tryWrap(descriptor, iface); in wrapPassthroughInternal()
/system/tools/hidl/
DgenerateCpp.cpp219 const Interface *iface = getInterface(); in generateInterfaceHeader() local
220 std::string ifaceName = iface ? iface->definedName() : "types"; in generateInterfaceHeader()
234 if (iface) { in generateInterfaceHeader()
245 if (iface) { in generateInterfaceHeader()
255 if (iface) { in generateInterfaceHeader()
256 iface->emitDocComment(out); in generateInterfaceHeader()
261 const Interface *superType = iface->superType(); in generateInterfaceHeader()
279 DocComment("Fully qualified interface name: \"" + iface->fqName().string() + "\"", in generateInterfaceHeader()
284 iface->emitTypeDeclarations(out); in generateInterfaceHeader()
289 if (iface) { in generateInterfaceHeader()
[all …]
DgenerateVts.cpp34 const Interface* iface = mRootScope.getInterface(); in emitVtsTypeDeclarations() local
35 return iface->emitVtsAttributeDeclaration(out); in emitVtsTypeDeclarations()
53 const Interface *iface = AST::getInterface(); in generateVts() local
56 out << "component_name: \"" << (iface ? iface->definedName() : "types") << "\"\n\n"; in generateVts()
75 const Interface* iface = mRootScope.getInterface(); in generateVts() local
83 for (const Interface* superInterface : iface->superTypeChain()) { in generateVts()
87 iface->emitVtsMethodDeclaration(out, false /*isInhereted*/); in generateVts()
DgenerateCppImpl.cpp84 const Interface* iface = mRootScope.getInterface(); in generateCppImplHeader() local
85 const std::string baseName = iface->getBaseName(); in generateCppImplHeader()
90 generateCppPackageInclude(out, mPackage, iface->definedName()); in generateCppImplHeader()
108 out << "struct " << baseName << " : public " << iface->fqName().sanitizedVersion() in generateCppImplHeader()
109 << "::" << iface->definedName() << " {\n"; in generateCppImplHeader()
128 << "// extern \"C\" " << iface->definedName() << "* "; in generateCppImplHeader()
129 generateFetchSymbol(out, iface->definedName()); in generateCppImplHeader()
141 const Interface* iface = mRootScope.getInterface(); in generateCppImplSource() local
142 const std::string baseName = iface->getBaseName(); in generateCppImplSource()
155 out << iface->definedName() << "* "; in generateCppImplSource()
[all …]
DgenerateJavaImpl.cpp28 const Interface* iface = mRootScope.getInterface(); in generateJavaImpl() local
29 const std::string baseName = iface->getBaseName(); in generateJavaImpl()
34 out << "import " << mPackage.javaPackage() << "." << iface->definedName() << ";\n\n"; in generateJavaImpl()
36 out << "class " << baseName << " extends " << iface->definedName() << ".Stub" in generateJavaImpl()
41 for (const auto& tuple : iface->allMethodsFromRoot()) { in generateJavaImpl()
DgenerateInheritanceHierarchy.cpp38 for (const Interface* iface : mRootScope.getInterface()->superTypeChain()) { in generateInheritanceHierarchy() local
39 if (iface->isIBase()) break; in generateInheritanceHierarchy()
40 inheritedInterfaces.append(iface->fqName().string()); in generateInheritanceHierarchy()
/system/libhwbinder/
DIInterface.cpp34 sp<IBinder> IInterface::asBinder(const IInterface* iface) in asBinder() argument
36 if (iface == nullptr) return nullptr; in asBinder()
37 return const_cast<IInterface*>(iface)->onAsBinder(); in asBinder()
41 sp<IBinder> IInterface::asBinder(const sp<IInterface>& iface) in asBinder() argument
43 if (iface == nullptr) return nullptr; in asBinder()
44 return iface->onAsBinder(); in asBinder()
/system/tools/hidl/hidl2aidl/
DAidlInterface.cpp42 const Interface& iface) { in emitAidlMethodParams() argument
51 prefix + AidlHelper::getAidlType(*arg->get(), iface.fqName()) + " " + arg->name(); in emitAidlMethodParams()
67 for (const Interface* iface : interface.typeChain()) { in getUserDefinedMethods() local
68 if (!AidlHelper::shouldBeExpanded(interface.fqName(), iface->fqName()) && in getUserDefinedMethods()
69 iface->fqName() != gIBaseFqName) { in getUserDefinedMethods()
70 out << "// Types from " << iface->fqName().string() in getUserDefinedMethods()
76 const std::vector<Method*> userDefined = iface->userDefinedMethods(); in getUserDefinedMethods()
189 for (const Interface* iface : interface.typeChain()) { in emitAidl() local
190 if (!AidlHelper::shouldBeExpanded(interface.fqName(), iface->fqName())) { in emitAidl()
194 for (const Method* method : iface->userDefinedMethods()) { in emitAidl()
[all …]
/system/tools/aidl/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/
DArrayOfInterfaces.h73 …:android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>& iface, const ::android::…
89 …:android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>& iface, const ::android::…
103 …:android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>& iface, const ::android::… in methodWithInterfaces() argument
105 if (iface) { in methodWithInterfaces()
106 …id::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterfaceDelegator>::cast(delegate(iface)); in methodWithInterfaces()
119 ::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface> iface;
124 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) != std::tie(rhs.iface, r…
127 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) < std::tie(rhs.iface, rh…
130 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) <= std::tie(rhs.iface, r…
133 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) == std::tie(rhs.iface, r…
[all …]
DListOfInterfaces.h73 …::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>& iface, const ::android::…
89 …::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>& iface, const ::android::…
103 …::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>& iface, const ::android::… in methodWithInterfaces() argument
105 if (iface) { in methodWithInterfaces()
106 …oid::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterfaceDelegator>::cast(delegate(iface)); in methodWithInterfaces()
119 ::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface> iface;
124 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) != std::tie(rhs.iface, rhs…
127 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) < std::tie(rhs.iface, rhs.…
130 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) <= std::tie(rhs.iface, rhs…
133 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) == std::tie(rhs.iface, rhs…
[all …]
/system/tools/aidl/
Dgenerate_java_binder.cpp448 static std::shared_ptr<Method> GenerateInterfaceMethod(const AidlInterface& iface, in GenerateInterfaceMethod() argument
457 if (auto iface_annotation = JavaPermissionAnnotation(iface); iface_annotation) { in GenerateInterfaceMethod()
531 static void GeneratePermissionMethod(const AidlInterface& iface, const AidlMethod& method, in GeneratePermissionMethod() argument
536 if (auto ifacePermExpr = iface.EnforceExpression(); ifacePermExpr) { in GeneratePermissionMethod()
713 static void GenerateProxyMethod(CodeWriter& out, const AidlInterface& iface, in GenerateProxyMethod() argument
731 if (iface.IsSensitiveData()) { in GenerateProxyMethod()
766 if (iface.IsSensitiveData()) flags.push_back("android.os.IBinder.FLAG_CLEAR_BUF"); in GenerateProxyMethod()
787 if (iface.IsJavaDefault() || options.Version() > 0) { in GenerateProxyMethod()
791 if (iface.IsJavaDefault()) { in GenerateProxyMethod()
870 static void GenerateMethods(const AidlInterface& iface, const AidlMethod& method, Class* interface, in GenerateMethods() argument
[all …]
Dgenerate_rust.cpp171 void GenerateClientMethodHelpers(CodeWriter& out, const AidlInterface& iface, in GenerateClientMethodHelpers() argument
187 if (iface.IsSensitiveData()) { in GenerateClientMethodHelpers()
281 void GenerateClientMethod(CodeWriter& out, const AidlInterface& iface, const AidlMethod& method, in GenerateClientMethod() argument
343 if (iface.IsSensitiveData()) flags.push_back("binder::binder_impl::FLAG_CLEAR_BUF"); in GenerateClientMethod()
485 void GenerateServerItems(CodeWriter& out, const AidlInterface* iface, in GenerateServerItems() argument
487 auto trait_name = ClassName(*iface, cpp::ClassNames::INTERFACE); in GenerateServerItems()
488 auto server_name = ClassName(*iface, cpp::ClassNames::SERVER); in GenerateServerItems()
493 for (const auto& method : iface->GetMethods()) { in GenerateServerItems()
520 for (const auto& method : iface->GetMethods()) { in GenerateServerItems()
521 GenerateServerTransaction(out, *iface, *method, typenames); in GenerateServerItems()
[all …]
/system/libhidl/transport/include/hidl/
DHidlPassthroughSupport.h36 sp<::android::hidl::base::V1_0::IBase> iface);
44 sp<IType> wrapPassthrough(sp<IType> iface) { in wrapPassthrough() argument
45 return static_cast<IType*>(wrapPassthroughInternal(iface).get()); in wrapPassthrough()
/system/tools/aidl/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/
DListOfInterfaces.h119 std::shared_ptr<::aidl::android::aidl::tests::ListOfInterfaces::IEmptyInterface> iface; variable
128 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) != std::tie(rhs.iface, rhs…
131 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) < std::tie(rhs.iface, rhs.…
134 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) <= std::tie(rhs.iface, rhs…
137 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) == std::tie(rhs.iface, rhs…
140 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) > std::tie(rhs.iface, rhs.…
143 …return std::tie(iface, nullable_iface, iface_list, nullable_iface_list) >= std::tie(rhs.iface, rhs…
150 os << "iface: " << ::android::internal::ToString(iface); in toString()
164 iface = 0, enumerator
171 static const inline Tag iface = Tag::iface; variable
[all …]
DArrayOfInterfaces.h119 std::shared_ptr<::aidl::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface> iface; variable
128 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) != std::tie(rhs.iface, r…
131 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) < std::tie(rhs.iface, rh…
134 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) <= std::tie(rhs.iface, r…
137 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) == std::tie(rhs.iface, r…
140 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) > std::tie(rhs.iface, rh…
143 …return std::tie(iface, nullable_iface, iface_array, nullable_iface_array) >= std::tie(rhs.iface, r…
150 os << "iface: " << ::android::internal::ToString(iface); in toString()
164 iface = 0, enumerator
171 static const inline Tag iface = Tag::iface; variable
[all …]
/system/tools/hidl/metadata/
Dtest.cpp40 for (const std::string& iface : {"hidl.metadata.test@1.0::IBar", "hidl.metadata.test@1.0::IBaz", in TEST()
42 const auto& info = metadataForModule(iface); in TEST()
43 ASSERT_NE(info, std::nullopt) << iface; in TEST()

1234