Home
last modified time | relevance | path

Searched refs:route (Results 1 – 25 of 222) sorted by relevance

123456789

/ohos5.0/foundation/communication/netmanager_base/test/netcommon/unittest/net_common_test/
H A Droute_utils_test.cpp36 Route route; in GetRoute() local
53 return route; in GetRoute()
59 Route route; in GetRoute2() local
76 return route; in GetRoute2()
82 Route route; in GetRoute3() local
99 return route; in GetRoute3()
105 Route route; in GetRoute4() local
122 return route; in GetRoute4()
165 Route route; variable
191 Route route; variable
[all …]
/ohos5.0/foundation/communication/netmanager_ext/services/ethernetmanager/src/
H A Dethernet_lan_management.cpp96 for (const auto &route : newNetLinkInfo.routeList_) { in ReleaseLanNetLink() local
97 …std::string destAddress = route.destination_.address_ + "/" + std::to_string(route.destination_.pr… in ReleaseLanNetLink()
99 route.gateway_.address_); in ReleaseLanNetLink()
102route.iface_.c_str(), destAddress.c_str(), route.gateway_.address_.c_str()); in ReleaseLanNetLink()
156 for (const auto &route : newNetLinkInfo.routeList_) { in SetRoute() local
157 if (netLinkInfo_.HasRoute(route)) { in SetRoute()
162 …std::string destAddress = route.destination_.address_ + "/" + std::to_string(route.destination_.pr… in SetRoute()
164 route.gateway_.address_); in SetRoute()
175 for (const auto &route : netLinkInfo_.routeList_) { in DelRoute() local
176 if (newNetLinkInfo.HasRoute(route)) { in DelRoute()
[all …]
H A Dethernet_configuration.cpp278 INetAddr route; in ConvertToConfiguration() local
280 route.address_ = dhcpResult.route1; in ConvertToConfiguration()
281 route.prefixlen_ = ipAddr.prefixlen_; in ConvertToConfiguration()
283 route.address_ = dhcpResult.route2; in ConvertToConfiguration()
284 route.prefixlen_ = ipAddr.prefixlen_; in ConvertToConfiguration()
287 route.prefixlen_ = 0; in ConvertToConfiguration()
289 route.family_ = static_cast<uint8_t>(CommonUtils::GetAddrFamily(route.address_)); in ConvertToConfiguration()
290 config->routeList_.push_back(route); in ConvertToConfiguration()
313 for (const auto &route : routeList) { in GetGatewayFromRouteList() local
314 temp.emplace(route.gateway_.address_, route.gateway_); in GetGatewayFromRouteList()
[all …]
H A Ddev_interface_state.cpp239 Route route; in UpdateLinkInfo() local
240 route.iface_ = devName_; in UpdateLinkInfo()
241 route.destination_ = netAddr; in UpdateLinkInfo()
242 … GetTargetNetAddrWithSameFamily(netAddr.address_, ifCfg_->ipStatic_.gatewayList_, route.gateway_); in UpdateLinkInfo()
243 linkInfo_->routeList_.push_back(route); in UpdateLinkInfo()
273 Route route; in UpdateLanLinkInfo() local
274 route.iface_ = devName_; in UpdateLanLinkInfo()
275 route.destination_ = netAddr; in UpdateLanLinkInfo()
276 GetRoutePrefixlen(netAddr.address_, ifCfg_->ipStatic_.netMaskList_, route.destination_); in UpdateLanLinkInfo()
277 … GetTargetNetAddrWithSameFamily(netAddr.address_, ifCfg_->ipStatic_.gatewayList_, route.gateway_); in UpdateLanLinkInfo()
[all …]
/ohos5.0/foundation/communication/netmanager_base/test/netconnmanager/unittest/net_conn_manager_test/
H A Dnet_link_info_test.cpp60 route->iface_ = "iface0"; in GetNetLinkInfo()
62 route->destination_.family_ = 0x10; in GetNetLinkInfo()
63 route->destination_.prefixlen_ = 0x17; in GetNetLinkInfo()
64 route->destination_.address_ = "0.0.0.0"; in GetNetLinkInfo()
65 route->destination_.netMask_ = "0.0.0.0"; in GetNetLinkInfo()
67 route->gateway_.type_ = INetAddr::IPV4; in GetNetLinkInfo()
68 route->gateway_.family_ = 0x10; in GetNetLinkInfo()
69 route->gateway_.prefixlen_ = 0x17; in GetNetLinkInfo()
70 route->gateway_.address_ = "0.0.0.0"; in GetNetLinkInfo()
71 route->gateway_.netMask_ = "0.0.0.0"; in GetNetLinkInfo()
[all …]
H A Dnet_conn_hievent_test.cpp80 route->iface_ = "iface0"; in GetNetLinkInfo()
81 route->destination_.type_ = INetAddr::IPV4; in GetNetLinkInfo()
82 route->destination_.family_ = 0x10; in GetNetLinkInfo()
83 route->destination_.prefixlen_ = 0x17; in GetNetLinkInfo()
86 route->destination_.hostName_ = "netAddr"; in GetNetLinkInfo()
87 route->gateway_.type_ = INetAddr::IPV4; in GetNetLinkInfo()
88 route->gateway_.family_ = 0x10; in GetNetLinkInfo()
89 route->gateway_.prefixlen_ = 0x17; in GetNetLinkInfo()
90 route->gateway_.address_ = "192.168.2.0"; in GetNetLinkInfo()
92 route->gateway_.hostName_ = "netAddr"; in GetNetLinkInfo()
[all …]
H A Dnative_net_conn_test.cpp80 route->iface_ = "iface0"; in GetRouteSample()
82 route->destination_.family_ = 0x10; in GetRouteSample()
83 route->destination_.prefixlen_ = 0x17; in GetRouteSample()
87 route->gateway_.type_ = INetAddr::IPV4; in GetRouteSample()
88 route->gateway_.family_ = 0x10; in GetRouteSample()
89 route->gateway_.prefixlen_ = 0x17; in GetRouteSample()
92 route->gateway_.hostName_ = "netAddr"; in GetRouteSample()
93 return route; in GetRouteSample()
116 sptr<Route> route = GetRouteSample(); in GetNetLinkInfoSample() local
144 LogINetAddr(route.destination); in LogRoute()
[all …]
H A Droute_test.cpp62 sptr<Route> route = new (std::nothrow) Route(); variable
63 ASSERT_TRUE(route != nullptr);
64 bool bRet = Route::Marshalling(data, route);
69 bRet = route->Marshalling(data);
/ohos5.0/foundation/communication/netmanager_base/services/netconnmanager/src/
H A Dnetwork.cpp165 for (const auto &route : netLinkInfo_.routeList_) { in ReleaseBasicNetwork() local
166 …auto destAddress = route.destination_.address_ + "/" + std::to_string(route.destination_.prefixlen… in ReleaseBasicNetwork()
169 if (route.destination_.address_ != LOCAL_ROUTE_NEXT_HOP && in ReleaseBasicNetwork()
328 return route.destination_.type_ == addrFamily; in UpdateIpAddrs()
364 for (const auto &route : netLinkInfo_.routeList_) { in UpdateRoutes() local
365 if (newNetLinkInfo.HasRoute(route)) { in UpdateRoutes()
370 …std::string destAddress = route.destination_.address_ + "/" + std::to_string(route.destination_.pr… in UpdateRoutes()
386 for (const auto &route : newNetLinkInfo.routeList_) { in UpdateRoutes() local
387 if (netLinkInfo_.HasRoute(route)) { in UpdateRoutes()
393 …std::string destAddress = route.destination_.address_ + "/" + std::to_string(route.destination_.pr… in UpdateRoutes()
[all …]
/ohos5.0/foundation/communication/netmanager_base/services/common/src/
H A Droute_utils.cpp67 int32_t RouteUtils::AddRoute(int32_t netId, const Route &route) in AddRoute() argument
69 return ModifyRoute(ROUTE_ADD, netId, route); in AddRoute()
72 int32_t RouteUtils::RemoveRoute(int32_t netId, const Route &route) in RemoveRoute() argument
74 return ModifyRoute(ROUTE_REMOVE, netId, route); in RemoveRoute()
124 int32_t RouteUtils::ModifyRoute(routeOperateType op, int32_t netId, const Route &route) in ModifyRoute() argument
132 switch (route.rtnType_) { in ModifyRoute()
134 if (route.hasGateway_) { in ModifyRoute()
135 nextHop = route.gateway_.address_; in ModifyRoute()
148 ToPrefixString(route.destination_.address_, route.destination_.prefixlen_, dest); in ModifyRoute()
156 … ret = NetsysController::GetInstance().NetworkAddRoute(netId, route.iface_, dest, nextHop); in ModifyRoute()
[all …]
/ohos5.0/foundation/communication/netmanager_ext/services/vpnmanager/src/
H A Dnet_vpn_impl.cpp236 for (auto &route : linkInfo->routeList_) { in UpdateNetLinkInfo() local
237 AdjustRouteInfo(route); in UpdateNetLinkInfo()
280 for (auto &route : vpnConfig_->routes_) { in DelNetLinkInfo() local
281 AdjustRouteInfo(route); in DelNetLinkInfo()
282 …std::string destAddress = route.destination_.address_ + "/" + std::to_string(route.destination_.pr… in DelNetLinkInfo()
283 …NetsysController::GetInstance().NetworkRemoveRoute(netId_, route.iface_, destAddress, route.gatewa… in DelNetLinkInfo()
287 void NetVpnImpl::AdjustRouteInfo(Route &route) in AdjustRouteInfo() argument
289 if (route.iface_.empty()) { in AdjustRouteInfo()
290 route.iface_ = TUN_CARD_NAME; in AdjustRouteInfo()
298 route.destination_.address_ = CommonUtils::GetIpv6Prefix(route.destination_.address_, in AdjustRouteInfo()
[all …]
/ohos5.0/foundation/communication/netmanager_base/frameworks/native/netconnclient/src/
H A Dnet_adj_iface_info.cpp45 for (const auto &route : routeList_) { in Marshalling() local
46 if (!route.Marshalling(parcel)) { in Marshalling()
76 sptr<Route> route; in Unmarshalling() local
78 route = Route::Unmarshalling(parcel); in Unmarshalling()
79 if (route == nullptr) { in Unmarshalling()
82 info->routeList_.push_back(*route); in Unmarshalling()
/ohos5.0/foundation/communication/netmanager_ext/test/vpnmanager/fuzztest/vpnclient_fuzzer/
H A Dvpnclient_fuzzer.cpp88 Route route; in GetRouteData() local
89 route.iface_ = GetStringData(); in GetRouteData()
90 route.destination_ = GetAddressData(); in GetRouteData()
91 route.gateway_ = GetAddressData(); in GetRouteData()
92 route.mtu_ = GetData<int32_t>(); in GetRouteData()
93 route.isHost_ = GetData<bool>(); in GetRouteData()
94 route.hasGateway_ = GetData<bool>(); in GetRouteData()
95 route.isDefaultRoute_ = GetData<bool>(); in GetRouteData()
96 return route; in GetRouteData()
/ohos5.0/drivers/peripheral/audio/hdi_service/primary_impl/vdi_src/
H A Daudio_common_vdi.c324 if (route->sinksLen > AUDIO_ROUTE_NUM_MAX) { in AudioCommonSinkToVdiSinkVdi()
335 vdiRoute->sinksLen = route->sinksLen; in AudioCommonSinkToVdiSinkVdi()
338 int32_t ret = AudioCommonRouteNodeToVdiRouteNodeVdi(&route->sinks[i], &vdiRoute->sinks[i]); in AudioCommonSinkToVdiSinkVdi()
352 if (route->sourcesLen > AUDIO_ROUTE_NUM_MAX) { in AudioCommonSourceToVdiSourceVdi()
363 vdiRoute->sourcesLen = route->sourcesLen; in AudioCommonSourceToVdiSourceVdi()
377 int32_t AudioCommonRouteToVdiRouteVdi(const struct AudioRoute *route, struct AudioRouteVdi *vdiRout… in AudioCommonRouteToVdiRouteVdi() argument
382 CHECK_NULL_PTR_RETURN_VALUE(route, HDF_ERR_INVALID_PARAM); in AudioCommonRouteToVdiRouteVdi()
385 if (route->sinks != NULL && route->sinksLen > 0) { in AudioCommonRouteToVdiRouteVdi()
386 sinkRet = AudioCommonSinkToVdiSinkVdi(route, vdiRoute); in AudioCommonRouteToVdiRouteVdi()
392 if (route->sources != NULL && route->sourcesLen > 0) { in AudioCommonRouteToVdiRouteVdi()
[all …]
/ohos5.0/base/telephony/cellular_data/services/src/state_machine/
H A Dcellular_data_state_machine.cpp406 NetManagerStandard::Route route; in ResolveRoute() local
407 route.iface_ = name; in ResolveRoute()
408 route.gateway_.address_ = routeInfo.ip; in ResolveRoute()
409 route.gateway_.family_ = routeInfo.type; in ResolveRoute()
410 route.gateway_.type_ = routeInfo.type; in ResolveRoute()
411 route.gateway_.hostName_ = DEFAULT_HOSTNAME; in ResolveRoute()
412 route.gateway_.netMask_ = DEFAULT_MASK; in ResolveRoute()
420 route.destination_.type_ = routeInfo.type; in ResolveRoute()
422 route.destination_.netMask_ = DEFAULT_MASK; in ResolveRoute()
423 route.destination_.prefixlen_ = 0; in ResolveRoute()
[all …]
/ohos5.0/foundation/communication/netmanager_ext/test/ethernetmanager/unittest/ethernet_manager_test/
H A Dethernet_service_proxy_test.cpp74 INetAddr route; in GetIfaceConfig() local
75 route.type_ = INetAddr::IPV4; in GetIfaceConfig()
76 route.family_ = 0x01; in GetIfaceConfig()
77 route.prefixlen_ = 0x01; in GetIfaceConfig()
78 route.address_ = "0.0.0.0"; in GetIfaceConfig()
79 route.netMask_ = "0.0.0.0"; in GetIfaceConfig()
80 route.hostName_ = "netAddr"; in GetIfaceConfig()
81 ic->ipStatic_.routeList_.push_back(route); in GetIfaceConfig()
H A Dethernet_lan_management_test.cpp65 INetAddr route; in GetNewIfaceConfig() local
66 route.type_ = INetAddr::IPV4; in GetNewIfaceConfig()
67 route.address_ = "0.0.0.0"; in GetNewIfaceConfig()
68 route.netMask_ = "0.0.0.0"; in GetNewIfaceConfig()
69 ic->ipStatic_.routeList_.push_back(route); in GetNewIfaceConfig()
/ohos5.0/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_toolkit/net_helper/
H A Dif_config.cpp372 struct rtentry route; in AddIpv4Route() local
373 if (memset_s(&route, sizeof(route), 0, sizeof(route)) != EOK) { in AddIpv4Route()
378 struct sockaddr_in *addr = reinterpret_cast<struct sockaddr_in *>(&route.rt_gateway); in AddIpv4Route()
384 addr = reinterpret_cast<struct sockaddr_in *>(&route.rt_dst); in AddIpv4Route()
387 addr = reinterpret_cast<struct sockaddr_in *>(&route.rt_genmask); in AddIpv4Route()
395 route.rt_dev = strIfName; in AddIpv4Route()
396 route.rt_flags = RTF_UP | RTF_GATEWAY; in AddIpv4Route()
397 route.rt_metric = 0; in AddIpv4Route()
404 if (ioctl(fd, SIOCADDRT, &route) < 0) { in AddIpv4Route()
/ohos5.0/docs/zh-cn/application-dev/web/
H A Dweb-redirection-and-browsing-history-mgmt.md51 在下面的示例中,应用首页Index.ets加载前端页面route.html,在前端route.html页面点击超链接,可跳转到应用的ProfilePage.ets页面。
67 // 资源文件route.html存放路径src/main/resources/rawfile
68 Web({ src: $rawfile('route.html'), controller: this.webviewController })
85 - route.html前端页面代码。
88 <!-- route.html -->
/ohos5.0/base/telephony/cellular_data/services/src/utils/
H A Dcellular_data_utils.cpp77 RouteInfo route; in ParseRoute() local
79 route.type = INetAddr::IpType::IPV4; in ParseRoute()
80 route.destination = ROUTED_IPV4; in ParseRoute()
82 route.type = INetAddr::IpType::IPV6; in ParseRoute()
83 route.destination = ROUTED_IPV6; in ParseRoute()
85 route.ip = routeArray[i]; in ParseRoute()
86 routeInfoArray.push_back(route); in ParseRoute()
/ohos5.0/drivers/interface/nfc/v1_1/
H A DNfcTypes.idl70 /** Default Secure Element route id */
73 /** Default Secure Element route id for felica */
76 /** Set the default Felica T3T System Code OffHost route Location */
82 /** Default route for unconfigured protocols and technology. */
106 /** OffHost UICC route location for Multi SE */
109 /** OffHost eSE route location for Multi SE */
112 /** Set the ISODEP route location */
/ohos5.0/foundation/ability/idl_tool/test/hdi_unittest/nfc_v1_1/foo/nfc/v1_1/
H A DNfcTypes.idl70 /** Default Secure Element route id */
73 /** Default Secure Element route id for felica */
76 /** Set the default Felica T3T System Code OffHost route Location */
82 /** Default route for unconfigured protocols and technology. */
106 /** OffHost UICC route location for Multi SE */
109 /** OffHost eSE route location for Multi SE */
112 /** Set the ISODEP route location */
/ohos5.0/foundation/communication/netmanager_ext/frameworks/native/netvpnclient/src/
H A Dvpn_config.cpp52 for (auto route : routes_) { in MarshallingAddrRoute() local
53 if (!route.Marshalling(parcel)) { in MarshallingAddrRoute()
130 sptr<Route> route = Route::Unmarshalling(parcel); in UnmarshallingAddrRoute() local
131 if (route == nullptr) { in UnmarshallingAddrRoute()
135 config->routes_.push_back(*route); in UnmarshallingAddrRoute()
/ohos5.0/foundation/communication/netmanager_base/services/common/include/
H A Droute_utils.h66 static int32_t AddRoute(int32_t netId, const Route &route);
76 static int32_t RemoveRoute(int32_t netId, const Route &route);
90 static int32_t ModifyRoute(routeOperateType op, int32_t netId, const Route &route);
/ohos5.0/docs/en/application-dev/reference/apis-network-kit/
H A D_net_conn___route.md6 Defines the route configuration.
24 | [isDefaultRoute](#isdefaultroute) | Whether the default route is used. |
82 Whether the default route is used.

123456789