This is from the document gopher_anon:[customer_support.mail_archives.info-multinet]info-multinet.1992-11;1

X-ST-Status: N
Return-path: 
Received: from UARS.ACD.UCAR.EDU ([128.117.32.2]) by TGV.COM via INTERNET ;
          Wed, 11 Nov 92 13:23:02 PST
Date:    Wed, 11 Nov 1992 21:23:00 GMT
From:    PACK@UARS.ACD.UCAR.EDU (Daniel Packman (303) 497-1427)
Message-Id: <921111212300.c22@UARS.ACD.UCAR.EDU>
Subject: RMTALLOC problem with aix solved
To:      info-multinet@TGV.COM, busma@tgv.com
X-Vmsmail-To: SMTP%"info-multinet@TGV.COM",SMTP%"busma@tgv.com"

Some time ago I mentioned a problem with the rmt client when
used on a tape on a remote IBM RS6000/AIX machine.  It turns out
that AIX has a non-standard idea of ioctl numbers.  The following
perl script, when installed on the AIX machine in the place of the
symbolic link "/etc/rmt", intercepts and translates the ioctl numbers
to the local values.  RMTALLOC/MOUNT/COPY all work now.


#!/bin/perl
# Wrapper to convert input rmt requests to
# AIX 3.2 ioctl numbers.  We pass on all commands we don't understand
# I0 MTWEOF -> I10  STWEOF write and end-of-file record
# I1 MTFSF  -> I11  STFSF  forward space file
# I2 MTBSF  -> I12  STRSF  reverse space file
# I3 MTFSR  -> I13  STFSR  forward space record
# I4 MTBSR  -> I14  STRSR  reverse space record
# I5 MTREW  -> I6   STREW  rewind
# I6 MTOFFL -> I5   STOFFL rewind and unload tape
# I7 MTNOP  -> I0   (no-op? should ignore following count)
# I8 MTRETEN-> I8   STRETEN retension tape, leave at load point
# I9 MTERASE-> I7   STERASE erase tape, leave at load point
#I10 MTEOM (position to end of media ... no ibm equivalent?)
#I11 MTNBSF  (backward space file to BOF ... no ibm equivalent?)
@iocs = (10,11,12,13,14,6,5,0,8,7);
open(RMT,"|/usr/sbin/rmt") || die "Can't open pipe to rmt\n";
select(RMT);
$| = 1;
while () {
  s/(^I)(\d$)/I$iocs[$2]/;
  exit 0 if $_ =~ /^[Qq]/;
  print RMT $_ ; }
exit 0;




