The distributed recursive wave is a programming model based on distributed procedure call, allowing distributed algorithm definition using cetral algorithm. DRW uses multiple procedure call, so the results can not come back to calling process. To resolve this problem, a solution for returning result to calling process is introduced using aggregation function. Introducing aggragation function makes the DRW more complex, but it allows more control on the execution of the DRW depending on the application needs. With this solution, DRW can be applicable for collecting, not only for propagading information. The solution is applied in the case of network topology detection and is implemented in a simulating model supporting shell.