*BSD News Article 54102


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!newsfeed.internetmci.com!chi-news.cic.net!usc!math.ohio-state.edu!uwm.edu!vixen.cso.uiuc.edu!bluestem.prairienet.org!mheins
From: mheins@bluestem.prairienet.org (Mike Heins)
Newsgroups: comp.unix.bsd.386bsd.misc,comp.lang.perl.misc
Subject: Re: i386 arch - getpeername func?
Followup-To: comp.unix.bsd.386bsd.misc,comp.lang.perl.misc
Date: 7 Nov 1995 06:17:10 GMT
Organization: University of Illinois at Urbana
Lines: 48
Message-ID: <47mtl6$oa2@vixen.cso.uiuc.edu>
References: <DHn9sy.Kow@nntpa.cb.att.com>
NNTP-Posting-Host: bluestem.prairienet.org
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.386bsd.misc:232 comp.lang.perl.misc:6619

-S.HORVATH (sjh@strat.ho.att.com) wrote:

: This is probably more a software eng' question rather than a perl or 
: 386 question, but here goes:   I want to run dump over a tcp socket,
: doing it via a perl script provided by the vendor of a backup product.
: It gags on the getpeername function, from what little I know of perl, it's
: I think it's really looking for a lower level system call.  Is there any way
: to get my machine to recognize this function?  Code snippet up to the line
: it bombs provided.  The users are locked in to this OS, so I can't upgrade
: it (before you offer the latest and greatest...)

: Thanks in advance,

: Steve
: *****

: system1> perl -v
:  
: This is perl, version 5.000
:   
: system1> uname -a
: system1 system1 3.2 2.3 i386

What the heck is that? i386 what?  Is it Interactive UNIX?
Or BSDI?

: system1> perl /usr/etc/btclientd
: Unsupported socket function "getpeername" called at /usr/etc/btclientd line 20.

Have you tried doing a 'man getpeername'?  Does the call exist
on i386, as it does on most systems?

Most (well, all) perl socket calls merely submit the proper
variables to the corresponding system call, and hook up the proper 
file descriptors.  Have you run h2ph?  That will create
the needed header files for the common socket calls.

Having said all that, I see that since standard input is
from the terminal, and not necessarily from a valid TCP socket, the 
getpeername call cannot be expected to work. What is supposed to be the 
caller of this perl script?  Where are you running it from?  

I suspect that it is intended to be run with a command line
like 'perl htclientd < something', or called from another script
which already has the standard input coming from a socket.

Regards,
Mike Heins