sockets - Using packets gotten from devices connected to an android device's hotspot interface -


i created vpn using android's vpnservice class. now, want vpn handle packets device's hotspot interface. in vpnservice builder, called addroute("0.0.0.0",0). made sure got outgoing packets including hotspot.

the problem facing when packets redirected hotspot, packets seem still have ips hotspot network. 192.168.43.... both in source field , destination fields of ip packets , payload doesn't seem contain tcp packet either.

my questions are:
why hotspot packet receive vpn interface not have same source ip of vpn interface created vpnservice class?

is there layer packets hotspot packaged since can't seem remote address real request in ip headers?

is vpninterface setup wrongly?

my interface setup correctly.

apparently, getting dhcp packets. dhcpoffer packets android's local dhcp servers.

even though android's vpn interface setup outgoing packets on device, doesn't seem broadcast packets reason, gets replies broadcast packets.

i wonder why designed way.

understanding helped me solve problem.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -