Re:problem with cuseeme (gethostbyname() error explanation)

Bill Woodland (
Sun, 19 May 1996 22:03:21 -0500

>Date: Sun, 19 May 1996 18:51:20 -0700
>From: Fran=E7ois B=E9rub=E9 <>
>To: <>
>Subject: problem with cuseeme
>X-PH: (Cornell Modified)=20
>X-Listprocessor-Version: 7.2(a) -- ListProcessor by CREN
>Hello to you, i have some problemto execute cuseeme.exe, it is write on=20
>my screen GET HOST NAME ERROR 0, in my hosts fileit as my id and my name.=
>but it still notwork ?? can you help me

This is a rather lengthy explanation of TCP, IP addresses, routers, etc.,
and intended mainly for PC users. If you already know about this stuff,
just skip this message. =20

If anyone has anything to correct or add to this, please please please do
so! I've been wrong before :)


For the PC users of CU-seeMe, I think the gethostbyname() error is the main
problem for new users. I'm no expert on Transport Control Protocol/Internet
Protocol (TCP/IP), but let me see if I can explain this in a way that
everyone can understand it.

Every device connected to the internet has an Internet Protocol (IP) address
associated with it. An IP address consists of 4 numbers seperated by a
period, and each number can be from 0 to 255. When you dial into your
Internet Service Provider (ISP) they assign an ip address to your computer.
This IP address could be the same, but for most of you it will be different
every time you dial in. Your ISP has a limited number of IP addresses to
hand out. For this example, I'll use the addresses I use at my office. =20

For a company to be an ISP, they have to get a class A, class B, or class C
license. A class A license means that they can use an assigned number
between 0 and 255 for the first digit (let's say 204) and the second, third,
and fourth numbers are assigned by them to their subscribers. This can be thru This is 16,777,216 different IP addresses.

A class B license means that they can use an assigned number between 0 and
255 for the first digit and an assigned number for the second digit (let's
say 204.64) , and the third, and fourth numbers are assigned by them to
their subscribers. This can be thru This is
65,536 different IP addresses.

A class C license means that they can use an assigned number between 0 and
255 for the first digit and an assigned number for the second digit, and an
assigned number for the third digit (let's say 204.64.168) , and the fourth
number is assigned by them to their subscribers. This can be
thru This is 256 different IP addresses.

Let's say your ISP has a class C license for the ip range of
through This is 256 different IP addresses. Your ISP has
possibly signed up 1500 or more people, so this means that only 256 of them
can actually be connected at any one time. When you connect, they assign
you the next available IP address in their range. When you disconnect, that
IP address is now available for the next person that dials into your ISP.
This is why your IP address will probably change each time. This is called
a DYNAMIC IP address. Lots of ISPs will give you a static IP (one which is
always the same) for a "modest" sum.

Once you are connected and you have your IP address established, you are
ready to run TCP/IP applications like PING, Netscape, Eudora, CU-seeMe, etc.
SOME of these applications work fine just with an IP address, but others,
like CU-seeMe need a NAME for your computer.

Part of the TCP/IP setup on your computer is an IP address for your Domain
Name Server (DNS). This DNS is responsible for resolving hostnames and IP
addresses. For example, when you tell CU-SeeMe to connect to, the DNS returns the IP address of so that
CU-SeeMe can connect to the correct device.

This DNS is also responsible for returning a NAME for an IP address. This
is what CU-SeeMe is's asking "What's the name for IP address". Actually, it makes the request of your WINSOCK program,
and WINSOCK sends the request out to the DNS.

MOST ISPs have all of their IP addresses entered into their DNS with a name,
for purposes like this. If you don't have the correct IP for YOUR ISP's DNS
entered into your TCP/IP setup, or if the DNS doesn't return a name, then
CU-SeeME gives you the dreaded gethostbyname() error.

Here are several things to check to correct this problem:
If you don't have your DNS's IP entered, enter it.
If you DO have the DNS entered, make sure it is the CORRECT IP address for
your ISP's DNS.
If you still get the error, ask your ISP to setup their IP addresses into
their DNS.
Is they will not do this, for one reason or another, you can make a HOSTS
file to get around the problem. This file is HOSTS., not HOSTS.TXT or
HOSTS.SAM, just HOSTS dot nothing.

A HOSTS file is very similar to a DNS, except that it gets looked at by
WINSOCK first, and if it doesn't find what it need, then the DNS is queried.
If you know the first 3 numbers of your ISP's class C license, you can make
a file with 256 entries in it, one for each IP ending in 0 through 255, and
a name for each. The name can be the same, or doesn't=

Since it is WINSOCK that does the actual lookup, the HOSTS file must be in
the same directory as WINSOCK.DLL, or in a directory which is part of the
DOS PATH statement. I don't want to get into any semantic arguments about
the innacurate statement by Microsoft that Windows 95 is an OPERATING
SYSTEM, but if you are using Windows 95, be aware that DOS (version 7, if
you want to call it that) is actually loaded into memory when you boot up,
and then the Graphic User Interface (GUI) Windows 95 is loaded. DOS still
looks at your config.sys file and autoexec.bat file to configure a lot of
things before Windows 95 is actually loaded and run.

In your autoexec.bat file should be a line that says
"path=3Dc:\dos;c:\windows;...." and THIS is how Windows 95 (or earlier
versions of DOS) know how to find programs and files that are necessary.
Make sure the directory that WINSOCK.DLL is in is part of your DOS path
statement. In Windows 95 or Windows 3.1 you can use SYSEDIT to edit the
autoexec.bat file.

The program called MAKEHOST.COM, written by Fred Salerno (thanks very much,
Fred!) makes this HOSTS file for you. I have this program in the DOWNLOAD
section of my web page, which is at

I originally got it from Fred's FTP server at in the
pub/PC area.

It's still there. I just checked it.

Here, again, is how to use it, in case anyone else needs the info:

Make a note of what your IP address is right now. I'll assume that it's for the example.

Drop to DOS.
type MAKEHOST and press <ENTER>
You see:
MAKEHOST - Makes a HOSTS file for Dynamic IP. By Fred Salerno

Enter the first three segments of the IP address. (ex:199.199.199)
(you enter 105.205.101)

Enter the starting address (ex:1)
(you enter 1)

Enter the ending address (ex:255)
(you enter 255)

Done! HOSTS file created!

The hosts file will be in the directory you were in when you ran MAKEHOST
and it will have 255 lines in it, and look like this: dialup dialup dialup dialup dialup
. dialup dialup dialup dialup dialup

Put this hosts file in the same directory as your winsock.dll file.

Bill Woodland ( =20
Squeek on Undernet IRC
Channel Manager #CU-SeeMe
PC only, no MAC questions, please.