If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From - Mon Aug 21 08:02:19 2000
Path: news.randori.com!news-feeder2.wcg.net!WCG!newspeer1.nac.net!news.maxwell.syr.edu!europa.netcrusader.net!207.103.147.20!news.voicenet.com!nntp.upenn.edu!news.misty.com!shady!shady!not-for-mail
From: kevin@shady.com (Kevin Smith, ShadeTree Software, Inc.)
Newsgroups: comp.unix.sco.misc
Subject: Re: Netcat problem? - repost
Date: 20 Aug 2000 22:11:27 -0400
Organization: ShadeTree Software, Inc.
Lines: 86
Message-ID: <8nq34f$srl@shady.shady.com>
References: <m13QauO-000AmYC@egps.com> <uhf0qscrdf5diag6ikp76jn3qvttt2nioc@4ax.com>
NNTP-Posting-Host: localhost.shady.com
Xref: news.randori.com comp.unix.sco.misc:64729
X-Mozilla-Status: 8011
X-Mozilla-Status2: 00000000
In article <uhf0qscrdf5diag6ikp76jn3qvttt2nioc@4ax.com> jeffl@comix.santa-cruz.ca.us writes:
>On Sun, 20 Aug 2000 19:37:28 GMT, Nachman Yaakov Ziskind
><awacs@egps.com> wrote:
>
>>[reposting this b/c it doesn't show up in DejaNews. Also, now Jeff L. is
>>back :-)]
>
>I was just about to leave for Doug's party, when your message
>appeared. If I'm late or miss something important, it's your fault.
>
>>3) Netcat gives the following results:
>>$ netcat -d 999 -h hp3 -p 9102
>>
>>debugl = 999
>>hostname = hp3
>>port = 9102
>>gethostbyname()=0x404340
>>socket()=3
>>sin.sin_addr.s_addr=0x2882b8d0
>>connect()=-1
>>Connect to port 9102 on hp3: Connection refused
>
>One of these days, I'll figure out what all that debug info means.
>However, the connect()=-1 is fairly obvious. Your print server was
>lonely while you were gone, and has decided to not accept any of your
>excuses as to why you were gone. My cat does the same thing.
>...
debugl = 999
Your debug level. Anything >= 1 triggers debug messages.
There are no "levels", just on and off.
hostname = hp3
Value from -h arg
port = 9102
Value from -p arg
gethostbyname()=0x404340
Return value of gethostbyname() which is the address of the
hostent struct which is useless unless it's 0 which means there
was an error.
This translates the host name (hp3) into an ip address.
socket()=3
Return value of the socket() call. It's really a file descriptor
for the network connection. Not too many reasons for this to fail.
Useless unless it's -1. Should always be 3 (stdin = 0, stdout = 1,
stderr = 2, 3 is next).
This is the first half of opening a network connection.
sin.sin_addr.s_addr=0x2882b8d0
The ip address in hex, as found by gethostbyname(), not adjusted
for network byte order.
0x2882b8d0 -> 0x28.0x82.0xb8.0xd0 -> 40.130.184.208 -> 208.184.130.40
I should be using inet_ntoa() to show the ip.
connect()=-1
The return from the connect() call. Who knows why this was
failing for the coff and not the elf versions. I run a coff
version on OSR 5.0.0 (compiled on OSR 5.x though).
This is the second half of opening a network connection, where the
target host is actually contacted and the connection is established.
Connect to port 9102 on hp3: Connection refused
Output of
perror("Connect to port <port> on <host>")
--
Do two rights make | Kevin Smith, ShadeTree Software, Philadelphia, PA, USA
a libertarian | 001-215-487-3811 shady.com,kevin bbs.cpcn.com,sysop
| dvtug.org,kevins--Delaware Valley Transit Users Group
Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 1 | 4 | 3 | 167 | 1,019 |
/Bofcusm/509.html copyright 1997-2004 (various authors) All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Add your comments
comment on this page here