summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-12-18 12:45:11 +0000
committerru <ru@FreeBSD.org>2002-12-18 12:45:11 +0000
commit8746d263e1451855025dc83dde5176cc9f1fbe3f (patch)
treeee7f7ba4650cadf44410ca9a44676c72c96739b7 /lib/libc/rpc
parent160081aef68b0dc49b79d3b7702b75671d9c06ff (diff)
downloadFreeBSD-src-8746d263e1451855025dc83dde5176cc9f1fbe3f.zip
FreeBSD-src-8746d263e1451855025dc83dde5176cc9f1fbe3f.tar.gz
mdoc(7) police: "The .Fn function".
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r--lib/libc/rpc/bindresvport.36
-rw-r--r--lib/libc/rpc/des_crypt.36
-rw-r--r--lib/libc/rpc/getnetconfig.336
-rw-r--r--lib/libc/rpc/getnetpath.316
-rw-r--r--lib/libc/rpc/getrpcent.310
-rw-r--r--lib/libc/rpc/getrpcport.32
-rw-r--r--lib/libc/rpc/publickey.32
-rw-r--r--lib/libc/rpc/rpc_clnt_calls.34
-rw-r--r--lib/libc/rpc/rpc_clnt_create.310
-rw-r--r--lib/libc/rpc/rpc_secure.348
-rw-r--r--lib/libc/rpc/rpc_soc.32
-rw-r--r--lib/libc/rpc/rpc_svc_calls.32
-rw-r--r--lib/libc/rpc/rpc_svc_create.38
-rw-r--r--lib/libc/rpc/rpcbind.32
-rw-r--r--lib/libc/rpc/rtime.32
15 files changed, 144 insertions, 12 deletions
diff --git a/lib/libc/rpc/bindresvport.3 b/lib/libc/rpc/bindresvport.3
index 740dd15..28e86e5 100644
--- a/lib/libc/rpc/bindresvport.3
+++ b/lib/libc/rpc/bindresvport.3
@@ -19,9 +19,11 @@
.Ft int
.Fn bindresvport_sa "int sd" "struct sockaddr *sa"
.Sh DESCRIPTION
+The
.Fn bindresvport
and
.Fn bindresvport_sa
+functions
are used to bind a socket descriptor to a privileged
.Tn IP
port, that is, a
@@ -65,7 +67,9 @@ Function prototype of
is biased to
.Dv AF_INET
socket.
+The
.Fn bindresvport_sa
+function
acts exactly the same, with more neutral function prototype.
Note that both functions behave exactly the same, and
both support
@@ -82,7 +86,9 @@ If second argument was supplied,
and address family did not match between arguments.
.El
.Pp
+The
.Fn bindresvport
+function
may also fail and set
.Va errno
for any of the errors specified for the calls
diff --git a/lib/libc/rpc/des_crypt.3 b/lib/libc/rpc/des_crypt.3
index 0655d56..39b927b 100644
--- a/lib/libc/rpc/des_crypt.3
+++ b/lib/libc/rpc/des_crypt.3
@@ -18,9 +18,11 @@
.Ft void
.Fn des_setparity "char *key"
.Sh DESCRIPTION
+The
.Fn ecb_crypt
and
.Fn cbc_crypt
+functions
implement the
.Tn NBS
.Tn DES
@@ -30,12 +32,16 @@ These routines are faster and more general purpose than
They also are able to utilize
.Tn DES
hardware if it is available.
+The
.Fn ecb_crypt
+function
encrypts in
.Tn ECB
(Electronic Code Book)
mode, which encrypts blocks of data independently.
+The
.Fn cbc_crypt
+function
encrypts in
.Tn CBC
(Cipher Block Chaining)
diff --git a/lib/libc/rpc/getnetconfig.3 b/lib/libc/rpc/getnetconfig.3
index 74a4a21..241b946 100644
--- a/lib/libc/rpc/getnetconfig.3
+++ b/lib/libc/rpc/getnetconfig.3
@@ -37,7 +37,9 @@ The library routines described on this page
provide the application access to
the system network configuration database,
.Pa /etc/netconfig .
+The
.Fn getnetconfig
+function
returns a pointer to the
current entry in the
netconfig
@@ -45,10 +47,14 @@ database, formatted as a
.Ft "struct netconfig" .
Successive calls will return successive netconfig
entries in the netconfig database.
+The
.Fn getnetconfig
+function
can be used to search the entire netconfig
file.
+The
.Fn getnetconfig
+function
returns
.Dv NULL
at the end of the file.
@@ -63,18 +69,26 @@ has the effect of
to or
.Dq rewinding
the netconfig database.
+The
.Fn setnetconfig
+function
must be called before the first call to
.Fn getnetconfig
and may be called at any other time.
+The
.Fn setnetconfig
+function
need not be called before a call to
.Fn getnetconfigent .
+The
.Fn setnetconfig
+function
returns a unique handle to be used by
.Fn getnetconfig .
.Pp
+The
.Fn endnetconfig
+function
should be called when processing is complete to release resources for reuse.
.Fa handlep
is the handle obtained through
@@ -86,11 +100,15 @@ frees all memory allocated by
for the
.Ft "struct netconfig"
data structure.
+The
.Fn endnetconfig
+function
may not be called before
.Fn setnetconfig .
.Pp
+The
.Fn getnetconfigent
+function
returns a pointer
to the netconfig structure corresponding
to
@@ -102,13 +120,17 @@ if
is invalid
(that is, does not name an entry in the netconfig database).
.Pp
+The
.Fn freenetconfigent
+function
frees the netconfig structure pointed to by
.Fa netconfigp
(previously returned by
.Fn getnetconfigent ) .
.Pp
+The
.Fn nc_perror
+function
prints a message to the standard error indicating why any of the
above routines failed.
The message is prepended with the string
@@ -116,22 +138,28 @@ The message is prepended with the string
and a colon.
A newline character is appended at the end of the message.
.Pp
+The
.Fn nc_sperror
+function
is similar to
.Fn nc_perror
but instead of sending the message
to the standard error, will return a pointer to a string that
contains the error message.
.Pp
+The
.Fn nc_perror
and
.Fn nc_sperror
+functions
can also be used with the
.Ev NETPATH
access routines defined in
.Xr getnetpath 3 .
.Sh RETURN VALUES
+The
.Fn setnetconfig
+function
returns a unique handle to be used by
.Fn getnetconfig .
In the case of an error,
@@ -144,16 +172,22 @@ or
.Fn nc_sperror
can be used to print the reason for failure.
.Pp
+The
.Fn getnetconfig
+function
returns a pointer to the current entry in the netconfig
database, formatted as a
.Ft "struct netconfig" .
+The
.Fn getnetconfig
+function
returns
.Dv NULL
at the end of the file, or upon failure.
.Pp
+The
.Fn endnetconfig
+function
returns 0 on success and \-1 on failure
(for example, if
.Fn setnetconfig
@@ -168,7 +202,9 @@ structure corresponding to
otherwise it returns
.Dv NULL .
.Pp
+The
.Fn nc_sperror
+function
returns a pointer to a buffer which contains the error message string.
This buffer is overwritten on each call.
In multithreaded applications, this buffer is
diff --git a/lib/libc/rpc/getnetpath.3 b/lib/libc/rpc/getnetpath.3
index f2d7358..5dfe68a 100644
--- a/lib/libc/rpc/getnetpath.3
+++ b/lib/libc/rpc/getnetpath.3
@@ -42,7 +42,9 @@ The
.Ev NETPATH
variable is a list of colon-separated network identifiers.
.Pp
+The
.Fn getnetpath
+function
returns a pointer to the
netconfig database entry corresponding to the first valid
.Ev NETPATH
@@ -55,7 +57,9 @@ returns a pointer to the netconfig entry that corresponds to the next
valid
.Ev NETPATH
component.
+The
.Fn getnetpath
+function
can thus be used to search the netconfig database for all networks
included in the
.Ev NETPATH
@@ -73,14 +77,18 @@ A call to
to or
.Dq rewinds
.Ev NETPATH .
+The
.Fn setnetpath
+function
must be called before the first call to
.Fn getnetpath
and may be called at any other time.
It returns a handle that is used by
.Fn getnetpath .
.Pp
+The
.Fn getnetpath
+function
silently ignores invalid
.Ev NETPATH
components.
@@ -104,7 +112,9 @@ order in which they are listed.
.\"This proviso holds also for this
.\"whole manpage.
.Pp
+The
.Fn endnetpath
+function
may be called to
.Dq unbind
from
@@ -116,7 +126,9 @@ frees all memory allocated by
.Fn getnetpath
for the struct netconfig data structure.
.Sh RETURN VALUES
+The
.Fn setnetpath
+function
returns a handle that is used by
.Fn getnetpath .
In case of an error,
@@ -124,14 +136,18 @@ In case of an error,
returns
.Dv NULL .
.Pp
+The
.Fn endnetpath
+function
returns 0 on success and \-1 on failure
(for example, if
.Fn setnetpath
was not called previously).
+The
.Fn nc_perror
or
.Fn nc_sperror
+function
can be used to print out the reason for failure.
See
.Xr getnetconfig 3 .
diff --git a/lib/libc/rpc/getrpcent.3 b/lib/libc/rpc/getrpcent.3
index 190bf8a..862a89f 100644
--- a/lib/libc/rpc/getrpcent.3
+++ b/lib/libc/rpc/getrpcent.3
@@ -27,10 +27,12 @@
.Ft void
.Fn endrpcent void
.Sh DESCRIPTION
+The
.Fn getrpcent ,
.Fn getrpcbyname ,
and
.Fn getrpcbynumber
+functions
each return a pointer to an object with the
following structure
containing the broken-out
@@ -54,10 +56,14 @@ A zero terminated list of alternate names for the rpc program.
The rpc program number for this service.
.El
.Pp
+The
.Fn getrpcent
+function
reads the next line of the file, opening the file if necessary.
.Pp
+The
.Fn setrpcent
+function
opens and rewinds the file. If the
.Fa stayopen
flag is non-zero,
@@ -68,12 +74,16 @@ the other
.Dq getrpc
calls).
.Pp
+The
.Fn endrpcent
+function
closes the file.
.Pp
+The
.Fn getrpcbyname
and
.Fn getrpcbynumber
+functions
sequentially search from the beginning
of the file until a matching rpc program name or
program number is found, or until end-of-file is encountered.
diff --git a/lib/libc/rpc/getrpcport.3 b/lib/libc/rpc/getrpcport.3
index 3b67685..13985b4 100644
--- a/lib/libc/rpc/getrpcport.3
+++ b/lib/libc/rpc/getrpcport.3
@@ -13,7 +13,9 @@
.Ft int
.Fn getrpcport "char *host" "int prognum" "int versnum" "int proto"
.Sh DESCRIPTION
+The
.Fn getrpcport
+function
returns the port number for version
.Fa versnum
of the RPC program
diff --git a/lib/libc/rpc/publickey.3 b/lib/libc/rpc/publickey.3
index 6a46c9a..369ae8b 100644
--- a/lib/libc/rpc/publickey.3
+++ b/lib/libc/rpc/publickey.3
@@ -27,7 +27,9 @@
These routines are used to get public and secret keys from the
.Tn YP
database.
+The
.Fn getsecretkey
+function
has an extra argument,
.Fa passwd ,
which is used to decrypt the encrypted secret key stored in the database.
diff --git a/lib/libc/rpc/rpc_clnt_calls.3 b/lib/libc/rpc/rpc_clnt_calls.3
index 126efce..08435b8 100644
--- a/lib/libc/rpc/rpc_clnt_calls.3
+++ b/lib/libc/rpc/rpc_clnt_calls.3
@@ -166,7 +166,9 @@ Take the same arguments as
but instead of sending a message to the standard error
indicating why an RPC
call failed, return a pointer to a string which contains the message.
+The
.Fn clnt_sperrno
+function
is normally used instead of
.Fn clnt_perrno
when the program does not have a standard error (as a program
@@ -240,7 +242,9 @@ Warning:
broadcast file descriptors are limited in size to the
maximum transfer size of that transport.
For Ethernet, this value is 1500 bytes.
+The
.Fn rpc_broadcast
+function
uses
.Dv AUTH_SYS
credentials by default (see
diff --git a/lib/libc/rpc/rpc_clnt_create.3 b/lib/libc/rpc/rpc_clnt_create.3
index e6e9636..ca6f92e 100644
--- a/lib/libc/rpc/rpc_clnt_create.3
+++ b/lib/libc/rpc/rpc_clnt_create.3
@@ -119,7 +119,9 @@ The following operations are valid for connectionless transports only:
.Pp
The retry timeout is the time that RPC
waits for the server to reply before retransmitting the request.
+The
.Fn clnt_control
+function
returns
.Dv TRUE
on success and
@@ -139,7 +141,9 @@ The transports are tried in left to right order in
.Ev NETPATH
environment variable or in top to bottom order in
the netconfig database.
+The
.Fn clnt_create
+function
tries all the transports of the
.Fa nettype
class available from the
@@ -336,7 +340,9 @@ without any kernel or networking interference.
This routine returns
.Dv NULL
if it fails.
+The
.Fn clnt_raw_create
+function
should be called after
.Fn svc_raw_create .
.It Fn clnt_tli_create
@@ -406,7 +412,9 @@ except
.Fn clnt_tp_create
tries only one transport specified through
.Fa netconf .
+The
.Fn clnt_tp_create
+function
creates a client handle for the program
.Fa prognum ,
the version
@@ -466,7 +474,9 @@ The address
should not be
.Dv NULL
and should point to the actual address of the remote program.
+The
.Fn clnt_vc_create
+function
does not consult the remote rpcbind service for this information.
.It Xo
.Vt "struct rpc_createerr" Va rpc_createerr ;
diff --git a/lib/libc/rpc/rpc_secure.3 b/lib/libc/rpc/rpc_secure.3
index e90f7e4..27b9870 100644
--- a/lib/libc/rpc/rpc_secure.3
+++ b/lib/libc/rpc/rpc_secure.3
@@ -63,7 +63,9 @@ must be running for the
.Tn DES
authentication system to work.
.Pp
-.Fn Authdes_create ,
+The
+.Fn authdes_create
+function,
used on the client side, returns an authentication handle that
will enable the use of the secure authentication system.
The first parameter
@@ -110,7 +112,9 @@ generate a random
key to be used for the encryption of credentials.
If it is supplied, however, then it will be used instead.
.Pp
-.Fn Authdes_getucred ,
+The
+.Fn authdes_getucred
+function,
the second of the two
.Tn DES
authentication routines,
@@ -127,7 +131,9 @@ in that
pulls its information from a cache, and does not have to do a
Yellow Pages lookup every time it is called to get its information.
.Pp
-.Fn Getnetname
+The
+.Fn getnetname
+function
installs the unique, operating-system independent netname of
the
caller in the fixed-length array
@@ -138,7 +144,9 @@ if it succeeds and
.Dv FALSE
if it fails.
.Pp
-.Fn Host2netname
+The
+.Fn host2netname
+function
converts from a domain-specific hostname to an
operating-system independent netname.
Returns
@@ -149,7 +157,9 @@ if it fails.
Inverse of
.Fn netname2host .
.Pp
-.Fn Key_decryptsession
+The
+.Fn key_decryptsession
+function
is an interface to the keyserver daemon, which is associated
with
.Tn RPC Ns 's
@@ -167,7 +177,9 @@ and the
.Tn RPC
library are the main clients of these four routines.
.Pp
-.Fn Key_decryptsession
+The
+.Fn key_decryptsession
+function
takes a server netname and a
.Tn DES
key, and decrypts the key by
@@ -176,7 +188,9 @@ associated with the effective uid of the calling process. It
is the inverse of
.Fn key_encryptsession .
.Pp
-.Fn Key_encryptsession
+The
+.Fn key_encryptsession
+function
is a keyserver interface routine.
It
takes a server netname and a des key, and encrypts
@@ -185,7 +199,9 @@ associated with the effective uid of the calling process. It
is the inverse of
.Fn key_decryptsession .
.Pp
-.Fn Key_gendes
+The
+.Fn key_gendes
+function
is a keyserver interface routine.
It
is used to ask the keyserver for a secure conversation key.
@@ -196,14 +212,18 @@ because
the common ways of choosing random numbers, such as using the
current time, are very easy to guess.
.Pp
-.Fn Key_setsecret
+The
+.Fn key_setsecret
+function
is a keyserver interface routine.
It is used to set the key for
the effective
.Fa uid
of the calling process.
.Pp
-.Fn Netname2host
+The
+.Fn netname2host
+function
converts from an operating-system independent netname to a
domain-specific hostname.
Returns
@@ -213,7 +233,9 @@ if it succeeds and
if it fails. Inverse of
.Fn host2netname .
.Pp
-.Fn Netname2user
+The
+.Fn netname2user
+function
converts from an operating-system independent netname to a
domain-specific user ID.
Returns
@@ -224,7 +246,9 @@ if it fails.
Inverse of
.Fn user2netname .
.Pp
-.Fn User2netname
+The
+.Fn user2netname
+function
converts from a domain-specific username to an operating-system
independent netname.
Returns
diff --git a/lib/libc/rpc/rpc_soc.3 b/lib/libc/rpc/rpc_soc.3
index 14a5462..5bf4099 100644
--- a/lib/libc/rpc/rpc_soc.3
+++ b/lib/libc/rpc/rpc_soc.3
@@ -538,7 +538,9 @@ indicating why an
call failed, return a pointer to a string which contains
the message.
.Pp
+The
.Fn clnt_sperrno
+function
is used instead of
.Fn clnt_perrno
if the program does not have a standard error (as a program
diff --git a/lib/libc/rpc/rpc_svc_calls.3 b/lib/libc/rpc/rpc_svc_calls.3
index 78d98ec..82b82aa 100644
--- a/lib/libc/rpc/rpc_svc_calls.3
+++ b/lib/libc/rpc/rpc_svc_calls.3
@@ -103,7 +103,9 @@ either through one of the
.Xr rpc_svc_create 3
functions, or using
.Fn xprt_register .
+The
.Fn svc_exit
+function
has global scope and ends all RPC server activity.
.It Xo
.Vt fd_set Va svc_fdset
diff --git a/lib/libc/rpc/rpc_svc_create.3 b/lib/libc/rpc/rpc_svc_create.3
index ccc6544..23c0053 100644
--- a/lib/libc/rpc/rpc_svc_create.3
+++ b/lib/libc/rpc/rpc_svc_create.3
@@ -108,7 +108,9 @@ or 1 (indicating that the out of range request
should be silently ignored).
.El
.It Fn svc_create
+The
.Fn svc_create
+function
creates server handles for all the transports
belonging to the class
.Fa nettype .
@@ -125,7 +127,9 @@ is
it defaults to
.Qq netpath .
.Pp
+The
.Fn svc_create
+function
registers itself with the rpcbind
service (see
.Xr rpcbind 8 ) .
@@ -266,7 +270,9 @@ The server is not registered with the
.Xr rpcbind 8
service.
.It Fn svc_tp_create
+The
.Fn svc_tp_create
+function
creates a server handle for the network
specified by
.Fa netconf ,
@@ -279,7 +285,9 @@ and
.Fa versnum ;
this requires calling
.Fn svc_run .
+The
.Fn svc_tp_create
+function
returns the service handle if it succeeds,
otherwise a
.Dv NULL
diff --git a/lib/libc/rpc/rpcbind.3 b/lib/libc/rpc/rpcbind.3
index eec41b7..d9ccaaf 100644
--- a/lib/libc/rpc/rpcbind.3
+++ b/lib/libc/rpc/rpcbind.3
@@ -97,7 +97,9 @@ This routine returns
if it succeeds,
.Dv FALSE
if it fails.
+The
.Fn rpcb_gettime
+function
can be used to synchronize the time between the
client and the remote server.
.It Fn rpcb_rmtcall
diff --git a/lib/libc/rpc/rtime.3 b/lib/libc/rpc/rtime.3
index d402c26..5e85e9c 100644
--- a/lib/libc/rpc/rtime.3
+++ b/lib/libc/rpc/rtime.3
@@ -20,7 +20,9 @@
.Fa "struct timeval *timeout"
.Fc
.Sh DESCRIPTION
+The
.Fn rtime
+function
consults the Internet Time Server at the address pointed to by
.Fa addrp
and returns the remote time in the
OpenPOWER on IntegriCloud