History log of /netbsd-current/lib/libc/rpc/svc_vc.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.37 23-Jan-2024 christos

fix nested extern warnings


Revision tags: netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.36 07-Dec-2021 andvar

s/listner/listener/


# 1.35 08-Aug-2021 nia

introduce a SOL_LOCAL for unix-domain socket level socket options
as an alias of the current 0 used for these options, as in FreeBSD.

reviewed by many.


Revision tags: netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.34 10-Nov-2015 christos

fix compilation/lint


# 1.33 07-Nov-2015 christos

PR/50408: Pedro Giffuni: Provide a way for rpc to use poll(2) instead of
select(2), and the linux svc_pollfd and svc_maxpollfd members. Our select(2)
implementation does not suffer from the FD_SETSIZE limitation so this is
not turned on by default.


# 1.32 07-Nov-2015 christos

check for errors and recover instead of core-dumping.


# 1.31 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.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 1.30 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.29 05-Mar-2013 christos

make this usable from RUMP


# 1.28 04-Mar-2013 christos

PR/47617: Thorsten Brehm: Memory and socket leak in librpc


# 1.27 04-Mar-2013 christos

fix error messages and warnings.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
# 1.26 20-Mar-2012 matt

branches: 1.26.2;
Use C89 definitions
Remove use of __P


# 1.25 13-Mar-2012 christos

PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-0-5-RELEASE netbsd-6-0-4-RELEASE netbsd-6-0-3-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base
# 1.24 04-Feb-2011 christos

branches: 1.24.4; 1.24.6;
PR/44514: Andrey Simonenko: Buffer underflow in RPC library for non-blocking
TCP sockets


# 1.23 04-Feb-2011 christos

knf - no functional changes


Revision tags: matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.22 12-Feb-2009 lukem

branches: 1.22.2;
sign-compare fix


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 christos-time_t-nbase christos-time_t-base netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.21 25-Apr-2008 christos

branches: 1.21.8; 1.21.10;
- always check malloc results
- don't leak fds on error
- don't cast malloc
- don't cast NULL


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.20 17-Oct-2006 christos

branches: 1.20.16;
Only retry if we were able to clean up some descriptors, otherwise we get
into an infinite loop.


Revision tags: abandoned-netbsd-4-base
# 1.19 22-Jun-2006 christos

Centralize the TCP_NODELAY handling as discussed in tech-net.


# 1.18 22-Mar-2006 drochner

-fix uninitialized variable introduced in previous
(found by gcc:-)
-minor prototype cleanup


# 1.17 22-Mar-2006 christos

Coverity CID 2291: Move function call before allocating storage to prevent
memory leak on error.


# 1.16 22-Mar-2006 christos

Coverity CID 2292: Plug memory leak.


# 1.15 13-Dec-2005 jmc

XXXGCC: Make a local extern for abort and the vax compiler is happy again.


# 1.14 10-Dec-2005 christos

fix a typo , instead of ; From Johnny Billquist


# 1.13 09-Sep-2005 christos

Convert the rest of the code to use pollts for consistency. XXX: We should
really use kqueue.


Revision tags: netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.12 18-Jan-2003 thorpej

branches: 1.12.6; 1.12.10;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.11 12-Nov-2002 skrll

Add extern svc_fd_lock if __REENT and include rpc_internal.h only once.


# 1.10 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.


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.9 03-Mar-2002 cjep

