create_cross_traffic.cc (1417B)
1 /* 2 * Copyright (c) 2021 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 #include "api/test/network_emulation/create_cross_traffic.h" 11 12 #include <memory> 13 14 #include "api/test/network_emulation/cross_traffic.h" 15 #include "test/network/cross_traffic.h" 16 #include "test/network/network_emulation.h" 17 18 namespace webrtc { 19 20 std::unique_ptr<CrossTrafficGenerator> CreateRandomWalkCrossTraffic( 21 CrossTrafficRoute* traffic_route, 22 RandomWalkConfig config) { 23 return std::make_unique<test::RandomWalkCrossTraffic>(config, traffic_route); 24 } 25 26 std::unique_ptr<CrossTrafficGenerator> CreatePulsedPeaksCrossTraffic( 27 CrossTrafficRoute* traffic_route, 28 PulsedPeaksConfig config) { 29 return std::make_unique<test::PulsedPeaksCrossTraffic>(config, traffic_route); 30 } 31 32 std::unique_ptr<CrossTrafficGenerator> CreateFakeTcpCrossTraffic( 33 EmulatedRoute* send_route, 34 EmulatedRoute* ret_route, 35 FakeTcpConfig config) { 36 return std::make_unique<test::FakeTcpCrossTraffic>(config, send_route, 37 ret_route); 38 } 39 40 } // namespace webrtc