*BSD News Article 54685


Return to BSD News archive

Newsgroups: comp.unix.bsd.386bsd.misc,comp.lang.perl.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!chi-news.cic.net!news.midplains.net!gw2.att.com!nntpa!not-for-mail
From: sjh@strat.ho.att.com (-S.HORVATH)
Subject: i386 arch - getpeername func?
Message-ID: <DHn9sy.Kow@nntpa.cb.att.com>
Sender: news@nntpa.cb.att.com (Netnews Administration)
Nntp-Posting-Host: strat.ho.att.com
Organization: AT&T
Date: Mon, 6 Nov 1995 23:12:33 GMT
Lines: 52
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.386bsd.misc:234 comp.lang.perl.misc:7374


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

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

system1> cat /usr/etc/btclientd
#!/usr/bin/perl
#
# Copyright (c) 1994 by Delta Microsystems, Inc.
#
#
# btclientd -
#
 
 $IPPORT_RESERVED = 1024;
 $AF_INET = 2;
 $SOCK_STREAM = 1;
 $SOCKADDR = 'S n a4 x8';
 $AUTHFILE = "/.btclient";
  
  #
  # validate connection request
  #
   
$remote = getpeername(STDIN);
($family, $port, $raddr) = unpack($SOCKADDR, $remote);
if ($port >= $IPPORT_RESERVED) {
  die "btclientd: connection refused - connection from invalid port ($port)\n";

-- 
  ---------------------------------------------------------------------------
  Steve Horvath      |      sjh@hogpa.att.com      |      Holmdel, New Jersey