/system/netd/server/ |
D | FwmarkServer.cpp | 164 Fwmark fwmark; in processClient() local 165 socklen_t fwmarkLen = sizeof(fwmark.intValue); in processClient() 166 if (getsockopt(*socketFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen) == -1) { in processClient() 174 permission = static_cast<Permission>(permission | fwmark.permission); in processClient() 212 if (!fwmark.explicitlySelected) { in processClient() 213 if (!fwmark.protectedFromVpn) { in processClient() 214 fwmark.netId = mNetworkController->getNetworkForConnect(client->getUid()); in processClient() 215 } else if (!mNetworkController->isVirtualNetwork(fwmark.netId)) { in processClient() 216 fwmark.netId = mNetworkController->getDefaultNetwork(); in processClient() 245 netdEventListener->onConnectEvent(fwmark.netId, connectInfo.error, in processClient() [all …]
|
D | RouteController.cpp | 247 uint32_t table, uint32_t fwmark, uint32_t mask, in modifyIpRule() argument 251 if (fwmark & ~mask) { in modifyIpRule() 252 ALOGE("mask 0x%x does not select all the bits set in fwmark 0x%x", mask, fwmark); in modifyIpRule() 303 { &fwmark, mask ? sizeof(fwmark) : 0 }, in modifyIpRule() 334 uint32_t fwmark, uint32_t mask, const char* iif, in modifyIpRule() argument 336 return modifyIpRule(action, priority, FR_ACT_TO_TBL, table, fwmark, mask, iif, oif, uidStart, in modifyIpRule() 341 uint32_t fwmark, uint32_t mask) { in modifyIpRule() argument 342 return modifyIpRule(action, priority, table, fwmark, mask, IIF_NONE, OIF_NONE, INVALID_UID, in modifyIpRule() 459 Fwmark fwmark; in modifyIncomingPacketMark() local 461 fwmark.netId = netId; in modifyIncomingPacketMark() [all …]
|
D | NetdHwService.cpp | 71 Fwmark fwmark; in createOemNetwork() local 72 fwmark.netId = netId; in createOemNetwork() 73 fwmark.explicitlySelected = true; in createOemNetwork() 74 fwmark.protectedFromVpn = true; in createOemNetwork() 75 fwmark.permission = PERMISSION_SYSTEM; in createOemNetwork() 76 _hidl_cb(netIdToNetHandle(netId), fwmark.intValue, toHalStatus(ret)); in createOemNetwork()
|
D | NetworkController.cpp | 208 Fwmark fwmark; in getNetworkForDnsLocked() local 209 fwmark.protectedFromVpn = true; in getNetworkForDnsLocked() 210 fwmark.permission = PERMISSION_SYSTEM; in getNetworkForDnsLocked() 222 fwmark.netId = *netId; in getNetworkForDnsLocked() 223 fwmark.explicitlySelected = true; in getNetworkForDnsLocked() 224 return fwmark.intValue; in getNetworkForDnsLocked() 231 fwmark.explicitlySelected = true; in getNetworkForDnsLocked() 254 fwmark.netId = *netId; in getNetworkForDnsLocked() 255 return fwmark.intValue; in getNetworkForDnsLocked() 340 Fwmark fwmark; in getNetworkContext() local [all …]
|
D | TetherController.cpp | 227 Fwmark fwmark; in startTethering() local 228 fwmark.netId = NetworkController::LOCAL_NET_ID; in startTethering() 229 fwmark.explicitlySelected = true; in startTethering() 230 fwmark.protectedFromVpn = true; in startTethering() 231 fwmark.permission = PERMISSION_SYSTEM; in startTethering() 233 snprintf(markStr, sizeof(markStr), "0x%x", fwmark.intValue); in startTethering() 374 Fwmark fwmark; in setDnsForwarders() local 375 fwmark.netId = netId; in setDnsForwarders() 376 fwmark.explicitlySelected = true; in setDnsForwarders() 377 fwmark.protectedFromVpn = true; in setDnsForwarders() [all …]
|
D | SockDiagTest.cpp | 357 Fwmark fwmark; in modifySocketForTest() local 358 fwmark.netId = permissionTestcases[i].netId; in modifySocketForTest() 359 fwmark.explicitlySelected = permissionTestcases[i].explicitlySelected; in modifySocketForTest() 360 fwmark.permission = permissionTestcases[i].permission; in modifySocketForTest() 361 return setsockopt(s, SOL_SOCKET, SO_MARK, &fwmark.intValue, sizeof(fwmark.intValue)); in modifySocketForTest()
|
D | ClatdController.cpp | 379 fwmark.netId = networkId; in init() 380 fwmark.explicitlySelected = true; in init() 381 fwmark.protectedFromVpn = true; in init() 382 fwmark.permission = PERMISSION_SYSTEM; in init() 384 snprintf(fwmarkString, sizeof(fwmarkString), "0x%x", fwmark.intValue); in init()
|
D | ClatdController.h | 64 Fwmark fwmark; member
|
D | XfrmControllerTest.cpp | 438 Fwmark fwmark; in testIpSecAddSecurityAssociation() local 439 fwmark.intValue = outputmark.outputMark; in testIpSecAddSecurityAssociation() 440 EXPECT_EQ(testOutputNetid, fwmark.netId); in testIpSecAddSecurityAssociation() 441 EXPECT_EQ(PERMISSION_SYSTEM, fwmark.permission); in testIpSecAddSecurityAssociation() 442 EXPECT_TRUE(fwmark.explicitlySelected); in testIpSecAddSecurityAssociation() 443 EXPECT_TRUE(fwmark.protectedFromVpn); in testIpSecAddSecurityAssociation()
|
D | XfrmController.cpp | 1395 Fwmark fwmark; in fillNlAttrXfrmOutputMark() local 1399 fwmark.netId = record.netId; in fillNlAttrXfrmOutputMark() 1400 fwmark.permission = PERMISSION_SYSTEM; in fillNlAttrXfrmOutputMark() 1401 fwmark.explicitlySelected = true; in fillNlAttrXfrmOutputMark() 1402 fwmark.protectedFromVpn = true; in fillNlAttrXfrmOutputMark() 1408 output_mark->outputMark = fwmark.intValue; in fillNlAttrXfrmOutputMark()
|
D | NetdNativeService.cpp | 1287 Fwmark fwmark; in getFwmarkForNetwork() local 1288 fwmark.netId = netId; in getFwmarkForNetwork() 1290 markMask->mark = fwmark.intValue; in getFwmarkForNetwork()
|
/system/hardware/interfaces/net/netd/testutils/ |
D | VtsHalNetNetdTestUtils.cpp | 89 int countRulesForFwmark(const uint32_t fwmark) { in countRulesForFwmark() argument 92 StringPrintf("from all fwmark 0x(%x|[0-9a-f]+%04x)/.* lookup ", fwmark, fwmark); in countRulesForFwmark()
|
D | VtsHalNetNetdTestUtils.h | 42 int countRulesForFwmark(const uint32_t fwmark);
|
/system/netd/tests/ |
D | binder_test.cpp | 303 Fwmark fwmark; in testNetworkExistsButCannotConnect() local 304 fwmark.explicitlySelected = true; in testNetworkExistsButCannotConnect() 305 fwmark.netId = netId; in testNetworkExistsButCannotConnect() 306 EXPECT_EQ(0, setsockopt(s, SOL_SOCKET, SO_MARK, &fwmark.intValue, sizeof(fwmark.intValue))); in testNetworkExistsButCannotConnect() 3337 bool sendIPv6PacketFromUid(uid_t uid, const in6_addr& dstAddr, Fwmark* fwmark, int tunFd, in sendIPv6PacketFromUid() argument 3350 socklen_t fwmarkLen = sizeof(fwmark->intValue); in sendIPv6PacketFromUid() 3351 EXPECT_NE(-1, getsockopt(testSocket, SOL_SOCKET, SO_MARK, &(fwmark->intValue), &fwmarkLen)); in sendIPv6PacketFromUid() 3366 bool sendIPv6PacketFromUidFail(uid_t uid, const in6_addr& dstAddr, Fwmark* fwmark, bool doConnect, in sendIPv6PacketFromUidFail() argument 3382 socklen_t fwmarkLen = sizeof(fwmark->intValue); in sendIPv6PacketFromUidFail() 3383 EXPECT_NE(-1, getsockopt(s, SOL_SOCKET, SO_MARK, &(fwmark->intValue), &fwmarkLen)); in sendIPv6PacketFromUidFail() [all …]
|
/system/netd/client/ |
D | NetdClient.cpp | 463 Fwmark fwmark; in getNetworkForSocket() local 464 socklen_t fwmarkLen = sizeof(fwmark.intValue); in getNetworkForSocket() 465 if (getsockopt(socketFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen) == -1) { in getNetworkForSocket() 468 *netId = fwmark.netId; in getNetworkForSocket()
|
/system/core/rootdir/ |
D | init.rc | 306 # reflect fwmark from incoming packets onto generated replies 310 # set fwmark on accepted sockets
|