Gnutella Forums  

Go Back   Gnutella Forums > Gnutella News and Gnutelliums Forums > General Gnutella / Gnutella Network Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

General Gnutella / Gnutella Network Discussion For general discussion about Gnutella and the Gnutella network.
For discussion about a specific Gnutella client program, please post in one of the client forums above.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old April 17th, 2001
Novicius
 
Join Date: April 16th, 2001
Location: Brazil
Posts: 1
RogerioS is flying high
Post help with PONG

Hi,

I'm developing a gnutella client. But I have one problem:

After, connect and ping... a pong response arrive from the server.

The problem is:

I can't translate the IP.
I tried to use inet_ntoa, struct in_addr,etc...
But always the response are some like that:
163.82.0.0 or 79.88.0.0

How can I get a correct IP?

My header:

typedef struct {
unsigned char message[16];
unsigned char func;
unsigned char ttl;
unsigned char hops;
unsigned int datalen;
} header;

typedef struct {
unsigned short port;
unsigned int ip;
unsigned int files;
unsigned int size;
} ping;

regards

Rogerio
Reply With Quote
  #2 (permalink)  
Old April 20th, 2001
zap ping
Guest
 
Posts: n/a
Post

Well, you better check to make sure a short is two bytes and a int is 32. Better to use something defined for this.
Instead of re inventing the world, why not look at Gtk-Gnutella, Gnut or Napshare? Then you could move on beyond the simple communications stuff.

The IP should be byte order, just make yourself a little HEX print routine and printout the WHOLE packet, remember the first 11 bytes are all the gnutella stuff then your response.

It's more fun to play with something that is working, try the code below.

http://sourceforge.net/projects/gtk-gnutella/
http://www.gnutelliums.com/linux_unix/gnut/
http://napshare.sourceforge.net/
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Log Pong robinhood2451 General Discussion 1 September 29th, 2005 12:00 AM
Pong Server EvicerateX General Gnutella / Gnutella Network Discussion 2 September 14th, 2002 07:19 AM
Pong Server sangony General Gnutella / Gnutella Network Discussion 8 September 12th, 2002 02:12 PM
Ping & Pong? What for? JackDCLee General Gnutella Development Discussion 5 March 31st, 2002 12:59 AM
Pong Question Ivex General Gnutella Development Discussion 4 January 22nd, 2002 05:24 AM


All times are GMT -7. The time now is 02:27 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.