![]() |
Pong Packet Question.. I was wonder what I am doing wrong with the four byte host address in the query hit packet. I've written a client now I am just ironing the bugs out. I've set up a test network on my computer. My program connect to Gnucleus. When send a query hit with the 127.0.0.1 (7F001 or 520193) I get some something like 16.0.127.0. My question is how do you encode the host address? is suppose to be 127001? |
Looks like you have the bytes in the wrong order. 127.0.0.1 = 16777343 = 0x0100007F |
Quote:
|
Quote:
Thanks that seems to have solved my bad packet problem. The Gnutella specs are a little misleading. The show it as: byte 0 byte 1 byte 2 byte3 and the first part of their example address (208 i believe) under the byte 0. Anyway thanks for clearing that up. |
String to IP: inet_addr() IP to InAddr: inet_ntoa() |
Does that help? |
All times are GMT -7. The time now is 10:25 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Copyright © 2020 Gnutella Forums.
All Rights Reserved.