Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ netunam(3N) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

errnet(2)

netunam(1)

mknod(1M)

NETUNAM(3N)  —  Series 300, 500, 800 Only

NAME

netunam − establish access rights on a remote computer

SYNOPSIS

#include <sys/nusinf.h>

int netunam (network_special_file, login_string);
extern int errnet,errno;
char *network_special_file,*login_string;
netunam (network_special_file, login_string);

DESCRIPTION

Netunam is a Remote File Access (RFA) call that allows you to access remote files and directories on remote systems.  Netunam programmatically establishes access rights on remote computers where the files and directories you want to access reside.  Once you have established access rights using netunam, you can access the file system on the remote computer as though it were appended to your local file system.
 
Netunam allows you to access files and directories on remote HP 9000 Series 300, 500 and 800 systems with standard HP-UX commands and calls.  A process can have access to a maximum of 20 remote nodes at one time. 
 
Refer to the netunam(1) man page for more information.

Parameters

Network_special_file is a relative or absolute path name indicating the location of the network special file that references the computer you want to access.  A network special file is a file on your local computer that acts as a “pointer” from your local file system to the file system at a particular remote node.  There must be one network special file for each remote system that you want to access with RFA.  Your node manager creates network special files with the mknod command when nodes are initialized.  You should consult your node manager to determine the names and location of the network special files on your system before using netunam. The permission bits on network special files are not checked when you execute netunam.
 
Login_string is the login name and password for the remote computer referenced by the network special file specified in network_special_file in the form userID:password. There must be a valid entry in the remote computer’s /etc/password file.  The login_string may consist of up to 68 characters, including the colon and password.  The colon and password need not be specified if no password exists for the login.  The access rights associated with the login name and password determine your access rights on the remote file system. 
 
After a process executes netunam successfully, its access rights on the remote node remain valid until the process terminates, the process issues netunam with the same remote system but with a different login, or the process terminates its access rights explicitly by executing netunam with a null login_string. 
 
When linking programs that call netunam, you must refer to the NS library /user/lib/libn.a.  You must also include the header files /usr/include/sys/nusinf.h, /usr/include/sys/errno.h and /usr/include/sys/errnet.h.  The /usr/include/sys/nusinf.h file contains type declarations for the netunam call arguments.  Refer to "Diagnostics" below for information on errno and errnet. 

RETURN VALUE

Upon successful completion, a value of zero is returned from netunam. Otherwise, a value of -1 is returned.

DIAGNOSTICS

Errno is set to indicate the error.  Errno is an external variable whose value is set to a general HP-UX error message.  A complete list of errno values and error messages is provided in the HP-UX Reference Manual.  Errnet is an external variable whose value is set whenever a networking error occurs.  The value of errnet should be checked whenever an error occurs and errno has the value ENET.  A complete list of errnet values and error messages is provided in the Using Network Services manual (for Series 300), the Network Services/9000 LAN User’s Guide (for Series 500), and the Using Network Services (NS)/9000 Series 800 manual (for Series 800).  See also errnet(2).

EXAMPLE

In the following example, a connection is established with the remote system referenced by the network special file Admin.  The login name and password used is jim:secret.  The current working directory is /net, the directory that contains the network special file. 
 

  #include <stdio.h>
  #include <sys/nusinf.h>
  #include <errnet.h>
  #include <errno.h>
   int error;
  extern int errnet, errno;
  char *network_special_file, *login_string;
   main ()
  {
  network_special_file = "Admin";
  login_string = "jim:secret";
  error = netunam (network_special_file, login_string);
   if (error == -1)
     {
     printf ("ERROR errno=%d, errnet=%d0, errno, errnet);
     exit (-1);
     }
  }

DEPENDENCIES

Implemented on the Series 300 and 800 only. 

AUTHOR

HP

SEE ALSO

errnet(2), netunam(1), mknod(1M). 
 

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026