1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef NETSYS_MAIN_TEST_H 17 #define NETSYS_MAIN_TEST_H 18 19 #include <cstdint> 20 #include <iostream> 21 #include <map> 22 23 #include "i_netsys_service.h" 24 #include "test_notify_callback.h" 25 26 using NetsysTestFunc = void (*)(); 27 28 void TestSetResolverConfig(void); 29 void TestCreateNetworkCache(void); 30 void TestFlushNetworkCache(void); 31 void TestDestroyNetworkCache(void); 32 void TestInterfaceSetMtu(void); 33 void TestInterfaceGetMtu(void); 34 void TestRegisterNotifyCallback(void); 35 void TestNetworkAddRoute(void); 36 void TestNetworkRemoveRoute(void); 37 void TestNetworkAddRouteParcel(void); 38 void TestNetWorkRemoveRouteParcel(void); 39 void TestNetworkSetDefault(void); 40 void TestNetworkGetDefault(void); 41 void TestNetworkCreatePhysical(void); 42 void TestInterfaceAddAddress(void); 43 void TestInterfaceDelAddress(void); 44 void TestNetworkAddInterface(void); 45 void TestNetworkRemoveInterface(void); 46 void TestGetFwmarkForNetwork(void); 47 void TestInterfaceSetCfg(void); 48 void TestNetworkClearDefault(void); 49 void TestNetGetProcSysNet(void); 50 void TestInterfaceGetCfg(void); 51 void TestGetResolverConfig(void); 52 void TestNetworkGetDefaultUnion(void); 53 54 void TestNetworkSetDefaultWIFI(void); 55 void TestNetworkAddInterfaceWIFI(void); 56 void TestNetworkRemoveInterfaceWIFI(void); 57 void TestSetTcpBufferSizes(void); 58 59 #endif // NETSYS_MAIN_TEST_H 60