[comp.sys.isis] Man page: man3/lh_file_xfer_m.3

ken@gvax.cs.cornell.edu (Ken Birman) (02/13/90)

.TH LH_FILE_XFER_M 3  "1 February 1986" ISIS "ISIS LIBRARY FUNCTIONS"
.SH NAME
lh_file_xfer_m \-- ISIS long-haul file transfer function.
.SH SYNOPSIS
.B 
#include ``isis.h''
.PP
.B id = lh_file_xfer_m(gname,entry,dest,msg,fname);
.br
.B char *gname, *dest, *fname;
.br
.B int entry;
.br
.B message *msg;
.PP
.SH DESCRIPTION
.PP
The long haul file transfer primitive is used to send a file to
another group located in a remote ISIS cluster. 
This function assumes that the spooler process
is running and that its long haul communication option is already enabled (see
.IR spool(3)).
.PP
The basic long-haul file transfer mechanism is modelled after UUCP.
However, whereas UUCP assumes that the sender knows exactly where it wants
the file to go, the long-haul facility assumes that the file
location may not be important provided that the name is passed to a remote
process or process group that is interested in the file.
Consequently, the facility normally creates the file
in a convenient place and gives you the name of this location.  When using NFS, if your
installation has more than one file system, and if you use this mode,
the received file might be put on any of the file systems where the long_haul
facility can accept connections (this is specified in the long-haul
configuration file, which is specified to the spooler to start it in long-haul mode).
can determine the absolute name of the received file.
.PP
The basic interface to the facility is via 
.I lh_file_xfer_m(gname,entry,dest,msg,fname),
which
causes the specified file to be transfered to a remote cluster, where the
specified group will be informed by delivery of the \fImsg\fR.
The location where the file was stored may be determined by applying the function
.I get_fname_and_holder(msg)
to this message.
.SH ARGUMENTS
.PP
In a call to lh_file_xfer_m(gname,entry,dest,msg,fname),
.I gname
is the name of the group to whom this file is destined on the remote cluster.
.PP
.I entry
is the entry point of the remote group  where the file will be delivered.
.PP
.I dest
is the name of the remote cluster where is located the destinator group, as
specified in your long-haul configuration file.
In addition to a specific cluster name, the following wild-card 
destinations are also accepted: \fI"all"\fR, \fI"all_clusters"\fR, \fI"allClusters"\fR,
\fI"local"\fR, \fI"local_cluster"\fR, \fI"localCluster"\fR.
\fI"all"\fR, \fI"all_clusters"\fR, and \fI"allClusters"\fR are synonyms and trigger
the sending of the named file to all registered clusters.
\fI"local"\fR, \fI"local_cluster"\fR, and \fI"localCluster"\fR are synonyms too
and trigger the sending of the named file to the local cluster.
.PP
.I msg
is delivered to the remote group once the transfer of the file is completed (using
the specified
.I entry
point).
.PP
.I fname
is the absolute name of the file to be sent.
.PP
To determine where the file was placed, you should call
.I get_fname_and_holder(msg,lname,holder).
Interpretation of the information this routine returns also
requires some knowledge of your NFS configuration.
Here,
.I msg
is the message anouncing the arrival of the file;
\fIfname\fR is a character pointer and returns
the local file name where the file was saved; \fIholder\fR is a character pointer and returns
the name of ISIS site that received the file, as a pointer into the array ISIS calls
site_names[].
Notice that to access the file, you will need an NFS mount from the machine on which
the destination group is running to the NFS on which the spooler received and saved the
file.
If \fImsg\fR wasn't a legitimate message from the file transfer facility, both \fIlname\fR
and \fIholder\fR return a null pointer.
.PP
.SH NOTE
.PP
In the case of a local transfer, there is no actual data transfer since
this is unecessary. Therefore, the destinator group will receive the
absolute name of the file as provided by the sender as result of
the call to \fIget_fname_and_holder()\fR. The holder will be
the sender host.
.PP
.SH "SEE ALSO"
spool(3), ISIS(3)