Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Gnutella Development Discussion (https://www.gnutellaforums.com/general-gnutella-development-discussion/)
-   -   A question about connecting (https://www.gnutellaforums.com/general-gnutella-development-discussion/6678-question-about-connecting.html)

Darkk December 25th, 2001 09:29 AM

A question about connecting
 
I understand how the P2P net works, quite well. But I have one stupid question. How do the computers connect to the net if they don't know IPs of those already connected.
It is necessary to know some starting address or what?

Thanx for your answers.

Moak December 25th, 2001 12:11 PM

How about host caches, http://www.gnutellaforums.com/showth...&threadid=5807

Sephiroth December 25th, 2001 08:43 PM

Re: A question about connecting
 
Quote:

Originally posted by Darkk
I understand how the P2P net works, quite well. But I have one stupid question. How do the computers connect to the net if they don't know IPs of those already connected.
It is necessary to know some starting address or what?

Thanx for your answers.

The internet uses DNS servers. They are servers that translate web addresses into ip numbers and etc. needed for the internet. They are what do all the linking between web address and site. If you knew the ip adress of a server which you can get through a whois, you could connect to any site through their ip address the same way you would trough the domain name.

As for how you get connected your ISP assigns you an Ip adress and DNS to use.

Darkk December 26th, 2001 03:39 AM

Thanx Moak! That's what I wanted to know. So there are some host caches with fixed URLs.
But... I am dreaming of a real P2P network which would not depend on any given server. If a servent wanted to join the network it might find the others by broadcasting a message until someone responses. Wouldn't it be possible?

Moak December 26th, 2001 04:29 AM

Hi, you're welcome. It mainly depends on what kind of broadcast you are thinking of (which protocoll, which OSI layer?). But whatever it is, it will usually work in your local LAN or network segment only! Your ISP (or router) makes sure broadcasts on a low layer are not routed to the internet, because wild broadcasts from many many hosts could easily collapse the internet. High broadcast traffic is also a problem inside gnutella (for known countermeasures on this layer/protocoll see TTL and superpeers/ultrapeers, pong caching etc).

For example a known broadcast inside a LAN is used with Samba service (the famous file service), it broadcasts to find master servers and other file servers. Those broadcasts are usually send only to the same netwok segment, corrosponding to your TCP/IP network mask (see details in /etc/smb.conf).

Actually host caches are the only slightly centralized structure inside Gnutella. There are some alternative ideas, e.g. an IRC channel where servants exchange IPs. Any more ideas known?

PS: Sephir, the internet uses IPs. DNS translates internet hostnames to IPs, and reverse. It's a common service you need if working with hostnames (resolving to IPs). When being pure IP based there is no need to query a DNS server, the Gnutella protocoll itself is pure IP based (IPv4 yet).

Pferdo April 5th, 2002 12:48 AM

reverse dns
 
hi,
how can i reach easily the "dns-entry" of an IP I've got?
Any WinAPI-functions?

thx

RTFM April 5th, 2002 01:21 AM

http://www.google.de/search?q=Winsock+hostname+IP
gethostbyname() ....5th link is also in german language.

Pferdo April 5th, 2002 02:12 AM

thx RTFM...

but this is not the thing i was looking for... it gets an IP from an address...

but looking at the google-keywords remembered me of a english website called VBIP (www.vbip.com) i visited a loooong time ago...

there's is everything you (i) need...
here's the article: http://www.vbip.com/winsock-api/geth...tbyaddr-01.asp

it uses
Declare Function gethostbyaddr Lib "ws2_32.dll" (addr As Long, ByVal addr_len As Long, ByVal addr_type As Long) As Long


anyway... thx for your effort
CU

RTFM April 5th, 2002 03:10 AM

All you need is the Winsock FAQ.
RTFM


All times are GMT -7. The time now is 06:35 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.