Lines Matching refs:action
136 static const char* actionName(uint16_t action) { in actionName() argument
138 return ops[action % 4]; in actionName()
261 [[nodiscard]] static int modifyIpRule(uint16_t action, uint32_t priority, uint8_t ruleType, in modifyIpRule() argument
293 .action = ruleType, in modifyIpRule()
301 if (table == RT_TABLE_UNSPEC && rule.action == FR_ACT_TO_TBL && action != RTM_DELRULE) { in modifyIpRule()
331 uint16_t flags = (action == RTM_NEWRULE) ? NETLINK_RULE_CREATE_FLAGS : NETLINK_REQUEST_FLAGS; in modifyIpRule()
334 if (int ret = sendNetlinkRequest(action, flags, iov, ARRAY_SIZE(iov), nullptr)) { in modifyIpRule()
335 if (!(action == RTM_DELRULE && ret == -ENOENT && priority == RULE_PRIORITY_TETHERING)) { in modifyIpRule()
338 ALOGE("Error %s %s rule: %s", actionName(action), familyName(rule.family), in modifyIpRule()
348 [[nodiscard]] static int modifyIpRule(uint16_t action, uint32_t priority, uint32_t table, in modifyIpRule() argument
351 return modifyIpRule(action, priority, FR_ACT_TO_TBL, table, fwmark, mask, iif, oif, uidStart, in modifyIpRule()
355 [[nodiscard]] static int modifyIpRule(uint16_t action, uint32_t priority, uint32_t table, in modifyIpRule() argument
357 return modifyIpRule(action, priority, table, fwmark, mask, IIF_NONE, OIF_NONE, INVALID_UID, in modifyIpRule()
363 int modifyIpRoute(uint16_t action, uint16_t flags, uint32_t table, const char* interface, in modifyIpRoute() argument
457 int ret = sendNetlinkRequest(action, flags, iov, ARRAY_SIZE(iov), nullptr); in modifyIpRoute()
460 actionName(action), destination, nexthop, interface, table, strerror(-ret)); in modifyIpRoute()
635 int RouteController::modifyVpnFallthroughRule(uint16_t action, unsigned vpnNetId, in modifyVpnFallthroughRule() argument
652 return modifyIpRule(action, RULE_PRIORITY_VPN_FALLTHROUGH, table, fwmark.intValue, in modifyVpnFallthroughRule()
853 int RouteController::modifyDefaultNetwork(uint16_t action, const char* interface, in modifyDefaultNetwork() argument
869 return modifyIpRule(action, RULE_PRIORITY_DEFAULT_NETWORK, table, fwmark.intValue, in modifyDefaultNetwork()
873 int RouteController::modifyTetheredNetwork(uint16_t action, const char* inputInterface, in modifyTetheredNetwork() argument
880 return modifyIpRule(action, RULE_PRIORITY_TETHERING, table, MARK_UNSET, MARK_UNSET, in modifyTetheredNetwork()
886 int RouteController::modifyRoute(uint16_t action, uint16_t flags, const char* interface, in modifyRoute() argument
912 int ret = modifyIpRoute(action, flags, table, interface, destination, nexthop, mtu); in modifyRoute()
914 if (ret && !(action == RTM_NEWROUTE && ret == -EEXIST)) { in modifyRoute()