简体   繁体   中英

Read TCP-Destination via Socket

I'm programming an Android application. I forward a port to my app and listen on it with a socket. I'm receiving data but only the data on the layers OVER the TCP-layer. That would not be a problem, but now I need the original destination-IP but it should be in the TCP-Layer. So do you know, is there an easy way to get this IP? Or is there an easy way to set up a socket to get more layers than only that ones over TCP?

如果要在NAT设备上转发TCP端口,则要查找的信息在NAT版本的目标位置不可用,因为目标地址需要在IP标头中重写为专用地址才能正常工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM