2

I'm new to android development and I'm trying to capture packets in android.

When I add builder.addRoute("0.0.0.0",0) to my code , it's helping me capture packets, but those packets are not being routed to there destination.

Did anyone come across this problem or issues,

builder.addAddress("10.0.2.0", 24);
builder.addRoute("0.0.0.0", 0);
builder.setSession("some service");
builder.setMtu(1500);

If I take the addRoute option out of builder, then packets are routed successfully, but when I add that I get an error and I tried netstat and apparently the socket status is in "SYN_WAIT"

Java Devil
  • 10,629
  • 7
  • 33
  • 48
Yogi
  • 21
  • 3

1 Answers1

2

When you add the line builder.addRoute("0.0.0.0", 0); this means you are routing all packets to your application to handle them, and if you don't forward them outside the device, the application requesting it will time out and might retry again.

Hakem Zaied
  • 14,061
  • 1
  • 23
  • 25