If I have a Java program that listens for multicast data, how can I find out what the remaining TTL of the incoming datagram is?
I know how to set TTL on the sending multicast socket, but I want to know the remaining TTL of the incoming packet.
If you get UDP datagrams with a raw socket, you can check for TTL (or anything else in the IP or UDP headers). However, there are many errors:
? UDP IP-, TTL, -. (split ) Java IP.
( , ), Java API .
TTL - 9- IPv4. , 9- DatagramPacket ? TTL? , IP DatagramPacket, IPv4?