Traceroute on android

前端 未结 3 651
走了就别回头了
走了就别回头了 2021-01-03 01:13

I am a beginner on android platform, and I want to build a tracerouting app. So these are my queries:

  1. Is it possible to make such an application in Android?

相关标签:
3条回答
  • 2021-01-03 01:27

    It's quite late - but someone might see it. i found this one and it worked for me: https://github.com/olivierg13/TraceroutePing

    0 讨论(0)
  • 2021-01-03 01:28

    This is working pretty well for me, you may have to filter out the string results. To add this library, you have to download or clone the git repository and implement the folder "library" just as he does in the other module "app" for it to work properly.

    0 讨论(0)
  • 2021-01-03 01:32

    The simplest way I can think of is to just check for the traceroute Linux application, execute it, and parse its output.

    Android has full networking support, however, Java doesn't expose an interface to alter the IP header. Hence, manually crafting ICMP packages is out of the question (JPCAP is no help here, since it relies on libpcap, which I suppose you won't find on any vanilla installation).

    Another possible solution is to use the NDK and create a small library that handles the low-level number crunching. However, I'm not sure if the NDK would allow you to use setsockopt.

    0 讨论(0)
提交回复
热议问题