Lines Matching refs:table
202 void addTableName(uint32_t table, const std::string& name, std::string* contents) { in addTableName() argument
204 snprintf(tableString, sizeof(tableString), "%u", table); in addTableName()
262 uint32_t table, uint32_t fwmark, uint32_t mask, in modifyIpRule() argument
301 if (table == RT_TABLE_UNSPEC && rule.action == FR_ACT_TO_TBL && action != RTM_DELRULE) { in modifyIpRule()
315 { &FRATTR_TABLE, table != RT_TABLE_UNSPEC ? sizeof(FRATTR_TABLE) : 0 }, in modifyIpRule()
316 { &table, table != RT_TABLE_UNSPEC ? sizeof(table) : 0 }, 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
437 { &table, sizeof(table) }, in modifyIpRoute()
460 actionName(action), destination, nexthop, interface, table, strerror(-ret)); in modifyIpRoute()
509 [[nodiscard]] static int modifyVpnUidRangeRule(uint32_t table, uid_t uidStart, uid_t uidEnd, in modifyVpnUidRangeRule() argument
528 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue, in modifyVpnUidRangeRule()
537 [[nodiscard]] static int modifyVpnSystemPermissionRule(unsigned netId, uint32_t table, bool secure, in modifyVpnSystemPermissionRule() argument
550 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue, in modifyVpnSystemPermissionRule()
561 [[nodiscard]] static int modifyExplicitNetworkRule(unsigned netId, uint32_t table, in modifyExplicitNetworkRule() argument
576 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_EXPLICIT_NETWORK, table, in modifyExplicitNetworkRule()
584 [[nodiscard]] static int modifyOutputInterfaceRules(const char* interface, uint32_t table, in modifyOutputInterfaceRules() argument
598 table, FWMARK_NONE, MASK_NONE, IIF_LOOPBACK, interface, in modifyOutputInterfaceRules()
604 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_OUTPUT_INTERFACE, table, in modifyOutputInterfaceRules()
613 [[nodiscard]] static int modifyImplicitNetworkRule(unsigned netId, uint32_t table, bool add) { in modifyImplicitNetworkRule() argument
626 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_IMPLICIT_NETWORK, table, in modifyImplicitNetworkRule()
638 uint32_t table = getRouteTableForInterface(physicalInterface); in modifyVpnFallthroughRule() local
639 if (table == RT_TABLE_UNSPEC) { in modifyVpnFallthroughRule()
652 return modifyIpRule(action, RULE_PRIORITY_VPN_FALLTHROUGH, table, fwmark.intValue, in modifyVpnFallthroughRule()
702 uint32_t table = getRouteTableForInterface(interface); in configureDummyNetwork() local
703 if (table == RT_TABLE_UNSPEC) { in configureDummyNetwork()
716 if ((ret = modifyOutputInterfaceRules(interface, table, PERMISSION_NONE, in configureDummyNetwork()
722 if ((ret = modifyIpRoute(RTM_NEWROUTE, NETLINK_ROUTE_CREATE_FLAGS, table, interface, in configureDummyNetwork()
727 if ((ret = modifyIpRoute(RTM_NEWROUTE, NETLINK_ROUTE_CREATE_FLAGS, table, interface, "::/0", in configureDummyNetwork()
755 uint32_t table = getRouteTableForInterface(interface); in modifyPhysicalNetwork() local
756 if (table == RT_TABLE_UNSPEC) { in modifyPhysicalNetwork()
763 if (int ret = modifyExplicitNetworkRule(netId, table, permission, INVALID_UID, INVALID_UID, in modifyPhysicalNetwork()
767 if (int ret = modifyOutputInterfaceRules(interface, table, permission, INVALID_UID, INVALID_UID, in modifyPhysicalNetwork()
793 return modifyImplicitNetworkRule(netId, table, add); in modifyPhysicalNetwork()
818 uint32_t table = getRouteTableForInterface(interface); in modifyVirtualNetwork() local
819 if (table == RT_TABLE_UNSPEC) { in modifyVirtualNetwork()
824 if (int ret = modifyVpnUidRangeRule(table, range.start, range.stop, secure, add)) { in modifyVirtualNetwork()
827 if (int ret = modifyExplicitNetworkRule(netId, table, PERMISSION_NONE, range.start, in modifyVirtualNetwork()
831 if (int ret = modifyOutputInterfaceRules(interface, table, PERMISSION_NONE, range.start, in modifyVirtualNetwork()
844 if (int ret = modifyVpnSystemPermissionRule(netId, table, secure, add)) { in modifyVirtualNetwork()
847 return modifyExplicitNetworkRule(netId, table, PERMISSION_NONE, UID_ROOT, UID_ROOT, add); in modifyVirtualNetwork()
855 uint32_t table = getRouteTableForInterface(interface); in modifyDefaultNetwork() local
856 if (table == RT_TABLE_UNSPEC) { in modifyDefaultNetwork()
869 return modifyIpRule(action, RULE_PRIORITY_DEFAULT_NETWORK, table, fwmark.intValue, in modifyDefaultNetwork()
875 uint32_t table = getRouteTableForInterface(outputInterface); in modifyTetheredNetwork() local
876 if (table == RT_TABLE_UNSPEC) { in modifyTetheredNetwork()
880 return modifyIpRule(action, RULE_PRIORITY_TETHERING, table, MARK_UNSET, MARK_UNSET, in modifyTetheredNetwork()
889 uint32_t table; in modifyRoute() local
892 table = getRouteTableForInterface(interface); in modifyRoute()
893 if (table == RT_TABLE_UNSPEC) { in modifyRoute()
899 table = ROUTE_TABLE_LOCAL_NETWORK; in modifyRoute()
903 table = ROUTE_TABLE_LEGACY_NETWORK; in modifyRoute()
907 table = ROUTE_TABLE_LEGACY_SYSTEM; in modifyRoute()
912 int ret = modifyIpRoute(action, flags, table, interface, destination, nexthop, mtu); in modifyRoute()
983 int RouteController::flushRoutes(uint32_t table) { in flushRoutes() argument
984 NetlinkDumpFilter shouldDelete = [table] (nlmsghdr *nlh) { in flushRoutes()
985 return getRouteTable(nlh) == table; in flushRoutes()
995 uint32_t table = getRouteTableForInterfaceLocked(interface); in flushRoutes() local
996 if (table == RT_TABLE_UNSPEC) { in flushRoutes()
1000 int ret = flushRoutes(table); in flushRoutes()