branches: 1.9.2;
Fix spelling mistake (from Onno van der Linden; PR#15793).


# 1.8 04-Jan-2001 lukem

branches: 1.8.2;
whitespace consistency fixups


# 1.7 03-Aug-2000 fvdl

For an accepted connection (tcp), set xp_netid, as it might be examined
by some applications, most notably rpcbind.


# 1.6 08-Jul-2000 kleink

De-delint previous: svc_vc_rendezvous_ops() isn't unused unless the single
reference to it is accidently deleted; from Shuuichirou Murata in PR lib/10537.


# 1.5 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


Revision tags: netbsd-1-5-base
# 1.4 06-Jun-2000 fvdl

branches: 1.4.2; 1.4.4;
Correct misleading error messages.


# 1.3 05-Jun-2000 thorpej

- An initialized variable kept LOCAL_CREDS from being set on
the listen socket properly. This caused spurious rpcbind(8)
failures.
- Don't define a "credmsg" structure. Instead, dynamically
allocate a buffer of the correct size of the message with
CMSG_SPACE() and free it when we're done. This gets the
size of the buffer right on LP64 platforms, which has padding
for alignment thrown in.
- Check for non-present or truncated cred messages when recvmsg(2)
returns.


# 1.2 03-Jun-2000 fvdl

Zero out the xprt in makefd_xprt to avoid bad free() calls in some cases.


# 1.1 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.36 07-Dec-2021 andvar

s/listner/listener/


# 1.35 08-Aug-2021 nia

introduce a SOL_LOCAL for unix-domain socket level socket options
as an alias of the current 0 used for these options, as in FreeBSD.

reviewed by many.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.34 10-Nov-2015 christos

fix compilation/lint


# 1.33 07-Nov-2015 christos

PR/50408: Pedro Giffuni: Provide a way for rpc to use poll(2) instead of
select(2), and the linux svc_pollfd and svc_maxpollfd members. Our select(2)
implementation does not suffer from the FD_SETSIZE limitation so this is
not turned on by default.


# 1.32 07-Nov-2015 christos

check for errors and recover instead of core-dumping.


# 1.31 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.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 1.30 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.29 05-Mar-2013 christos

make this usable from RUMP


# 1.28 04-Mar-2013 christos

PR/47617: Thorsten Brehm: Memory and socket leak in librpc


# 1.27 04-Mar-2013 christos

fix error messages and warnings.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
# 1.26 20-Mar-2012 matt

branches: 1.26.2;
Use C89 definitions
Remove use of __P


# 1.25 13-Mar-2012 christos

PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-0-5-RELEASE netbsd-6-0-4-RELEASE netbsd-6-0-3-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base
# 1.24 04-Feb-2011 christos

branches: 1.24.4; 1.24.6;
PR/44514: Andrey Simonenko: Buffer underflow in RPC library for non-blocking
TCP sockets


# 1.23 04-Feb-2011 christos

knf - no functional changes


Revision tags: matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.22 12-Feb-2009 lukem

branches: 1.22.2;
sign-compare fix


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 christos-time_t-nbase christos-time_t-base netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.21 25-Apr-2008 christos

branches: 1.21.8; 1.21.10;
- always check malloc results
- don't leak fds on error
- don't cast malloc
- don't cast NULL


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.20 17-Oct-2006 christos

branches: 1.20.16;
Only retry if we were able to clean up some descriptors, otherwise we get
into an infinite loop.


Revision tags: abandoned-netbsd-4-base
# 1.19 22-Jun-2006 christos

Centralize the TCP_NODELAY handling as discussed in tech-net.


# 1.18 22-Mar-2006 drochner

-fix uninitialized variable introduced in previous
(found by gcc:-)
-minor prototype cleanup


# 1.17 22-Mar-2006 christos

Coverity CID 2291: Move function call before allocating storage to prevent
memory leak on error.


# 1.16 22-Mar-2006 christos

Coverity CID 2292: Plug memory leak.


# 1.15 13-Dec-2005 jmc

XXXGCC: Make a local extern for abort and the vax compiler is happy again.


# 1.14 10-Dec-2005 christos

fix a typo , instead of ; From Johnny Billquist


# 1.13 09-Sep-2005 christos

Convert the rest of the code to use pollts for consistency. XXX: We should
really use kqueue.


Revision tags: netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.12 18-Jan-2003 thorpej

branches: 1.12.6; 1.12.10;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.11 12-Nov-2002 skrll

Add extern svc_fd_lock if __REENT and include rpc_internal.h only once.


# 1.10 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.


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.9 03-Mar-2002 cjep

branches: 1.9.2;
Fix spelling mistake (from Onno van der Linden; PR#15793).


# 1.8 04-Jan-2001 lukem

branches: 1.8.2;
whitespace consistency fixups


# 1.7 03-Aug-2000 fvdl

For an accepted connection (tcp), set xp_netid, as it might be examined
by some applications, most notably rpcbind.


# 1.6 08-Jul-2000 kleink

De-delint previous: svc_vc_rendezvous_ops() isn't unused unless the single
reference to it is accidently deleted; from Shuuichirou Murata in PR lib/10537.


# 1.5 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


Revision tags: netbsd-1-5-base
# 1.4 06-Jun-2000 fvdl

branches: 1.4.2; 1.4.4;
Correct misleading error messages.


# 1.3 05-Jun-2000 thorpej

- An initialized variable kept LOCAL_CREDS from being set on
the listen socket properly. This caused spurious rpcbind(8)
failures.
- Don't define a "credmsg" structure. Instead, dynamically
allocate a buffer of the correct size of the message with
CMSG_SPACE() and free it when we're done. This gets the
size of the buffer right on LP64 platforms, which has padding
for alignment thrown in.
- Check for non-present or truncated cred messages when recvmsg(2)
returns.


# 1.2 03-Jun-2000 fvdl

Zero out the xprt in makefd_xprt to avoid bad free() calls in some cases.


# 1.1 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.35 08-Aug-2021 nia

introduce a SOL_LOCAL for unix-domain socket level socket options
as an alias of the current 0 used for these options, as in FreeBSD.

reviewed by many.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.34 10-Nov-2015 christos

fix compilation/lint


# 1.33 07-Nov-2015 christos

PR/50408: Pedro Giffuni: Provide a way for rpc to use poll(2) instead of
select(2), and the linux svc_pollfd and svc_maxpollfd members. Our select(2)
implementation does not suffer from the FD_SETSIZE limitation so this is
not turned on by default.


# 1.32 07-Nov-2015 christos

check for errors and recover instead of core-dumping.


# 1.31 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.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 1.30 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.29 05-Mar-2013 christos

make this usable from RUMP


# 1.28 04-Mar-2013 christos

PR/47617: Thorsten Brehm: Memory and socket leak in librpc


# 1.27 04-Mar-2013 christos

fix error messages and warnings.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
# 1.26 20-Mar-2012 matt

branches: 1.26.2;
Use C89 definitions
Remove use of __P


# 1.25 13-Mar-2012 christos

PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-0-5-RELEASE netbsd-6-0-4-RELEASE netbsd-6-0-3-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base
# 1.24 04-Feb-2011 christos

branches: 1.24.4; 1.24.6;
PR/44514: Andrey Simonenko: Buffer underflow in RPC library for non-blocking
TCP sockets


# 1.23 04-Feb-2011 christos

knf - no functional changes


Revision tags: matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.22 12-Feb-2009 lukem

branches: 1.22.2;
sign-compare fix


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 christos-time_t-nbase christos-time_t-base netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.21 25-Apr-2008 christos

branches: 1.21.8; 1.21.10;
- always check malloc results
- don't leak fds on error
- don't cast malloc
- don't cast NULL


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.20 17-Oct-2006 christos

branches: 1.20.16;
Only retry if we were able to clean up some descriptors, otherwise we get
into an infinite loop.


Revision tags: abandoned-netbsd-4-base
# 1.19 22-Jun-2006 christos

Centralize the TCP_NODELAY handling as discussed in tech-net.


# 1.18 22-Mar-2006 drochner

-fix uninitialized variable introduced in previous
(found by gcc:-)
-minor prototype cleanup


# 1.17 22-Mar-2006 christos

Coverity CID 2291: Move function call before allocating storage to prevent
memory leak on error.


# 1.16 22-Mar-2006 christos

Coverity CID 2292: Plug memory leak.


# 1.15 13-Dec-2005 jmc

XXXGCC: Make a local extern for abort and the vax compiler is happy again.


# 1.14 10-Dec-2005 christos

fix a typo , instead of ; From Johnny Billquist


# 1.13 09-Sep-2005 christos

Convert the rest of the code to use pollts for consistency. XXX: We should
really use kqueue.


Revision tags: netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.12 18-Jan-2003 thorpej

branches: 1.12.6; 1.12.10;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.11 12-Nov-2002 skrll

Add extern svc_fd_lock if __REENT and include rpc_internal.h only once.


# 1.10 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.


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.9 03-Mar-2002 cjep

branches: 1.9.2;
Fix spelling mistake (from Onno van der Linden; PR#15793).


# 1.8 04-Jan-2001 lukem

branches: 1.8.2;
whitespace consistency fixups


# 1.7 03-Aug-2000 fvdl

For an accepted connection (tcp), set xp_netid, as it might be examined
by some applications, most notably rpcbind.


# 1.6 08-Jul-2000 kleink

De-delint previous: svc_vc_rendezvous_ops() isn't unused unless the single
reference to it is accidently deleted; from Shuuichirou Murata in PR lib/10537.


# 1.5 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


Revision tags: netbsd-1-5-base
# 1.4 06-Jun-2000 fvdl

branches: 1.4.2; 1.4.4;
Correct misleading error messages.


# 1.3 05-Jun-2000 thorpej

- An initialized variable kept LOCAL_CREDS from being set on
the listen socket properly. This caused spurious rpcbind(8)
failures.
- Don't define a "credmsg" structure. Instead, dynamically
allocate a buffer of the correct size of the message with
CMSG_SPACE() and free it when we're done. This gets the
size of the buffer right on LP64 platforms, which has padding
for alignment thrown in.
- Check for non-present or truncated cred messages when recvmsg(2)
returns.


# 1.2 03-Jun-2000 fvdl

Zero out the xprt in makefd_xprt to avoid bad free() calls in some cases.


# 1.1 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.


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.34 10-Nov-2015 christos

fix compilation/lint


# 1.33 07-Nov-2015 christos

PR/50408: Pedro Giffuni: Provide a way for rpc to use poll(2) instead of
select(2), and the linux svc_pollfd and svc_maxpollfd members. Our select(2)
implementation does not suffer from the FD_SETSIZE limitation so this is
not turned on by default.


# 1.32 07-Nov-2015 christos

check for errors and recover instead of core-dumping.


# 1.31 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.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base tls-maxphys-base
# 1.30 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.29 05-Mar-2013 christos

make this usable from RUMP


# 1.28 04-Mar-2013 christos

PR/47617: Thorsten Brehm: Memory and socket leak in librpc


# 1.27 04-Mar-2013 christos

fix error messages and warnings.


Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
# 1.26 20-Mar-2012 matt

branches: 1.26.2;
Use C89 definitions
Remove use of __P


# 1.25 13-Mar-2012 christos

PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-0-5-RELEASE netbsd-6-0-4-RELEASE netbsd-6-0-3-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base
# 1.24 04-Feb-2011 christos

branches: 1.24.4; 1.24.6;
PR/44514: Andrey Simonenko: Buffer underflow in RPC library for non-blocking
TCP sockets


# 1.23 04-Feb-2011 christos

knf - no functional changes


Revision tags: matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.22 12-Feb-2009 lukem

branches: 1.22.2;
sign-compare fix


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 christos-time_t-nbase christos-time_t-base netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.21 25-Apr-2008 christos

branches: 1.21.8; 1.21.10;
- always check malloc results
- don't leak fds on error
- don't cast malloc
- don't cast NULL


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.20 17-Oct-2006 christos

branches: 1.20.16;
Only retry if we were able to clean up some descriptors, otherwise we get
into an infinite loop.


Revision tags: abandoned-netbsd-4-base
# 1.19 22-Jun-2006 christos

Centralize the TCP_NODELAY handling as discussed in tech-net.


# 1.18 22-Mar-2006 drochner

-fix uninitialized variable introduced in previous
(found by gcc:-)
-minor prototype cleanup


# 1.17 22-Mar-2006 christos

Coverity CID 2291: Move function call before allocating storage to prevent
memory leak on error.


# 1.16 22-Mar-2006 christos

Coverity CID 2292: Plug memory leak.


# 1.15 13-Dec-2005 jmc

XXXGCC: Make a local extern for abort and the vax compiler is happy again.


# 1.14 10-Dec-2005 christos

fix a typo , instead of ; From Johnny Billquist


# 1.13 09-Sep-2005 christos

Convert the rest of the code to use pollts for consistency. XXX: We should
really use kqueue.


Revision tags: netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.12 18-Jan-2003 thorpej

branches: 1.12.6; 1.12.10;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.11 12-Nov-2002 skrll

Add extern svc_fd_lock if __REENT and include rpc_internal.h only once.


# 1.10 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.


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.9 03-Mar-2002 cjep

branches: 1.9.2;
Fix spelling mistake (from Onno van der Linden; PR#15793).


# 1.8 04-Jan-2001 lukem

branches: 1.8.2;
whitespace consistency fixups


# 1.7 03-Aug-2000 fvdl

For an accepted connection (tcp), set xp_netid, as it might be examined
by some applications, most notably rpcbind.


# 1.6 08-Jul-2000 kleink

De-delint previous: svc_vc_rendezvous_ops() isn't unused unless the single
reference to it is accidently deleted; from Shuuichirou Murata in PR lib/10537.


# 1.5 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


Revision tags: netbsd-1-5-base
# 1.4 06-Jun-2000 fvdl

branches: 1.4.2; 1.4.4;
Correct misleading error messages.


# 1.3 05-Jun-2000 thorpej

- An initialized variable kept LOCAL_CREDS from being set on
the listen socket properly. This caused spurious rpcbind(8)
failures.
- Don't define a "credmsg" structure. Instead, dynamically
allocate a buffer of the correct size of the message with
CMSG_SPACE() and free it when we're done. This gets the
size of the buffer right on LP64 platforms, which has padding
for alignment thrown in.
- Check for non-present or truncated cred messages when recvmsg(2)
returns.


# 1.2 03-Jun-2000 fvdl

Zero out the xprt in makefd_xprt to avoid bad free() calls in some cases.


# 1.1 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.