Lines Matching refs:fwmark
3329 bool sendIPv6PacketFromUid(uid_t uid, const in6_addr& dstAddr, Fwmark* fwmark, int tunFd) { in sendIPv6PacketFromUid() argument
3340 socklen_t fwmarkLen = sizeof(fwmark->intValue); in sendIPv6PacketFromUid()
3341 EXPECT_NE(-1, getsockopt(testSocket, SOL_SOCKET, SO_MARK, &(fwmark->intValue), &fwmarkLen)); in sendIPv6PacketFromUid()
3381 Fwmark fwmark; in expectVpnFallthroughWorks() local
3382 EXPECT_FALSE(sendIPv6PacketFromUid(0, outsideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3383 EXPECT_FALSE(sendIPv6PacketFromUid(0, insideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3389 EXPECT_TRUE(sendIPv6PacketFromUid(0, outsideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3390 EXPECT_EQ(fallthroughNetId | 0xC0000, static_cast<int>(fwmark.intValue)); in expectVpnFallthroughWorks()
3391 EXPECT_TRUE(sendIPv6PacketFromUid(0, insideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3392 EXPECT_EQ(fallthroughNetId | 0xC0000, static_cast<int>(fwmark.intValue)); in expectVpnFallthroughWorks()
3399 EXPECT_TRUE(sendIPv6PacketFromUid(uid, outsideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3400 EXPECT_EQ(bypassable ? vpnNetId : fallthroughNetId, static_cast<int>(fwmark.intValue)); in expectVpnFallthroughWorks()
3403 EXPECT_TRUE(sendIPv6PacketFromUid(uid, insideVpnAddr, &fwmark, vpnFd)); in expectVpnFallthroughWorks()
3404 EXPECT_EQ(bypassable ? vpnNetId : fallthroughNetId, static_cast<int>(fwmark.intValue)); in expectVpnFallthroughWorks()
3410 EXPECT_TRUE(sendIPv6PacketFromUid(0, outsideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3412 EXPECT_EQ(vpnNetId | 0xF0000, static_cast<int>(fwmark.intValue)); in expectVpnFallthroughWorks()
3415 EXPECT_TRUE(sendIPv6PacketFromUid(0, insideVpnAddr, &fwmark, vpnFd)); in expectVpnFallthroughWorks()
3417 EXPECT_EQ(vpnNetId | 0xF0000, static_cast<int>(fwmark.intValue)); in expectVpnFallthroughWorks()
3423 EXPECT_TRUE(sendIPv6PacketFromUid(0, outsideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3424 EXPECT_TRUE(sendIPv6PacketFromUid(0, insideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3428 EXPECT_TRUE(sendIPv6PacketFromUid(uid, outsideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3429 EXPECT_TRUE(sendIPv6PacketFromUid(uid, insideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3432 EXPECT_FALSE(sendIPv6PacketFromUid(uid, outsideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3433 EXPECT_FALSE(sendIPv6PacketFromUid(uid, insideVpnAddr, &fwmark, fallthroughFd)); in expectVpnFallthroughWorks()
3467 Fwmark fwmark; in createIpv6SocketAndCheckMark() local
3468 socklen_t fwmarkLen = sizeof(fwmark.intValue); in createIpv6SocketAndCheckMark()
3469 EXPECT_EQ(0, getsockopt(sockFd, SOL_SOCKET, SO_MARK, &fwmark.intValue, &fwmarkLen)); in createIpv6SocketAndCheckMark()
3471 return fwmark.intValue; in createIpv6SocketAndCheckMark()