Home | History | Annotate | Download | only in rpc
History log of /src/lib/libc/rpc/svc.c
RevisionDateAuthorComments
 1.41  23-Jan-2024  christos fix nested extern warnings
 1.40  21-Aug-2021  andvar fix mainly same typos as in my previous commit but outside sys/dev/dm.
 1.39  13-Nov-2015  christos Do proper accounting for the extra -1 slot. Perhaps this is too confusing
and it would be better to just access the array with [fd + 1] instead?
 1.38  13-Nov-2015  tron Remove now unnecessary cast.
 1.37  13-Nov-2015  tron Avoid broken state if realloc(3) fails.
 1.36  07-Nov-2015  christos check for errors and recover instead of core-dumping.
 1.35  06-Nov-2015  christos - Provide multi-threaded fdset's for everyone not just rump if requested.
- Abstract fd_set access, and don't limit the fd_set size.
- Maintain binary compatibility by keeping the old global variables around.
 1.34  11-Mar-2013  tron Replace previous Sun Microsystems, Inc. license with a standard
BSD 3-clause license granted by Oracle America, Inc..
This license change was approved by Wim Coekaerts, Senior Vice President,
Linux and Virtualization at Oracle Corporation.

This fixes PR lib/45293 by Pedro Giffuni.
 1.33  05-Mar-2013  christos make this usable from RUMP
 1.32  04-Mar-2013  christos PR/47617: Thorsten Brehm: Memory and socket leak in librpc
 1.31  20-Mar-2012  matt branches: 1.31.2;
Use C89 definitions
Remove use of __P
 1.30  08-Jul-2010  tron branches: 1.30.6; 1.30.8;
Explicitly cast argument of ffs(3) to fix lint error.
 1.29  08-Jul-2010  rmind svc_getreq[set]: use unsigned when assigning to fds_bits.
XXX: This code should not invade fd_set internals at all.
 1.28  25-Apr-2008  christos branches: 1.28.8;
- always check malloc results
- don't leak fds on error
- don't cast malloc
- don't cast NULL
 1.27  03-Dec-2005  yamt branches: 1.27.18;
- constify and remove __UNCONST from caller of clnt_call().
- use __UNCONST where approproate.
 1.26  29-Nov-2005  christos WARNS=4
 1.25  09-Sep-2005  christos Convert the rest of the code to use pollts for consistency. XXX: We should
really use kqueue.
 1.24  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.23  08-Nov-2002  fvdl * Adapt include files for rpc_com.h/rpc_internal.h split.
* Add rpc_control to svc.c
* Implement non-blocking connections.
 1.22  04-Jan-2001  lukem branches: 1.22.2; 1.22.4;
sprinkle _DIAGASSERT() appropriately. minor other cleanups
 1.21  06-Jul-2000  christos add __RPC_GETXID macro
don't const castway __rpc_getconf and __rpc_getconfig. It might try to
write const strings
fix non-portable casts
remove duplicated prototypes
cast things to proper types
remove extraneous casts to NULL
fix variable cast mismatches
remove register var declarations
 1.20  02-Jun-2000  fvdl Add new RPC code, based on Sun's TI-RPC code. Adapted to not use XTI,
but sockets instead, internally. Old, backward compatible interfaces
maintained.
 1.19  22-Jan-2000  mycroft branches: 1.19.2;
Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.18  20-Sep-1999  lukem back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.17  16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.16  20-Jan-1999  lukem * ensure memory is released if operations fail (in authunix_create(),
xdr_callmsg(), xprt_register(), svc_tcp(), svc_udp(), etc)
* don't attempt to close a socket filedescriptor if it's -1 (some from
freebsd, some i found)
* make the initial xid a little more random (from freebsd)
* fix some spelos and tyops in comments (some from freebsd)
* use warn() instead of warnx() for many errors; the user probably
wants to know what the error code was.
* knf & whitespace nitpicks
 1.15  15-Nov-1998  christos delint
 1.14  13-Feb-1998  lukem * in get_myaddress(); always return sockaddr_in containing localhost:PMAP_PORT.
