Home | History | Annotate | Download | only in server

Lines Matching refs:table

139 void addTableName(uint32_t table, const std::string& name, std::string* contents) {
141 snprintf(tableString, sizeof(tableString), "%u", table);
246 // + If |table| is non-zero, the rule points at the specified routing table. Otherwise, the rule
256 WARN_UNUSED_RESULT int modifyIpRule(uint16_t action, uint32_t priority, uint32_t table,
286 .action = static_cast<uint8_t>(table != RT_TABLE_UNSPEC ? FR_ACT_TO_TBL :
298 { &FRATTR_TABLE, table != RT_TABLE_UNSPEC ? sizeof(FRATTR_TABLE) : 0 },
299 { &table, table != RT_TABLE_UNSPEC ? sizeof(table) : 0 },
327 WARN_UNUSED_RESULT int modifyIpRule(uint16_t action, uint32_t priority, uint32_t table,
329 return modifyIpRule(action, priority, table, fwmark, mask, IIF_NONE, OIF_NONE, INVALID_UID,
335 WARN_UNUSED_RESULT int modifyIpRoute(uint16_t action, uint32_t table, const char* interface,
366 // the table number. But it's an error to specify an interface ("dev ...") or a nexthop for
407 { &table, sizeof(table) },
464 WARN_UNUSED_RESULT int modifyVpnUidRangeRule(uint32_t table, uid_t uidStart, uid_t uidEnd,
483 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue,
492 WARN_UNUSED_RESULT int modifyVpnSystemPermissionRule(unsigned netId, uint32_t table, bool secure,
505 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, priority, table, fwmark.intValue,
516 WARN_UNUSED_RESULT int modifyExplicitNetworkRule(unsigned netId, uint32_t table,
531 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_EXPLICIT_NETWORK, table,
539 WARN_UNUSED_RESULT int modifyOutputInterfaceRule(const char* interface, uint32_t table,
548 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_OUTPUT_INTERFACE, table,
557 WARN_UNUSED_RESULT int modifyImplicitNetworkRule(unsigned netId, uint32_t table,
571 return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_IMPLICIT_NETWORK, table,
577 // If a packet with a VPN's netId doesn't find a route in the VPN's routing table, it's allowed to
583 uint32_t table = getRouteTableForInterface(physicalInterface);
584 if (table == RT_TABLE_UNSPEC) {
600 return modifyIpRule(action, RULE_PRIORITY_VPN_FALLTHROUGH, table, fwmark.intValue,
647 // Add a new rule to look up the 'main' table, with the same selectors as the "default network"
648 // rule, but with a lower priority. We will never create routes in the main table; it should only be
682 uint32_t table = getRouteTableForInterface(interface);
683 if (table == RT_TABLE_UNSPEC) {
690 if (int ret = modifyExplicitNetworkRule(netId, table, permission, INVALID_UID, INVALID_UID,
694 if (int ret = modifyOutputInterfaceRule(interface, table, permission, INVALID_UID, INVALID_UID,
698 return modifyImplicitNetworkRule(netId, table, permission, add);
704 uint32_t table = getRouteTableForInterface(interface);
705 if (table == RT_TABLE_UNSPEC) {
710 if (int ret = modifyVpnUidRangeRule(table, range.first, range.second, secure, add)) {
713 if (int ret = modifyExplicitNetworkRule(netId, table, PERMISSION_NONE, range.first,
717 if (int ret = modifyOutputInterfaceRule(interface, table, PERMISSION_NONE, range.first,
730 if (int ret = modifyVpnSystemPermissionRule(netId, table, secure, add)) {
733 return modifyExplicitNetworkRule(netId, table, PERMISSION_NONE, UID_ROOT, UID_ROOT, add);
741 uint32_t table = getRouteTableForInterface(interface);
742 if (table == RT_TABLE_UNSPEC) {
755 return modifyIpRule(action, RULE_PRIORITY_DEFAULT_NETWORK, table, fwmark.intValue,
761 uint32_t table = getRouteTableForInterface(outputInterface);
762 if (table == RT_TABLE_UNSPEC) {
766 return modifyIpRule(action, RULE_PRIORITY_TETHERING, table, MARK_UNSET, MARK_UNSET,
787 // Adds or removes an IPv4 or IPv6 route to the specified table and, if it's a directly-connected
788 // route, to the main table as well.
792 uint32_t table;
795 table = getRouteTableForInterface(interface);
796 if (table == RT_TABLE_UNSPEC) {
802 table = ROUTE_TABLE_LOCAL_NETWORK;
806 table = ROUTE_TABLE_LEGACY_NETWORK;
810 table = ROUTE_TABLE_LEGACY_SYSTEM;
815 int ret = modifyIpRoute(action, table, interface, destination, nexthop);
829 uint32_t table = getRouteTableForInterface(interface);
830 if (table == RT_TABLE_UNSPEC) {
835 snprintf(tableString, sizeof(tableString), "%u", table);
844 "table",
862 ALOGE("failed to flush %s routes in table %s after %d attempts",