netname2user man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

rpc_misc(3)							   rpc_misc(3)

NAME
       rpc_misc, auth_destroy, authnone_create, authunix_create, authunix_cre‐
       ate_default,  get_myaddress,  getnetname,  host2netname,	 netname2host,
       netname2user,   pmap_getmaps,   pmap_getport,  pmap_rmtcall,  pmap_set,
       pmap_unset,  registerrpc,  rpc_createrr,	 usr2netname,	xprt_register,
       xprt_unregister	- miscellaneous library routines for ONC remote proce‐
       dure calls

SYNOPSIS
       #include <rpc/rpc.h>

       void auth_destroy(
	       AUTH *auth ); AUTH *authnone_create(
	       void ); AUTH *authunix_create(
	       char *host,
	       int uid,
	       int gid,
	       int len,
	       int *aup.gids ); AUTH *authunix_create_default(
	       void ); void get_myaddress(
	       struct sockaddr_in *addr ); getnetname(
	       char name [MAXNETNAMELEN] ); host2netname(
	       char *name,
	       char *host,
	       char *domain ); netname2host(
	       char *name,
	       char *host,
	       int hostlen ); netname2user(
	       char **name,
	       int *uidp,
	       int *gidp,
	       int *gidlenp,
	       int *gidlist ); struct pmaplist *pmap_getmaps(
	       struct sockaddr_in *addr ); u_short pmap_getport(
	       struct sockaddr_in *addr,
	       u_int prognum,
	       u_int versnum,
	       u_int protocol ); enum clnt_stat pmap_rmtcall(
	       struct sockaddr_in *addr,
	       u_int prognum,
	       u_int versnum,
	       u_int procnum,
	       xdrproc_t inproc,
	       char *in,
	       xdrproc_t outproc,
	       char *out,
	       struct timeval tout,
	       u_int *portp ); pmap_set(
	       u_int prognum,
	       u_int versnum,
	       u_int protocol,
	       u_short port ); pmap_unset(
	       u_int prognum,
	       u_int versnum ); registerrpc(
	       u_int prognum,
	       u_int versnum,
	       u_int procnum,
	       char *(*procname) (),
	       xdrproc_t inproc,
	       xdrproc_t outproc ); struct rpc_createerr rpc_createerr;

       user2netname(
	       char *name,
	       int uid,
	       char *domain ); void xprt_register(
	       SVCXPRT *xprt ); void xprt_unregister(
	       SVCXPRT *xprt );