(as recommended in Weiste Venema's portmap5_beta distribution)
* deprecate register
* use memmove instead of bcopy
* KNF includes
* use err/warn() instead of perror/fprintf(stderr,)
* fix some typos
 1.13  12-Feb-1998  lukem revert; we can't break the existing ABI and API
 1.12  10-Feb-1998  lukem major cleanup (to sync with changes made in include/rpc/*.h):
* use int32_t, size_t, in_port_t instead of long, u_int, u_short as appropriate
* use uid_t and gid_t instead of int
* KNF, fix typos and spellos
* use const as appropriate
* deprecate register
* use memmove instead of bcopy
* use err/warn()
 1.11  21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.10  13-Jul-1997  christos Fix RCSID's
Fix gcc warnings.
Add missing prototypes
 1.9  17-May-1996  jtc branches: 1.9.2;
Use memset instead of bzero to clear xports array.

To be strictly conforming, we should iterate through the array and set
each pointer to NULL. But memset is faster, and can be inlined by the
compiler. If we ever encounter a machine where a NULL ptr != all bits
zero, we'll have to handle this differently.
 1.8  16-May-1996  pk Clear `xports' array after allocation (PR#2424, Arne Juul).
 1.7  25-Feb-1995  cgd save my sanity; stop using Id.
 1.6  06-Jan-1995  pk svc_getreq(): pay attention to registered sockets only. This allows
passing a `fd_set' with unrelated bits set.
 1.5  04-Jan-1995  mycroft Remove local definitions of svc_maxfd.
 1.4  04-Dec-1994  cgd be much more careful with types, and add prototype everything.
 1.3  23-Aug-1994  deraadt branches: 1.3.2;
fix my dumb bug
 1.2  20-Aug-1994  deraadt rpc library no longer uses _rpc_dtablesize() internally -- keeps track
of highest active file descriptor. limit fd usage to FD_SETSIZE, until
a better solution is found. remove non-FD_SETSIZE code.
 1.1  07-Oct-1993  cgd move the rpc code into libc
 1.3.2.2  23-Aug-1994  deraadt fix my dumb bug
 1.3.2.1  23-Aug-1994  deraadt file svc.c was added on branch netbsd-1-0 on 1994-08-23 18:42:12 +0000
 1.9.2.1  16-Sep-1996  jtc snapshot namespace cleanup: rpc & xdr
 1.19.2.1  23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.22.4.1  06-Jan-2003  jmc Pull up revisions 1.22-1.23 (requested by fvdl in ticket #1037)
* Adapt include files for rpc_com.h/rpc_internal.h split.
* Implement non-blocking connections.
* Add rpc_control to svc.c
 1.22.2.2  11-Nov-2002  nathanw Catch up to -current
 1.22.2.1  08-Aug-2001  nathanw Convert to our threading style.
__REENT -> _REENTRANT
Statically initialize mutexes.
Use pthread thread-specific data semantics and once_t instead of Sun thread
semantics.
Use __isthreaded to detect presence of thread universe instead of _thr_main().
 1.27.18.1  18-May-2008  yamt sync with head.
 1.28.8.2  25-Apr-2008  christos - always check malloc results
- don't leak fds on error
- don't cast malloc
- don't cast NULL
 1.28.8.1  25-Apr-2008  christos file svc.c was added on branch christos-time_t on 2008-04-25 17:44:45 +0000
 1.30.8.1  14-Mar-2013  riz Pull up following revision(s) (requested by tron in ticket #843):
lib/libc/rpc/clnt_dg.c: revision 1.28
lib/libc/rpc/xdr_sizeof.c: revision 1.5
lib/libc/rpc/pmap_getport.c: revision 1.19
lib/libc/rpc/xdr_mem.c: revision 1.19
lib/libc/rpc/svc_run.c: revision 1.22
lib/libc/rpc/bindresvport.c: revision 1.25
lib/libc/rpc/svc_raw.c: revision 1.24
lib/libc/rpc/svc_dg.c: revision 1.17
lib/libc/rpc/getnetconfig.c: revision 1.21
lib/libc/rpc/auth_unix.c: revision 1.25
lib/libc/rpc/svc_auth.c: revision 1.17
lib/libc/rpc/clnt_vc.c: revision 1.21
lib/libc/rpc/svc_auth_unix.c: revision 1.21
lib/libc/rpc/rpcb_st_xdr.c: revision 1.10
lib/libc/rpc/pmap_getmaps.c: revision 1.18
lib/libc/rpc/getnetpath.c: revision 1.17
lib/libc/rpc/clnt_simple.c: revision 1.32
lib/libc/rpc/authunix_prot.c: revision 1.16
lib/libc/rpc/svc_dg.h: revision 1.2
lib/libc/rpc/svc_generic.c: revision 1.15
lib/libc/rpc/clnt_raw.c: revision 1.32
lib/libc/rpc/xdr_array.c: revision 1.19
lib/libc/rpc/pmap_prot.c: revision 1.12
lib/libc/rpc/clnt_bcast.c: revision 1.26
lib/libc/rpc/xdr_rec.c: revision 1.35
lib/libc/rpc/svc.c: revision 1.34
lib/libc/rpc/DISCLAIMER: revision 1.3
lib/libc/rpc/clnt_generic.c: revision 1.30
lib/libc/rpc/xdr.c: revision 1.33
lib/libc/rpc/auth_none.c: revision 1.16
lib/libc/rpc/pmap_rmt.c: revision 1.34
lib/libc/rpc/rpc_callmsg.c: revision 1.20
lib/libc/rpc/clnt_perror.c: revision 1.30
lib/libc/rpc/xdr_stdio.c: revision 1.19
lib/libc/rpc/rpc_commondata.c: revision 1.9
lib/libc/rpc/pmap_prot2.c: revision 1.17
lib/libc/rpc/pmap_clnt.c: revision 1.19
lib/libc/rpc/svc_simple.c: revision 1.33
lib/libc/rpc/rpcb_clnt.c: revision 1.29
lib/libc/rpc/rpc_prot.c: revision 1.21
lib/libc/rpc/rpc_dtablesize.c: revision 1.16
lib/libc/rpc/rpc_generic.c: revision 1.28
lib/libc/rpc/xdr_reference.c: revision 1.18
lib/libc/rpc/rpc_soc.c: revision 1.18
lib/libc/rpc/svc_vc.c: revision 1.30
lib/libc/rpc/getrpcent.c: revision 1.23
lib/libc/rpc/xdr_float.c: revision 1.38
lib/libc/rpc/rpcb_prot.c: revision 1.11
lib/libc/rpc/getrpcport.c: revision 1.18
Replace previous Sun Microsystems, Inc. license with a standard
BSD 3-clause license granted by Oracle America, Inc..
This license change was approved by Wim Coekaerts, Senior Vice President,
Linux and Virtualization at Oracle Corporation.
This fixes PR lib/45293 by Pedro Giffuni.
 1.30.6.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.30.6.1  17-Apr-2012  yamt sync with head
 1.31.2.1  23-Jun-2013  tls resync from head

RSS XML Feed