1*85f5e301Schristos /* $NetBSD: rpc_internal.h,v 1.9 2024/01/23 17:24:38 christos Exp $ */ 279d5b270Sfvdl 3388c103eSchristos /*- 4388c103eSchristos * Copyright (c) 2004 The NetBSD Foundation, Inc. 5388c103eSchristos * All rights reserved. 6388c103eSchristos * 7388c103eSchristos * This code is derived from software contributed to The NetBSD Foundation 8388c103eSchristos * by Frank van der Linden. 9388c103eSchristos * 10388c103eSchristos * Redistribution and use in source and binary forms, with or without 11388c103eSchristos * modification, are permitted provided that the following conditions 12388c103eSchristos * are met: 13388c103eSchristos * 1. Redistributions of source code must retain the above copyright 14388c103eSchristos * notice, this list of conditions and the following disclaimer. 15388c103eSchristos * 2. Redistributions in binary form must reproduce the above copyright 16388c103eSchristos * notice, this list of conditions and the following disclaimer in the 17388c103eSchristos * documentation and/or other materials provided with the distribution. 18388c103eSchristos * 19388c103eSchristos * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20388c103eSchristos * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21388c103eSchristos * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22388c103eSchristos * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23388c103eSchristos * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24388c103eSchristos * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25388c103eSchristos * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26388c103eSchristos * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27388c103eSchristos * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28388c103eSchristos * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29388c103eSchristos * POSSIBILITY OF SUCH DAMAGE. 30388c103eSchristos */ 3179d5b270Sfvdl /* 3279d5b270Sfvdl * Private include file for XDR functions only used internally in libc. 3379d5b270Sfvdl * These are not exported interfaces. 3479d5b270Sfvdl */ 3579d5b270Sfvdl 363b4cda0dSchristos bool_t __xdrrec_getrec(XDR *, enum xprt_stat *, bool_t); 373b4cda0dSchristos bool_t __xdrrec_setnonblock(XDR *, int); 383b4cda0dSchristos void __xprt_unregister_unlocked(SVCXPRT *); 393b4cda0dSchristos bool_t __svc_clean_idle(fd_set *, int, bool_t); 4079d5b270Sfvdl 413b4cda0dSchristos u_int __rpc_get_a_size(int); 423b4cda0dSchristos int __rpc_dtbsize(void); 433b4cda0dSchristos struct netconfig *__rpcgettp(int); 443b4cda0dSchristos int __rpc_get_default_domain(char **); 4579d5b270Sfvdl 463b4cda0dSchristos char *__rpc_taddr2uaddr_af(int, const struct netbuf *); 473b4cda0dSchristos struct netbuf *__rpc_uaddr2taddr_af(int, const char *); 483b4cda0dSchristos int __rpc_fixup_addr(struct netbuf *, const struct netbuf *); 493b4cda0dSchristos int __rpc_sockinfo2netid(struct __rpc_sockinfo *, const char **); 503b4cda0dSchristos int __rpc_seman2socktype(int); 513b4cda0dSchristos int __rpc_socktype2seman(int); 523b4cda0dSchristos void *rpc_nullproc(CLIENT *); 533b4cda0dSchristos int __rpc_sockisbound(int); 5479d5b270Sfvdl 553b4cda0dSchristos struct netbuf *__rpcb_findaddr(rpcprog_t, rpcvers_t, const struct netconfig *, 563b4cda0dSchristos const char *, CLIENT **); 573b4cda0dSchristos bool_t __rpc_control(int, void *); 5879d5b270Sfvdl 593b4cda0dSchristos char *_get_next_token(char *, int); 6079d5b270Sfvdl 613b4cda0dSchristos u_int32_t __rpc_getxid(void); 628b08fa0dSitojun #define __RPC_GETXID() (__rpc_getxid()) 6379d5b270Sfvdl 6479d5b270Sfvdl extern SVCXPRT **__svc_xports; 6579d5b270Sfvdl extern int __svc_maxrec; 66df8f5914Schristos extern int __svc_flags; 67*85f5e301Schristos extern int __rpc_lowvers; 68*85f5e301Schristos 69*85f5e301Schristos #ifdef _REENTRANT 70*85f5e301Schristos extern mutex_t authsvc_lock; 71*85f5e301Schristos extern mutex_t clnt_fd_lock; 72*85f5e301Schristos extern mutex_t clntraw_lock; 73*85f5e301Schristos extern mutex_t dupreq_lock; 74*85f5e301Schristos extern mutex_t loopnconf_lock; 75*85f5e301Schristos extern mutex_t ops_lock; 76*85f5e301Schristos extern mutex_t proglst_lock; 77*85f5e301Schristos extern mutex_t rpcsoc_lock; 78*85f5e301Schristos extern mutex_t svcraw_lock; 79*85f5e301Schristos extern mutex_t xprtlist_lock; 80*85f5e301Schristos extern rwlock_t rpcbaddr_cache_lock; 81*85f5e301Schristos extern rwlock_t svc_fd_lock; 82*85f5e301Schristos extern rwlock_t svc_lock; 83*85f5e301Schristos #endif 841eb9e03aSchristos 851eb9e03aSchristos int __clnt_sigfillset(sigset_t *); 86