DESCRIPTION
       The RPC routines allow C programs to  make  procedure  calls  on	 other
       machines	 across	 the  network.	First, the client calls a procedure to
       send a data packet to the server.  Upon	receipt	 of  the  packet,  the
       server  calls  a dispatch routine to perform the requested service, and
       then sends back a reply. Finally, the procedure	call  returns  to  the
       client.

       Unless  otherwise  indicated,  the routines described in this reference
       page are thread safe (that is, they can be  used	 safely	 in  a	multi‐
       threaded environment). Routines that are not thread safe are flagged as
       such.

       A macro that destroys the authentication	 information  associated  with
       auth.  Destruction usually involves deallocation of private data struc‐
       tures. The use of auth is undefined after calling auth_destroy().  Cre‐
       ates  and  returns  an  RPC authentication handle that passes nonusable
       authentication information with each remote procedure call. This is the
       default authentication used by ONC RPC.	Creates and returns an ONC RPC
       authentication handle that  contains  authentication  information.  The
       host  parameter is the name of the machine on which the information was
       created; uid is the user's user ID; gid is the user's current group ID;
       len  and	 aup_gids refer to a counted array of groups to which the user
       belongs.	 Calls	authunix_create()  with	 the  appropriate  parameters.
       Places  the  machine's  IP  address  into *addr, without consulting the
       library routines that deal with /etc/hosts.  The port number is	always
       set to htons(PMAPPORT).	Installs the unique, operating-system indepen‐
       dent network name of the caller in the fixed-length array name. Returns
       TRUE if it succeeds and FALSE if it fails.  Converts from a domain-spe‐
       cific host name to an operating-system independent network name. Return
       TRUE  if	 it succeeds and FALSE if it fails. Inverse of netname2host().
       Converts from an operating-system independent network name to a domain-
       specific	 host name. Returns TRUE if it succeeds and FALSE if it fails.
       Inverse of host2netname().  Converts from an operating-system  indepen‐
       dent network name to a domain-specific user ID. Returns TRUE if it suc‐
       ceeds and FALSE if it fails. Inverse of user2netname().	A user	inter‐
       face  to	 the  portmap service, which returns a list of the current RPC
       program-to-port mappings on the host located at IP address *addr.  This
       routine	can return NULL.  The rpcinfo -p command uses this routine.  A
       user interface to the portmap service, which returns the port number on
       which  waits  a	service	 that supports program number prognum, version
       versnum, and speaks the transport protocol  associated  with  protocol.
       The  value  of  protocol	 is  most likely IPPROTO_UDP or IPPROTO_TCP. A
       return value of zero means that the mapping does not exist or that  the
       RPC  system failed to contact the remote portmap service. In the latter
       case, the global variable rpc_createerr contains	 the  RPC  status.   A
       user  interface	to the portmap service, which instructs portmap on the
       host at IP address *addr to make an RPC call on your behalf to a proce‐
       dure  on	 that  host. The *portp parameter will be modified to the pro‐
       gram's port number if the procedure succeeds. The definitions of	 other
       parameters are provided in callrpc() and clnt_call() (see rpc_clnt(3)).
       This procedure should be used for a ping and nothing  else.   See  also
       clnt_broadcast().   A  user  interface  to  the	portmap service, which
       establishes a mapping between the triple [prognum,versnum,protocol] and
       port  on	 the  machine's	 portmap service. The value of protocol can be
       either IPPROTO_UDP or IPPROTO_TCP. This routine returns one (1)	if  it
       succeeds,  zero (0) otherwise. Automatically done by svc_register().  A
       user interface to the  portmap  service,	 which	destroys  all  mapping
       between	the  triple  [prognum,versnum,*]  and  ports  on the machine's
       portmap service. This routine returns one (1) if it succeeds, zero  (0)
       otherwise.   [Not  Thread  Safe]	 Registers procname procedure with the
       RPC service package. If a request arrives for prognum program,  versnum
       version,	 and  procnum  procedure, procname is called with a pointer to
       its parameter(s); progname  should  return  a  pointer  to  its	static
       result(s);  inproc  is  used  to decode the parameters while outproc is
       used to encode the results. This routine returns zero (0) if the regis‐
       tration succeeded, -1 otherwise.

	      Warning:	Remote procedures registered in this form are accessed
	      using the UDP/IP transport;  see	svcudp_create()	 for  restric‐
	      tions.   A  global variable whose value is set by any RPC client
	      creation routine that does not succeed. Use the  clnt_pcreateer‐
	      ror()  routine to print the reason for the error.	 Converts from
	      a domain-specific user name to an	 operating-system  independent
	      network name. Returns TRUE if it succeeds and FALSE if it fails.
	      Inverse of netname2user().  [Not Thread Safe]  After RPC service
	      transport	 handles  are created, they should register themselves
	      with the RPC service package. This routine modifies  the	global
	      variable	svc_fds. Service implementors usually do not need this
	      routine.	[Not Thread Safe]  Before  an  RPC  service  transport
	      handle  is  destroyed,  it should unregister itself with the RPC
	      service package.	This  routine  modifies	 the  global  variable
	      svc_fds. Service implementors usually do not need this routine.

SEE ALSO
       rpc_clnt(3), rpc_svc(3), rpc_xdr(3), xdr(3)

       Remote Procedure Calls: Protocol Specification -- RFC 1050

								   rpc_misc(3)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net