#include <wintirpc.h>
#include <reentrant.h>
#include <sys/types.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <rpc/rpc.h>
#include "rpc_com.h"
Go to the source code of this file.
|
static struct svc_callout * | svc_find (rpcprog_t, rpcvers_t, struct svc_callout **, char *) |
|
static void | __xprt_do_unregister (SVCXPRT *xprt, bool_t dolock) |
|
void | xprt_register (SVCXPRT *xprt) |
|
void | xprt_unregister (SVCXPRT *xprt) |
|
void | __xprt_unregister_unlocked (SVCXPRT *xprt) |
|
bool_t | svc_reg (SVCXPRT *xprt, const rpcprog_t prog, const rpcvers_t vers, void *dispatch, const struct netconfig *nconf) |
|
void | svc_unreg (rpcprog_t prog, const rpcvers_t vers) const |
|
bool_t | svc_sendreply (SVCXPRT *xprt, xdrproc_t xdr_results, void *xdr_location) |
|
void | svcerr_noproc (SVCXPRT *xprt) |
|
void | svcerr_decode (SVCXPRT *xprt) |
|
void | svcerr_systemerr (SVCXPRT *xprt) |
|
void | svcerr_auth (SVCXPRT *xprt, enum auth_stat why) |
|
void | svcerr_weakauth (SVCXPRT *xprt) |
|
void | svcerr_noprog (SVCXPRT *xprt) |
|
void | svcerr_progvers (SVCXPRT *xprt, rpcvers_t low_vers, rpcvers_t high_vers) |
|
void | svc_getreq (int rdfds) |
|
void | svc_getreqset (fd_set *readfds) |
|
void | svc_getreq_common (SOCKET fd) |
|
void | svc_getreq_poll (struct pollfd *pfdp, int pollretval) |
|
bool_t | rpc_control (int what, void *arg) |
|
◆ max
Definition at line 63 of file svc.c.
◆ RQCRED_SIZE
#define RQCRED_SIZE 400 /* this size is excessive */ |
Definition at line 57 of file svc.c.
◆ SVC_VERSQUIET
Definition at line 59 of file svc.c.
◆ version_keepquiet
Definition at line 60 of file svc.c.
◆ __xprt_do_unregister()
Definition at line 143 of file svc.c.
146{
148
150
152
153#ifndef _WIN32
154 if (dolock)
162 break;
163 }
164 }
165 if (dolock)
167#else
169#endif
170}
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
Referenced by __xprt_unregister_unlocked(), and xprt_unregister().
◆ __xprt_unregister_unlocked()
Definition at line 134 of file svc.c.
135{
137}
static void __xprt_do_unregister(SVCXPRT *xprt, bool_t dolock)
Referenced by __svc_clean_idle().
◆ rpc_control()
Definition at line 784 of file svc.c.
785{
787
788 switch (what)
789 {
799 default:
800 break;
801 }
803}
#define RPC_SVC_CONNMAXREC_SET
#define RPC_SVC_CONNMAXREC_GET
◆ svc_find()
Definition at line 370 of file svc.c.
375{
377
379
382 {
383 if (((
s->sc_prog ==
prog) && (
s->sc_vers == vers)) &&
384 ((netid ==
NULL) || (
s->sc_netid ==
NULL) ||
385 (
strcmp (netid,
s->sc_netid) == 0)))
386 break;
388 }
391}
int strcmp(const char *String1, const char *String2)
static struct svc_callout * svc_head
Referenced by svc_reg(), and svc_unreg().
◆ svc_getreq()
Definition at line 604 of file svc.c.
606{
608
610
612}
void svc_getreqset(fd_set *readfds)
◆ svc_getreq_common()
Definition at line 641 of file svc.c.
642{
646 int prog_found;
651
652 msg.rm_call.cb_cred.oa_base = cred_area;
655
660
661 return;
662
663 do
664 {
666 {
667
668
671
673 r.rq_prog =
msg.rm_call.cb_prog;
674 r.rq_vers =
msg.rm_call.cb_vers;
675 r.rq_proc =
msg.rm_call.cb_proc;
676 r.rq_cred =
msg.rm_call.cb_cred;
677
679 {
681 goto call_done;
682 }
683
688 {
689 if (
s->sc_prog ==
r.rq_prog)
690 {
691 if (
s->sc_vers ==
r.rq_vers)
692 {
693 (*
s->sc_dispatch) (&
r, xprt);
694 goto call_done;
695 }
697 if (
s->sc_vers < low_vers)
698 low_vers =
s->sc_vers;
699 if (
s->sc_vers > high_vers)
700 high_vers =
s->sc_vers;
701 }
702 }
703
704
705
706
707 if (prog_found)
709 else
711
712 }
713
714
715
716
717
719
721 {
723 break;
724 }
726 call_done:
728 {
730 break;
731 }
733#ifdef HAVE_LIBGSSAPI
735#endif
736 ) {
738 }
739 }
741}
#define SVC_RECV(xprt, msg)
#define SVC_DESTROY(xprt)
GLdouble GLdouble GLdouble r
struct __svcauth::svc_auth_ops * svc_ah_ops
void svcerr_progvers(SVCXPRT *xprt, rpcvers_t low_vers, rpcvers_t high_vers)
void svcerr_noprog(SVCXPRT *xprt)
void svcerr_auth(SVCXPRT *xprt, enum auth_stat why)
enum auth_stat _authenticate(struct svc_req *rqst, struct rpc_msg *msg)
struct svc_auth_ops svc_auth_gss_ops
Referenced by svc_getreq_poll(), and svc_getreqset().
◆ svc_getreq_poll()
Definition at line 745 of file svc.c.
748{
750 int fds_found;
751
752 for (
i = fds_found = 0; fds_found < pollretval;
i++)
753 {
755
757 {
758
759 fds_found++;
760
761
762
763
764
765
766
767
768
769
770
772 {
776 }
777 else
779 }
780 }
781}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
void svc_getreq_common(SOCKET fd)
◆ svc_getreqset()
Definition at line 615 of file svc.c.
617{
618#ifndef _WIN32
620 fd_mask
mask, *maskp;
622
624
625 maskp = readfds->fds_bits;
627 {
628 for (
mask = *maskp++; (bit =
ffs (
mask)) != 0;
mask ^= (1 << (bit - 1)))
629 {
630
633 }
634 }
635#else
637#endif
638}
Referenced by svc_getreq(), and svc_run().
◆ svc_reg()
Definition at line 178 of file svc.c.
184{
191
192
194 {
197 }
199 {
202 }
204 {
208 }
210 {
212 }
213
216 {
217 if (netid)
220 goto rpcb_it;
223 }
226 {
227 if (netid)
231 }
232
239
242
243rpcb_it:
245
246 if (nconf)
247 {
248
250 &((
SVCXPRT *) xprt)->xp_ltaddr);
252 }
254}
void dispatch(HANDLE hStopEvent)
void freenetconfigent(struct netconfig *netconfigp)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
bool_t rpcb_set(rpcprog_t program, rpcvers_t version, const struct netconfig *nconf, const struct netbuf *address)
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)
struct netconfig * __rpcgettp(SOCKET)
static struct svc_callout * svc_find(rpcprog_t, rpcvers_t, struct svc_callout **, char *)
Referenced by rpc_reg(), svc_create(), and svc_tp_create().
◆ svc_sendreply()
Definition at line 399 of file svc.c.
403{
405
407
408 rply.rm_direction =
REPLY;
410 rply.acpted_rply.ar_verf = xprt->
xp_verf;
411 rply.acpted_rply.ar_stat =
SUCCESS;
412 rply.acpted_rply.ar_results.where = xdr_location;
413 rply.acpted_rply.ar_results.proc = xdr_results;
415}
#define SVC_REPLY(xprt, msg)
struct opaque_auth xp_verf
Referenced by _svcauth_gss(), and universal().
◆ svc_unreg()
Definition at line 260 of file svc.c.
263{
266
267
271 {
273 {
275 }
276 else
277 {
279 }
284 }
286}
#define mem_free(ptr, bsize)
bool_t rpcb_unset(rpcprog_t program, rpcvers_t version, const struct netconfig *nconf)
struct svc_callout * sc_next
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
◆ svcerr_auth()
◆ svcerr_decode()
Definition at line 439 of file svc.c.
441{
443
445
446 rply.rm_direction =
REPLY;
448 rply.acpted_rply.ar_verf = xprt->
xp_verf;
451}
Referenced by universal().
◆ svcerr_noproc()
Definition at line 421 of file svc.c.
423{
425
427
428 rply.rm_direction =
REPLY;
430 rply.acpted_rply.ar_verf = xprt->
xp_verf;
433}
◆ svcerr_noprog()
◆ svcerr_progvers()
◆ svcerr_systemerr()
Definition at line 457 of file svc.c.
459{
461
463
464 rply.rm_direction =
REPLY;
466 rply.acpted_rply.ar_verf = xprt->
xp_verf;
469}
◆ svcerr_weakauth()
◆ xprt_register()
◆ xprt_unregister()
◆ svc_fd_lock
◆ svc_head
◆ svc_lock