Home > Back-end >  Urgent urgent!!! Help IdUDPServer controls send multicast data, how to set up the control packets se
Urgent urgent!!! Help IdUDPServer controls send multicast data, how to set up the control packets se

Time:10-10

Using Delphi7 IdUDPServer controls send multicast data, how to set up the control packets sent survival time (i.e., the packet of TTL value, I hope he has been to the value of the 128, for example, rather than it is now the default value is 1),
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Problem description:
Using Delphi7 IdUDPServer controls send multicast data (IP multicast: 224.0.1.100),
But if between sender and receiver computer through the network if the middle across the gateway, the receiver can not receive data, you can receive data without cross gateway,

Me monitoring the receiver to receive data, found IdUDPServer send IP packet data's survival time is 1, so just across a gateway, is minus 1, so the TTL value to 0, so it is throw in the packet network switches,

I want to send packets this IdUDPServer control the survival time of TTL value, grow into 128. Rather than it is now the default value of 1,
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Oneself has done testing:
1, I checked the XP operating system registry, change the parameters of the TPCIP DefaultTTL values default is 64 I changed to 128, found that just send data directly to the IP, packets of TTL is changed into 128, but for 224.0.1.100 multicast addresses to send packets, TTL is 1, still no effect;
2, I modified IdUDPServer controls the base class for IdWinSock2,
The ip_default_multicast_ttl=128;//normally limit m 'casts to 1 hop {Do not Localize} of the original value is 1, tested TTL is 1, still no effect;
3, using the setsockopt function sets the TTL, should be your current created this sockt send packets of TTL value, rather than the current interface I create this IdUDPServer TTL, so even if use the setsockopt function sets the value of 128, but the use of multicast packets sent IdUDPServer TTL is 1. This I tried, no effect,

Please master horse to give directions, urgent urgent! Thank extremely!
My email address: 1398865 @qq.com

CodePudding user response:

Problem has been solved, knot,

CodePudding user response:

The building Lord revealed the thought and process to solve the problem, or for others to learn from,

CodePudding user response:

Find a teacher notes settled,
First in CSDN download a WinSock2. Pas,
Project engineering load. Pas file
Using WSAIOCtl function, mount multicast TTL heartbeat,

CodePudding user response:

Learn and pick up points,,,

CodePudding user response:

What you mean, didn't understand
  • Related