![]() |
|
|||||||
| Register | FAQ | The Twelve Commandments | Members List | Find the Best VPN | Today's Posts | Search |
| General Gnutella Development Discussion For general discussion about Gnutella development. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
Looks like you have the bytes in the wrong order.
127.0.0.1 = 16777343 = 0x0100007F |
|
#3
|
||||
|
||||
|
Quote:
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
String to IP: inet_addr()
IP to InAddr: inet_ntoa() |
|
#6
|
|||
|
|||
|
Does that help?
|
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Packet too big error | gnutella06 | General Discussion | 7 | June 9th, 2006 12:43 AM |
| Packet routing | faisal | General Discussion | 0 | October 2nd, 2002 08:55 PM |
| Packet efficiency | Cakkie | General Gnutella Development Discussion | 5 | July 21st, 2002 11:01 PM |
| Packet routing | Cakkie | General Gnutella Development Discussion | 6 | July 21st, 2002 12:09 PM |
| Pong Question | Ivex | General Gnutella Development Discussion | 4 | January 22nd, 2002 06:24 AM |