Home | History | Annotate | Download | only in server

Lines Matching refs:interface

30 WARN_UNUSED_RESULT int addToDefault(unsigned netId, const std::string& interface,
32 if (int ret = RouteController::addInterfaceToDefaultNetwork(interface.c_str(), permission)) {
33 ALOGE("failed to add interface %s to default netId %u", interface.c_str(), netId);
36 if (int ret = delegate->addFallthrough(interface, permission)) {
42 WARN_UNUSED_RESULT int removeFromDefault(unsigned netId, const std::string& interface,
45 if (int ret = RouteController::removeInterfaceFromDefaultNetwork(interface.c_str(),
47 ALOGE("failed to remove interface %s from default netId %u", interface.c_str(), netId);
50 if (int ret = delegate->removeFallthrough(interface, permission)) {
89 void PhysicalNetwork::invalidateRouteCache(const std::string& interface) {
94 (void) RouteController::addRoute(interface.c_str(), dst, "throw",
95 RouteController::INTERFACE);
96 (void) RouteController::removeRoute(interface.c_str(), dst, "throw",
97 RouteController::INTERFACE);
111 for (const std::string& interface : mInterfaces) {
112 if (int ret = RouteController::modifyPhysicalNetworkPermission(mNetId, interface.c_str(),
114 ALOGE("failed to change permission on interface %s of netId %u from %x to %x",
115 interface.c_str(), mNetId, mPermission, permission);
118 invalidateRouteCache(interface);
121 for (const std::string& interface : mInterfaces) {
122 if (int ret = addToDefault(mNetId, interface, permission, mDelegate)) {
125 if (int ret = removeFromDefault(mNetId, interface, mPermission, mDelegate)) {
142 for (const std::string& interface : mInterfaces) {
143 if (int ret = addToDefault(mNetId, interface, mPermission, mDelegate)) {
155 for (const std::string& interface : mInterfaces) {
156 if (int ret = removeFromDefault(mNetId, interface, mPermission, mDelegate)) {
168 int PhysicalNetwork::addInterface(const std::string& interface) {
169 if (hasInterface(interface)) {
172 if (int ret = RouteController::addInterfaceToPhysicalNetwork(mNetId, interface.c_str(),
174 ALOGE("failed to add interface %s to netId %u", interface.c_str(), mNetId);
178 if (int ret = addToDefault(mNetId, interface, mPermission, mDelegate)) {
182 mInterfaces.insert(interface);
186 int PhysicalNetwork::removeInterface(const std::string& interface) {
187 if (!hasInterface(interface)) {
191 if (int ret = removeFromDefault(mNetId, interface, mPermission, mDelegate)) {
195 // This step will flush the interface index from the cache in RouteController so it must be
196 // done last as further requests to the RouteController regarding this interface will fail
197 // to find the interface index in the cache in cases where the interface is already gone
199 if (int ret = RouteController::removeInterfaceFromPhysicalNetwork(mNetId, interface.c_str(),
201 ALOGE("failed to remove interface %s from netId %u", interface.c_str(), mNetId);
204 mInterfaces.erase(interface);