Lines Matching refs:iface

313 const std::vector<std::string> makeInterfaceQuotaCommands(const std::string& iface, int ruleIndex,  in makeInterfaceQuotaCommands()  argument
315 const std::string chain = "bw_costly_" + iface; in makeInterfaceQuotaCommands()
317 const char* c_iface = iface.c_str(); in makeInterfaceQuotaCommands()
333 const std::vector<std::string> removeInterfaceQuotaCommands(const std::string& iface) { in removeInterfaceQuotaCommands() argument
334 const std::string chain = "bw_costly_" + iface; in removeInterfaceQuotaCommands()
336 const char* c_iface = iface.c_str(); in removeInterfaceQuotaCommands()
352 const std::string iface = mTun.name(); in TEST_F() local
353 std::vector<std::string> expected = makeInterfaceQuotaCommands(iface, 1, kOldQuota); in TEST_F()
355 EXPECT_EQ(0, mBw.setInterfaceQuota(iface, kOldQuota)); in TEST_F()
361 EXPECT_EQ(0, mBw.setInterfaceQuota(iface, kNewQuota)); in TEST_F()
364 expected = removeInterfaceQuotaCommands(iface); in TEST_F()
365 EXPECT_EQ(0, mBw.removeInterfaceQuota(iface)); in TEST_F()
369 const std::vector<std::string> makeInterfaceSharedQuotaCommands(const std::string& iface, in makeInterfaceSharedQuotaCommands() argument
374 const char* c_iface = iface.c_str(); in makeInterfaceSharedQuotaCommands()
390 const std::vector<std::string> removeInterfaceSharedQuotaCommands(const std::string& iface, in removeInterfaceSharedQuotaCommands() argument
394 const char* c_iface = iface.c_str(); in removeInterfaceSharedQuotaCommands()
412 const std::string iface = mTun.name(); in TEST_F() local
413 std::vector<std::string> expected = makeInterfaceSharedQuotaCommands(iface, 1, 123456, true); in TEST_F()
414 EXPECT_EQ(0, mBw.setInterfaceSharedQuota(iface, kQuota)); in TEST_F()
418 EXPECT_EQ(0, mBw.setInterfaceSharedQuota(iface, kQuota)); in TEST_F()
421 expected = removeInterfaceSharedQuotaCommands(iface, kQuota, true); in TEST_F()
422 EXPECT_EQ(0, mBw.removeInterfaceSharedQuota(iface)); in TEST_F()
428 const std::string iface = mTun.name(); in TEST_F() local
429 std::vector<std::string> expected = makeInterfaceSharedQuotaCommands(iface, 1, kOldQuota, true); in TEST_F()
430 EXPECT_EQ(0, mBw.setInterfaceSharedQuota(iface, kOldQuota)); in TEST_F()
436 EXPECT_EQ(0, mBw.setInterfaceSharedQuota(iface, kNewQuota)); in TEST_F()
439 expected = removeInterfaceSharedQuotaCommands(iface, kNewQuota, true); in TEST_F()
440 EXPECT_EQ(0, mBw.removeInterfaceSharedQuota(iface)); in TEST_F()
451 for (const auto& iface : ifaces) { in TEST_F() local
454 bool first = (iface == ifaces[0]); in TEST_F()
455 auto expected = makeInterfaceSharedQuotaCommands(iface, 1, kQuota, first); in TEST_F()
456 EXPECT_EQ(0, mBw.setInterfaceSharedQuota(iface, kQuota)); in TEST_F()
460 for (const auto& iface : ifaces) { in TEST_F() local
463 bool last = (iface == ifaces[1]); in TEST_F()
464 auto expected = removeInterfaceSharedQuotaCommands(iface, kQuota, last); in TEST_F()
465 EXPECT_EQ(0, mBw.removeInterfaceSharedQuota(iface)); in TEST_F()