Lines Matching refs:route
67 int32_t RouteUtils::AddRoute(int32_t netId, const Route &route)
69 return ModifyRoute(ROUTE_ADD, netId, route);
72 int32_t RouteUtils::RemoveRoute(int32_t netId, const Route &route)
74 return ModifyRoute(ROUTE_REMOVE, netId, route);
124 int32_t RouteUtils::ModifyRoute(routeOperateType op, int32_t netId, const Route &route)
132 switch (route.rtnType_) {
134 if (route.hasGateway_) {
135 nextHop = route.gateway_.address_;
148 ToPrefixString(route.destination_.address_, route.destination_.prefixlen_, dest);
150 NETMGR_LOG_E("route dest is empty.");
156 ret = NetsysController::GetInstance().NetworkAddRoute(netId, route.iface_, dest, nextHop);
159 ret = NetsysController::GetInstance().NetworkRemoveRoute(netId, route.iface_, dest, nextHop);