Login  
Search All Forums
Dart Home | PowerTCP Winsock for ActiveX | Custom Development Reply | PowerTCP Winsock for ActiveX Topics | Forums   
AuthorForum: PowerTCP Winsock for ActiveX
Topic: UDP Control and NTP
Exetor
gagraham@ontap.com

From: Lakewood, CO USA
Posts: 5
Member Since: 08/22/03
posted August 22, 2003 2:44 AM

I have verified that an NTP server running on our own central site is able to sync using SNTP using any of a number of freeware Windows client programs. It is my purpose to implement a connection to our central site using the UDP control and the NTP referenced in RFC 1305. I have been using a blocking version with a timeout of 10000 ms. I have tried an Open with and without the port 123, and have tried a Send containing a Byte array formatted with the appropriate data, the central site name ("ntp.ontap.com"), and again, the port number 123. I continue to receive timeouts from the UDP control. I have a firewall on my dev box, and have enabled UDP port 123 for the VB6.exe program. Is there anything I seem to be doing wrong? The data packet is formatted by RFC 1304, and I am using htonl() for each 4-byte part of the packet going out, and ntohl() for the incoming. I would appreciate any help or suggestions. We have four seats of the WinSock control, and also use two seats of the Web Control. Thank you for your time.
Exetor
gagraham@ontap.com

From: Lakewood, CO USA
Posts: 5
Member Since: 08/22/03
posted August 22, 2003 2:45 AM

Make that RFC 1305, not RFC 1304.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted August 22, 2003 8:45 AM

I've never tried anything with NTP before so I can't offer much advice other than getting the RFC and trying to figure it out from there (which you have already done)

If you want one of us to develop something for you, please contact our sales department and ask them about custom solutions.
Exetor
gagraham@ontap.com

From: Lakewood, CO USA
Posts: 5
Member Since: 08/22/03
posted August 22, 2003 10:04 AM

Maybe some information about how the UDP control sets up the UDP header would be useful. What actions would I need to take to get '123' into both send and receive fields of the UDP header? I was thinking it would be use port 123 on the Open method, and then use 123 on the send. Is this a safe assumption?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted August 22, 2003 10:11 AM

The UDP control is quite simple really. All you can do with it is open a port to receive data on, then send and receive data as a string or byte array.

Unfortunately, I don't know exactly what data you should be sending.
Exetor
gagraham@ontap.com

From: Lakewood, CO USA
Posts: 5
Member Since: 08/22/03
posted August 22, 2003 11:14 AM

Maybe you didn't understand my question. The UDP header consists of 2 bytes as destination port, 2 bytes as source port, 2 bytes as data length, and 2 bytes as checksum. What would I need to do for your control to put '123' as both the source and destination ports on a Send method?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted August 22, 2003 11:20 AM

The Source port is the port that you specified in the call to Open.

The Destination port is the port that you specify in the Send method.

Exetor
gagraham@ontap.com

From: Lakewood, CO USA
Posts: 5
Member Since: 08/22/03
posted August 22, 2003 11:21 AM

Thank you for clarifying that.
Reply | PowerTCP Winsock for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX