1 // Copyright (c) 2019 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef QUICHE_QUIC_QBONE_PLATFORM_MOCK_NETLINK_H_ 6 #define QUICHE_QUIC_QBONE_PLATFORM_MOCK_NETLINK_H_ 7 8 #include "quiche/quic/platform/api/quic_test.h" 9 #include "quiche/quic/qbone/platform/netlink_interface.h" 10 11 namespace quic { 12 13 class MockNetlink : public NetlinkInterface { 14 public: 15 MOCK_METHOD(bool, GetLinkInfo, (const std::string&, LinkInfo*), (override)); 16 17 MOCK_METHOD(bool, GetAddresses, 18 (int, uint8_t, std::vector<AddressInfo>*, int*), (override)); 19 20 MOCK_METHOD(bool, ChangeLocalAddress, 21 (uint32_t, Verb, const QuicIpAddress&, uint8_t, uint8_t, uint8_t, 22 const std::vector<struct rtattr*>&), 23 (override)); 24 25 MOCK_METHOD(bool, GetRouteInfo, (std::vector<RoutingRule>*), (override)); 26 27 MOCK_METHOD(bool, ChangeRoute, 28 (Verb, uint32_t, const IpRange&, uint8_t, QuicIpAddress, int32_t, 29 uint32_t), 30 (override)); 31 32 MOCK_METHOD(bool, GetRuleInfo, (std::vector<IpRule>*), (override)); 33 34 MOCK_METHOD(bool, ChangeRule, (Verb, uint32_t, IpRange), (override)); 35 36 MOCK_METHOD(bool, Send, (struct iovec*, size_t), (override)); 37 38 MOCK_METHOD(bool, Recv, (uint32_t, NetlinkParserInterface*), (override)); 39 }; 40 41 } // namespace quic 42 43 #endif // QUICHE_QUIC_QBONE_PLATFORM_MOCK_NETLINK_H_ 44