Thread: help with PONG
View Single Post
  #1 (permalink)  
Old April 17th, 2001
RogerioS RogerioS is offline
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