ReactOS 0.4.15-dev-7988-g06a3508
rpc_com.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RPC_MAXDATASIZE   9000
 
#define RPC_MAXADDRSIZE   1024
 
#define __RPC_GETXID(now)
 

Functions

__BEGIN_DECLS u_int __rpc_get_a_size (int)
 
int __rpc_dtbsize (void)
 
struct netconfig__rpcgettp (SOCKET)
 
int __rpc_get_default_domain (char **)
 
struct netbuf__rpc_set_netbuf (struct netbuf *, const void *, size_t)
 
char__rpc_taddr2uaddr_af (int, const struct netbuf *)
 
struct netbuf__rpc_uaddr2taddr_af (int, const char *)
 
int __rpc_fixup_addr (struct netbuf *, const struct netbuf *)
 
int __rpc_sockinfo2netid (struct __rpc_sockinfo *, const char **)
 
int __rpc_seman2socktype (int)
 
int __rpc_socktype2seman (int)
 
voidrpc_nullproc (CLIENT *)
 
int __rpc_sockisbound (SOCKET)
 
struct netbuf__rpcb_findaddr (rpcprog_t, rpcvers_t, const struct netconfig *, const char *, CLIENT **)
 
struct netbuf__rpcb_findaddr_timed (rpcprog_t, rpcvers_t, const struct netconfig *, const char *host, CLIENT **clpp, struct timeval *tp)
 
bool_t __rpc_control (int, void *)
 
char_get_next_token (char *, int)
 
bool_t __svc_clean_idle (fd_set *, int, bool_t)
 
bool_t __xdrrec_setnonblock (XDR *, int)
 
bool_t __xdrrec_setblock (XDR *)
 
bool_t __xdrrec_getrec (XDR *, enum xprt_stat *, bool_t)
 
void __xprt_unregister_unlocked (SVCXPRT *)
 
void __xprt_set_raddr (SVCXPRT *, const struct sockaddr_storage *)
 

Variables

SVCXPRT ** __svc_xports
 
int __svc_maxrec
 

Macro Definition Documentation

◆ __RPC_GETXID

#define __RPC_GETXID (   now)
Value:
((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \
(u_int32_t)(now)->tv_usec)
time_t now
Definition: finger.c:65
unsigned int u_int32_t
Definition: rosdhcp.h:35
#define getpid
Definition: wintirpc.h:52

Definition at line 58 of file rpc_com.h.

◆ RPC_MAXADDRSIZE

#define RPC_MAXADDRSIZE   1024

Definition at line 52 of file rpc_com.h.

◆ RPC_MAXDATASIZE

#define RPC_MAXDATASIZE   9000

Definition at line 51 of file rpc_com.h.

Function Documentation

◆ __rpc_control()

bool_t __rpc_control ( int  request,
void info 
)

Definition at line 108 of file rpcb_clnt.c.

111{
112 switch (request) {
114 *(struct timeval *)info = tottimeout;
115 break;
117 tottimeout = *(struct timeval *)info;
118 break;
119 case CLCR_SET_LOWVERS:
120 __rpc_lowvers = *(int *)info;
121 break;
122 case CLCR_GET_LOWVERS:
123 *(int *)info = __rpc_lowvers;
124 break;
125 default:
126 return (FALSE);
127 }
128 return (TRUE);
129}
#define CLCR_GET_LOWVERS
Definition: clnt.h:177
#define CLCR_SET_LOWVERS
Definition: clnt.h:176
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
int __rpc_lowvers
static struct timeval tottimeout
Definition: rpcb_clnt.c:63
#define CLCR_SET_RPCB_TIMEOUT
Definition: rpcb_clnt.c:87
#define CLCR_GET_RPCB_TIMEOUT
Definition: rpcb_clnt.c:86
Definition: tftpd.h:86

◆ __rpc_dtbsize()

int __rpc_dtbsize ( void  )

Definition at line 110 of file rpc_generic.c.

111{
112#ifdef _WIN32
114#else
115
116 static int tbsize;
117 struct rlimit rl;
118
119 if (tbsize) {
120 return (tbsize);
121 }
122 if (getrlimit(RLIMIT_NOFILE, &rl) == 0) {
123 return (tbsize = (int)rl.rlim_max);
124 }
125 /*
126 * Something wrong. I'll try to save face by returning a
127 * pessimistic number.
128 */
129 return (32);
130#endif
131}
#define WINSOCK_HANDLE_HASH_SIZE
Definition: wintirpc.h:69

Referenced by clnt_dg_create(), and clnt_vc_create().

◆ __rpc_fixup_addr()

int __rpc_fixup_addr ( struct netbuf new,
const struct netbuf svc 
)

Definition at line 883 of file rpc_generic.c.

884{
885#ifdef INET6
886 struct sockaddr *sa_new, *sa_svc;
887 struct sockaddr_in6 *sin6_new, *sin6_svc;
888
889 sa_svc = (struct sockaddr *)svc->buf;
890 sa_new = (struct sockaddr *)new->buf;
891
892 if (sa_new->sa_family == sa_svc->sa_family &&
893 sa_new->sa_family == AF_INET6) {
894 sin6_new = (struct sockaddr_in6 *)new->buf;
895 sin6_svc = (struct sockaddr_in6 *)svc->buf;
896
897 if ((IN6_IS_ADDR_LINKLOCAL(&sin6_new->sin6_addr) &&
898 IN6_IS_ADDR_LINKLOCAL(&sin6_svc->sin6_addr)) ||
899 (IN6_IS_ADDR_SITELOCAL(&sin6_new->sin6_addr) &&
900 IN6_IS_ADDR_SITELOCAL(&sin6_svc->sin6_addr))) {
901 sin6_new->sin6_scope_id = sin6_svc->sin6_scope_id;
902 }
903 }
904#endif
905 return 1;
906}
void * buf
Definition: types.h:147
ULONG sin6_scope_id
Definition: ws2ipdef.h:184
IN6_ADDR sin6_addr
Definition: ws2ipdef.h:182
u_short sa_family
Definition: winsock.h:217
#define new(TYPE, numElems)
Definition: treelist.c:54
#define AF_INET6
Definition: winsock.h:369
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_SITELOCAL(CONST IN6_ADDR *a)
Definition: ws2ipdef.h:371
WS2TCPIP_INLINE BOOLEAN IN6_IS_ADDR_LINKLOCAL(CONST IN6_ADDR *a)
Definition: ws2ipdef.h:364

Referenced by __rpcb_findaddr_timed().

◆ __rpc_get_a_size()

__BEGIN_DECLS u_int __rpc_get_a_size ( int  af)

Definition at line 172 of file rpc_generic.c.

174{
175 switch (af) {
176 case AF_INET:
177 return sizeof (struct sockaddr_in);
178#ifdef INET6
179 case AF_INET6:
180 return sizeof (struct sockaddr_in6);
181#endif
182#ifdef AF_LOCAL
183 case AF_LOCAL:
184 return sizeof (struct sockaddr_un);
185#endif
186 default:
187 break;
188 }
189 return ((u_int)RPC_MAXADDRSIZE);
190}
UINT32 u_int
Definition: types.h:82
#define AF_INET
Definition: tcpip.h:117
#define RPC_MAXADDRSIZE
Definition: rpc_com.h:52

Referenced by rpc_broadcast_exp().

◆ __rpc_get_default_domain()

int __rpc_get_default_domain ( char **  domain)

Definition at line 72 of file rpcdname.c.

74{
75 if ((*domain = get_default_domain()) != 0)
76 return (0);
77 return (-1);
78}
static char * get_default_domain()
Definition: rpcdname.c:43
Definition: cookie.c:42

Referenced by host2netname(), netname2host(), netname2user(), and user2netname().

◆ __rpc_seman2socktype()

int __rpc_seman2socktype ( int  semantics)

Definition at line 842 of file rpc_generic.c.

843{
844 switch (semantics) {
845 case NC_TPI_CLTS:
846 return SOCK_DGRAM;
847 case NC_TPI_COTS_ORD:
848 return SOCK_STREAM;
849 case NC_TPI_RAW:
850 return SOCK_RAW;
851 default:
852 break;
853 }
854
855 return -1;
856}
#define SOCK_STREAM
Definition: tcpip.h:118
#define NC_TPI_CLTS
Definition: netconfig.h:35
#define NC_TPI_COTS_ORD
Definition: netconfig.h:37
#define NC_TPI_RAW
Definition: netconfig.h:38
#define SOCK_RAW
Definition: winsock.h:337
#define SOCK_DGRAM
Definition: winsock.h:336

◆ __rpc_set_netbuf()

struct netbuf * __rpc_set_netbuf ( struct netbuf nb,
const void ptr,
size_t  len 
)

Definition at line 951 of file rpc_generic.c.

952{
953 if (nb->len != len) {
954 if (nb->len)
955 mem_free(nb->buf, nb->len);
956 nb->buf = mem_alloc(len);
957 if (nb->buf == NULL)
958 return NULL;
959
960 nb->maxlen = nb->len = len;
961 }
962 memcpy(nb->buf, ptr, len);
963 return nb;
964}
#define mem_free(ptr, bsize)
Definition: types.h:124
#define NULL
Definition: types.h:112
#define mem_alloc(bsize)
Definition: types.h:123
GLenum GLsizei len
Definition: glext.h:6722
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
unsigned int len
Definition: types.h:146
unsigned int maxlen
Definition: types.h:145

Referenced by rendezvous_request(), svc_dg_create(), svc_dg_recv(), svc_fd_create(), and svc_vc_create().

◆ __rpc_sockinfo2netid()

int __rpc_sockinfo2netid ( struct __rpc_sockinfo sip,
const char **  netid 
)

Definition at line 580 of file rpc_generic.c.

581{
582 int i;
583 struct netconfig *nconf;
584
585 nconf = getnetconfigent("local");
586
587 for (i = 0; i < (sizeof na_cvt) / (sizeof (struct netid_af)); i++) {
588 if (na_cvt[i].af == sip->si_af &&
589 na_cvt[i].protocol == sip->si_proto) {
590 if (strcmp(na_cvt[i].netid, "local") == 0 && nconf == NULL) {
591 if (netid)
592 *netid = "unix";
593 } else {
594 if (netid)
595 *netid = na_cvt[i].netid;
596 }
597 if (nconf != NULL)
598 freenetconfigent(nconf);
599 return 1;
600 }
601 }
602 if (nconf != NULL)
603 freenetconfigent(nconf);
604
605 return 0;
606}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
void freenetconfigent(struct netconfig *netconfigp)
Definition: getnetconfig.c:530
struct netconfig * getnetconfigent(char *netid) const
Definition: getnetconfig.c:432
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
Definition: glfuncs.h:248
static const struct netid_af na_cvt[]
Definition: rpc_generic.c:88
ADDRESS_FAMILY si_af
Definition: types.h:165
int si_proto
Definition: types.h:166

Referenced by makefd_xprt().

◆ __rpc_sockisbound()

int __rpc_sockisbound ( SOCKET  fd)

Definition at line 909 of file rpc_generic.c.

910{
911 struct sockaddr_storage ss;
912 union {
913 struct sockaddr_in sin;
914 struct sockaddr_in6 sin6;
915#ifdef AF_LOCAL
916 struct sockaddr_un usin;
917#endif
918 } u_addr;
919 socklen_t slen;
920
921 slen = sizeof (struct sockaddr_storage);
922 if (getsockname(fd, (struct sockaddr *)(void *)&ss, &slen) == SOCKET_ERROR)
923 return 0;
924
925 switch (ss.ss_family) {
926 case AF_INET:
927 memcpy(&u_addr.sin, &ss, sizeof(u_addr.sin));
928 return (u_addr.sin.sin_port != 0);
929#ifdef INET6
930 case AF_INET6:
931 memcpy(&u_addr.sin6, &ss, sizeof(u_addr.sin6));
932 return (u_addr.sin6.sin6_port != 0);
933#endif
934#ifdef AF_LOCAL
935 case AF_LOCAL:
936 /* XXX check this */
937 memcpy(&u_addr.usin, &ss, sizeof(u_addr.usin));
938 return (u_addr.usin.sun_path[0] != 0);
939#endif
940 default:
941 break;
942 }
943
944 return 0;
945}
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
#define ss
Definition: i386-dis.c:441
int socklen_t
Definition: tcp.c:35
static int fd
Definition: io.c:51
INT WSAAPI getsockname(IN SOCKET s, OUT LPSOCKADDR name, IN OUT INT FAR *namelen)
Definition: sockctrl.c:213
#define SOCKET_ERROR
Definition: winsock.h:333

Referenced by svc_tli_create().

◆ __rpc_socktype2seman()

int __rpc_socktype2seman ( int  socktype)

Definition at line 859 of file rpc_generic.c.

860{
861 switch (socktype) {
862 case SOCK_DGRAM:
863 return NC_TPI_CLTS;
864 case SOCK_STREAM:
865 return NC_TPI_COTS_ORD;
866 case SOCK_RAW:
867 return NC_TPI_RAW;
868 default:
869 break;
870 }
871
872 return -1;
873}

Referenced by clnt_tli_create(), and svc_tli_create().

◆ __rpc_taddr2uaddr_af()

char * __rpc_taddr2uaddr_af ( int  af,
const struct netbuf nbuf 
)

Definition at line 663 of file rpc_generic.c.

664{
665 char *ret;
666 struct sockaddr_in *sin;
667#ifdef AF_LOCAL
668 struct sockaddr_un *sun;
669#endif
670 char namebuf[INET_ADDRSTRLEN];
671#ifdef INET6
672 struct sockaddr_in6 *sin6;
673 char namebuf6[INET6_ADDRSTRLEN];
674#endif
676
677 if (nbuf->len <= 0)
678 return NULL;
679
680 switch (af) {
681 case AF_INET:
682#ifdef __REACTOS__ // CVE-2017-8779
683 if (nbuf->len < sizeof(*sin)) {
684 return NULL;
685 }
686#endif
687 sin = nbuf->buf;
688 if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf)
689 == NULL)
690 return NULL;
691 port = ntohs(sin->sin_port);
692 if (asprintf(&ret, "%s.%u.%u", namebuf, ((u_int32_t)port) >> 8,
693 port & 0xff) < 0)
694 return NULL;
695 break;
696#ifdef INET6
697 case AF_INET6:
698#ifdef __REACTOS__ // CVE-2017-8779
699 if (nbuf->len < sizeof(*sin6)) {
700 return NULL;
701 }
702#endif
703 sin6 = nbuf->buf;
704 if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6)
705 == NULL)
706 return NULL;
707 port = ntohs(sin6->sin6_port);
708 if (asprintf(&ret, "%s.%u.%u", namebuf6, ((u_int32_t)port) >> 8,
709 port & 0xff) < 0)
710 return NULL;
711 break;
712#endif
713#ifdef AF_LOCAL
714 case AF_LOCAL:
715 sun = nbuf->buf;
716 /* if (asprintf(&ret, "%.*s", (int)(sun->sun_len -
717 offsetof(struct sockaddr_un, sun_path)),
718 sun->sun_path) < 0)*/
719 if (asprintf(&ret, "%.*s", (int)(sizeof(*sun) -
720 offsetof(struct sockaddr_un, sun_path)),
721 sun->sun_path) < 0)
722
723 return (NULL);
724 break;
725#endif
726 default:
727 return NULL;
728 }
729
730 return ret;
731}
int asprintf(char **str, const char *fmt,...)
Definition: asprintf.c:95
USHORT port
Definition: uri.c:228
#define ntohs(x)
Definition: module.h:210
unsigned short u_int16_t
Definition: rosdhcp.h:34
#define offsetof(TYPE, MEMBER)
USHORT sin6_port
Definition: ws2ipdef.h:180
char sun_path[MAX_PATH]
Definition: wintirpc.h:90
const char *WSAAPI inet_ntop(int af, const void *src, char *dst, size_t cnt)
Definition: unix_func.c:8
int ret
#define INET_ADDRSTRLEN
Definition: ws2ipdef.h:131
#define INET6_ADDRSTRLEN
Definition: ws2ipdef.h:132

◆ __rpc_uaddr2taddr_af()

struct netbuf * __rpc_uaddr2taddr_af ( int  af,
const char uaddr 
)

Definition at line 734 of file rpc_generic.c.

735{
736 struct netbuf *ret = NULL;
737 char *addrstr, *p;
738 unsigned short port, portlo, porthi;
739 struct sockaddr_in *sin;
740#ifdef INET6
741 struct sockaddr_in6 *sin6;
742#endif
743#ifdef AF_LOCAL
744 struct sockaddr_un *sun;
745#endif
746
747 port = 0;
748 sin = NULL;
749#ifdef __REACTOS__ // CVE-2017-8779
750 if (uaddr == NULL)
751 return NULL;
752#endif
753 addrstr = strdup(uaddr);
754 if (addrstr == NULL)
755 return NULL;
756
757 /*
758 * AF_LOCAL addresses are expected to be absolute
759 * pathnames, anything else will be AF_INET or AF_INET6.
760 */
761 if (*addrstr != '/') {
762 p = strrchr(addrstr, '.');
763 if (p == NULL)
764 goto out;
765 portlo = (unsigned)atoi(p + 1);
766 *p = '\0';
767
768 p = strrchr(addrstr, '.');
769 if (p == NULL)
770 goto out;
771 porthi = (unsigned)atoi(p + 1);
772 *p = '\0';
773 port = (porthi << 8) | portlo;
774 }
775
776 ret = (struct netbuf *)malloc(sizeof *ret);
777 if (ret == NULL)
778 goto out;
779
780 switch (af) {
781 case AF_INET:
782 sin = (struct sockaddr_in *)malloc(sizeof *sin);
783 if (sin == NULL)
784 goto out;
785 memset(sin, 0, sizeof *sin);
786 sin->sin_family = AF_INET;
787 sin->sin_port = htons(port);
788#ifndef __REACTOS__
789 if (inet_pton(AF_INET, addrstr, &sin->sin_addr) <= 0) {
790#else
791 sin->sin_addr.S_un.S_addr = inet_addr(addrstr);
792 if (sin->sin_addr.S_un.S_addr == INADDR_NONE) {
793#endif
794 free(sin);
795 free(ret);
796 ret = NULL;
797 goto out;
798 }
799 ret->maxlen = ret->len = sizeof *sin;
800 ret->buf = sin;
801 break;
802#ifdef INET6
803 case AF_INET6:
804 sin6 = (struct sockaddr_in6 *)malloc(sizeof *sin6);
805 if (sin6 == NULL)
806 goto out;
807 memset(sin6, 0, sizeof *sin6);
808 sin6->sin6_family = AF_INET6;
809 sin6->sin6_port = htons(port);
810 if (inet_pton(AF_INET6, addrstr, &sin6->sin6_addr) <= 0) {
811 free(sin6);
812 free(ret);
813 ret = NULL;
814 goto out;
815 }
816 ret->maxlen = ret->len = sizeof *sin6;
817 ret->buf = sin6;
818 break;
819#endif
820#ifdef AF_LOCAL
821 case AF_LOCAL:
822 sun = (struct sockaddr_un *)malloc(sizeof *sun);
823 if (sun == NULL)
824 goto out;
825 memset(sun, 0, sizeof *sun);
826 sun->sun_family = AF_LOCAL;
827 strncpy(sun->sun_path, addrstr, sizeof(sun->sun_path) - 1);
828 ret->len = SUN_LEN(sun);
829 ret->maxlen = sizeof(struct sockaddr_un);
830 ret->buf = sun;
831 break;
832#endif
833 default:
834 break;
835 }
836out:
837 free(addrstr);
838 return ret;
839}
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
#define INADDR_NONE
Definition: tcp.c:42
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
GLfloat GLfloat p
Definition: glext.h:8902
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define inet_addr(cp)
Definition: inet.h:98
#define htons(x)
Definition: module.h:215
static unsigned(__cdecl *hash_bstr)(bstr_t s)
static FILE * out
Definition: regtests2xml.c:44
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
#define memset(x, y, z)
Definition: compat.h:39
Definition: types.h:144
ADDRESS_FAMILY sin6_family
Definition: ws2ipdef.h:179
int sun_family
Definition: wintirpc.h:89
#define SUN_LEN(ptr)
Definition: wintirpc.h:94
WINSOCK_API_LINKAGE INT WSAAPI inet_pton(_In_ INT Family, _In_ PCSTR pszAddrString, _Out_writes_bytes_(sizeof(IN6_ADDR)) PVOID pAddrBuf)

◆ __rpcb_findaddr()

struct netbuf * __rpcb_findaddr ( rpcprog_t  ,
rpcvers_t  ,
const struct netconfig ,
const char ,
CLIENT **   
)

◆ __rpcb_findaddr_timed()

struct netbuf * __rpcb_findaddr_timed ( rpcprog_t  program,
rpcvers_t  version,
const struct netconfig nconf,
const char host,
CLIENT **  clpp,
struct timeval tp 
)

Definition at line 709 of file rpcb_clnt.c.

716{
717#ifdef NOTUSED
718 static bool_t check_rpcbind = TRUE;
719#endif
720 CLIENT *client = NULL;
721 RPCB parms;
722 enum clnt_stat clnt_st;
723 char *ua = NULL;
724 rpcvers_t vers;
725 struct netbuf *address = NULL;
726 rpcvers_t start_vers = RPCBVERS4;
727 struct netbuf servaddr;
728
729 /* parameter checking */
730 if (nconf == NULL) {
732 return (NULL);
733 }
734
735 parms.r_addr = NULL;
736
737 /*
738 * Use default total timeout if no timeout is specified.
739 */
740 if (tp == NULL)
741 tp = &tottimeout;
742
743#ifdef PORTMAP
744 /* Try version 2 for TCP or UDP */
745 if (strcmp(nconf->nc_protofmly, NC_INET) == 0) {
746 u_short port = 0;
747 struct netbuf remote;
748 rpcvers_t pmapvers = 2;
749 struct pmap pmapparms;
750
751 /*
752 * Try UDP only - there are some portmappers out
753 * there that use UDP only.
754 */
755 if (strcmp(nconf->nc_proto, NC_TCP) == 0) {
756 struct netconfig *newnconf;
757
758 if ((newnconf = getnetconfigent("udp")) == NULL) {
760 return (NULL);
761 }
762 client = getclnthandle(host, newnconf, &parms.r_addr);
763 freenetconfigent(newnconf);
764 } else if (strcmp(nconf->nc_proto, NC_UDP) == 0)
765 client = getclnthandle(host, nconf, &parms.r_addr);
766 else
767 goto try_rpcbind;
768 if (client == NULL)
769 return (NULL);
770
771 /*
772 * Set version and retry timeout.
773 */
775 CLNT_CONTROL(client, CLSET_VERS, (char *)&pmapvers);
776
777 pmapparms.pm_prog = program;
778 pmapparms.pm_vers = version;
779 pmapparms.pm_prot = strcmp(nconf->nc_proto, NC_TCP) ?
781 pmapparms.pm_port = 0; /* not needed */
783 (xdrproc_t) xdr_pmap, (caddr_t)(void *)&pmapparms,
784 (xdrproc_t) xdr_u_short, (caddr_t)(void *)&port,
785 *tp);
786 if (clnt_st != RPC_SUCCESS) {
787 if ((clnt_st == RPC_PROGVERSMISMATCH) ||
788 (clnt_st == RPC_PROGUNAVAIL))
789 goto try_rpcbind;
792 goto error;
793 } else if (port == 0) {
794 address = NULL;
796 goto error;
797 }
798 port = htons(port);
799 CLNT_CONTROL(client, CLGET_SVC_ADDR, (char *)&remote);
800 if (((address = (struct netbuf *)
801 malloc(sizeof (struct netbuf))) == NULL) ||
802 ((address->buf = (char *)
803 malloc(remote.len)) == NULL)) {
806 if (address) {
807 free(address);
808 address = NULL;
809 }
810 goto error;
811 }
812 memcpy(address->buf, remote.buf, remote.len);
813 memcpy(&((char *)address->buf)[sizeof (short)],
814 (char *)(void *)&port, sizeof (short));
815 address->len = address->maxlen = remote.len;
816 goto done;
817 }
818
819try_rpcbind:
820#endif /* PORTMAP */
821
822 parms.r_prog = program;
823 parms.r_vers = version;
824 parms.r_netid = nconf->nc_netid;
825
826 /*
827 * rpcbind ignores the r_owner field in GETADDR requests, but we
828 * need to give xdr_rpcb something to gnaw on. Might as well make
829 * it something human readable for when we see these in captures.
830 */
832
833 /* Now the same transport is to be used to get the address */
834 if (client && ((nconf->nc_semantics == NC_TPI_COTS_ORD) ||
835 (nconf->nc_semantics == NC_TPI_COTS))) {
836 /* A CLTS type of client - destroy it */
838 client = NULL;
839 free(parms.r_addr);
840 parms.r_addr = NULL;
841 }
842
843 if (client == NULL) {
844 client = getclnthandle(host, nconf, &parms.r_addr);
845 if (client == NULL) {
846 goto error;
847 }
848 }
849 if (parms.r_addr == NULL) {
850 /*LINTED const castaway*/
851 parms.r_addr = (char *) &nullstring[0];
852 }
853
854 /* First try from start_vers(4) and then version 3 (RPCBVERS) */
855
857 for (vers = start_vers; vers >= RPCBVERS; vers--) {
858 /* Set the version */
859 CLNT_CONTROL(client, CLSET_VERS, (char *)(void *)&vers);
861 (xdrproc_t) xdr_rpcb, (char *)(void *)&parms,
862 (xdrproc_t) xdr_wrapstring, (char *)(void *) &ua, *tp);
863 if (clnt_st == RPC_SUCCESS) {
864 if ((ua == NULL) || (ua[0] == 0)) {
865 /* address unknown */
867 goto error;
868 }
869 address = uaddr2taddr(nconf, ua);
870#ifdef ND_DEBUG
871 fprintf(stderr, "\tRemote address is [%s]\n", ua);
872 if (!address)
874 "\tCouldn't resolve remote address!\n");
875#endif
877 (char *)(void *)&ua);
878
879 if (! address) {
880 /* We don't know about your universal address */
882 goto error;
883 }
885 (char *)(void *)&servaddr);
886 __rpc_fixup_addr(address, &servaddr);
887 goto done;
888 } else if (clnt_st == RPC_PROGVERSMISMATCH) {
889 struct rpc_err rpcerr;
890 clnt_geterr(client, &rpcerr);
891 if (rpcerr.re_vers.low > RPCBVERS4)
892 goto error; /* a new version, can't handle */
893 } else if (clnt_st != RPC_PROGUNAVAIL) {
894 /* Cant handle this error */
895 rpc_createerr.cf_stat = clnt_st;
897 goto error;
898 }
899 }
900
901 if ((address == NULL) || (address->len == 0)) {
904 }
905
906error:
907 if (client) {
909 client = NULL;
910 }
911done:
912 if (nconf->nc_semantics != NC_TPI_CLTS) {
913 /* This client is the connectionless one */
914 if (client) {
916 client = NULL;
917 }
918 }
919 if (clpp) {
920 *clpp = client;
921 } else if (client) {
923 }
924 if (parms.r_addr != NULL && parms.r_addr != nullstring)
925 free(parms.r_addr);
926 return (address);
927}
bool_t xdr_u_short(XDR *xdrs, u_short *usp)
Definition: xdr.c:300
void xdr_free(xdrproc_t proc, void *objp)
Definition: xdr.c:78
#define CLSET_VERS
Definition: clnt.h:256
#define CLSET_RETRY_TIMEOUT
Definition: clnt.h:265
#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs)
Definition: clnt.h:199
#define CLNT_CONTROL(cl, rq, in)
Definition: clnt.h:240
#define clnt_geterr(rh, errp)
Definition: clnt.h:220
#define CLGET_SVC_ADDR
Definition: clnt.h:250
#define CLNT_DESTROY(rh)
Definition: clnt.h:275
#define RPC_PMAPFAILURE
Definition: clnt_stat.h:57
clnt_stat
Definition: clnt_stat.h:21
@ RPC_SUCCESS
Definition: clnt_stat.h:22
@ RPC_PROGNOTREGISTERED
Definition: clnt_stat.h:58
@ RPC_PROGUNAVAIL
Definition: clnt_stat.h:39
@ RPC_N2AXLATEFAILURE
Definition: clnt_stat.h:59
@ RPC_UNKNOWNPROTO
Definition: clnt_stat.h:49
@ RPC_PROGVERSMISMATCH
Definition: clnt_stat.h:40
@ RPC_SYSTEMERROR
Definition: clnt_stat.h:43
int32_t bool_t
Definition: types.h:101
unsigned short u_short
Definition: types.h:81
u_int32_t rpcvers_t
Definition: types.h:105
u_int32_t rpcproc_t
Definition: types.h:106
static const WCHAR version[]
Definition: asmname.c:66
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2996
#define IPPROTO_TCP
Definition: ip.h:196
#define IPPROTO_UDP
Definition: ip.h:197
GLuint address
Definition: glext.h:9393
GLuint program
Definition: glext.h:6723
#define stderr
Definition: stdio.h:100
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define error(str)
Definition: mkdosfs.c:1605
#define NC_TPI_COTS
Definition: netconfig.h:36
#define NC_TCP
Definition: netconfig.h:79
#define NC_INET
Definition: netconfig.h:52
#define NC_UDP
Definition: netconfig.h:80
bool_t xdr_pmap(XDR *xdrs, struct pmap *regs)
Definition: pmap_prot.c:45
#define PMAPPROC_GETPORT
Definition: pmap_prot.h:84
char * caddr_t
Definition: rosdhcp.h:36
struct netbuf * uaddr2taddr(const struct netconfig *nconf, const char *uaddr)
Definition: rpc_generic.c:619
static const char nullstring[]
Definition: rpcb_clnt.c:69
static CLIENT * getclnthandle(const char *, const struct netconfig *, char **)
static struct timeval rpcbrmttime
Definition: rpcb_clnt.c:65
#define RPCB_OWNER_STRING
Definition: rpcb_clnt.c:71
bool_t xdr_wrapstring(XDR *, char **)
Definition: xdr.c:772
bool_t xdr_rpcb(XDR *xdrs, RPCB *objp)
Definition: rpcb_prot.c:50
#define RPCBPROC_GETADDR
Definition: rpcb_prot.h:688
#define RPCBVERS4
Definition: rpcb_prot.h:707
#define RPCBVERS
Definition: rpcb_prot.h:627
static FILE * client
Definition: client.c:41
int __rpc_fixup_addr(struct netbuf *, const struct netbuf *)
Definition: rpc_generic.c:883
unsigned long nc_semantics
Definition: netconfig.h:17
char * nc_netid
Definition: netconfig.h:16
char * nc_protofmly
Definition: netconfig.h:19
char * nc_proto
Definition: netconfig.h:20
Definition: pmap_prot.h:88
struct rpc_err cf_error
Definition: clnt.h:497
enum clnt_stat cf_stat
Definition: clnt.h:496
Definition: clnt.h:95
char * r_netid
Definition: rpcb_prot.h:143
rpcvers_t r_vers
Definition: rpcb_prot.h:142
char * r_owner
Definition: rpcb_prot.h:145
rpcprog_t r_prog
Definition: rpcb_prot.h:141
char * r_addr
Definition: rpcb_prot.h:144
char * host
Definition: whois.c:55
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
bool_t(* xdrproc_t)(XDR *,...)
Definition: xdr.h:144

Referenced by clnt_tp_create_timed(), and rpcb_getaddr().

◆ __rpcgettp()

struct netconfig * __rpcgettp ( SOCKET  fd)

Definition at line 464 of file rpc_generic.c.

466{
467 const char *netid;
468 struct __rpc_sockinfo si;
469
470 if (!__rpc_fd2sockinfo(fd, &si))
471 return NULL;
472
473 if (!__rpc_sockinfo2netid(&si, &netid))
474 return NULL;
475
476 /*LINTED const castaway*/
477 return getnetconfigent((char *)netid);
478}
int __rpc_sockinfo2netid(struct __rpc_sockinfo *sip, const char **netid)
Definition: rpc_generic.c:580
int __rpc_fd2sockinfo(SOCKET fd, struct __rpc_sockinfo *sip)
Definition: rpc_generic.c:481

Referenced by svc_reg().

◆ __svc_clean_idle()

bool_t __svc_clean_idle ( fd_set fds,
int  timeout,
bool_t  cleanblock 
)

Definition at line 820 of file svc_vc.c.

821{
822 int i, ncleaned;
823 SVCXPRT *xprt, *least_active;
824 struct timeval tv, tdiff, tmax;
825 struct cf_conn *cd;
826
827 gettimeofday(&tv, NULL);
828 tmax.tv_sec = tmax.tv_usec = 0;
829 least_active = NULL;
831 for (i = ncleaned = 0; i <= svc_maxfd; i++) {
832 if (FD_ISSET(i, fds)) {
833 xprt = __svc_xports[i];
834 if (xprt == NULL || xprt->xp_ops == NULL ||
835 xprt->xp_ops->xp_recv != svc_vc_recv)
836 continue;
837 cd = (struct cf_conn *)xprt->xp_p1;
838 if (!cleanblock && !cd->nonblock)
839 continue;
840 if (timeout == 0) {
841 timersub(&tv, &cd->last_recv_time, &tdiff);
842 if (timercmp(&tdiff, &tmax, >)) {
843 tmax = tdiff;
844 least_active = xprt;
845 }
846 continue;
847 }
848 if (tv.tv_sec - cd->last_recv_time.tv_sec > timeout) {
850 __svc_vc_dodestroy(xprt);
851 ncleaned++;
852 }
853 }
854 }
855 if (timeout == 0 && least_active != NULL) {
856 __xprt_unregister_unlocked(least_active);
857 __svc_vc_dodestroy(least_active);
858 ncleaned++;
859 }
861 return ncleaned > 0 ? TRUE : FALSE;
862}
InitDirComponents & cd
#define gettimeofday(tv, tz)
Definition: adns_win32.h:159
#define timercmp(tvp, uvp, cmp)
Definition: rdesktop.h:184
if(dx< 0)
Definition: linetemp.h:194
#define rwlock_wrlock(l)
Definition: reentrant.h:140
#define rwlock_unlock(l)
Definition: reentrant.h:142
int svc_maxfd
#define timersub(tvp1, tvp2)
Definition: time.h:116
SVCXPRT ** __svc_xports
void __xprt_unregister_unlocked(SVCXPRT *)
Definition: svc.c:134
void * xp_p1
Definition: svc.h:123
const struct __rpc_svcxprt::xp_ops * xp_ops
Definition: svc_vc.c:94
Definition: dhcpd.h:245
static void __svc_vc_dodestroy(SVCXPRT *)
Definition: svc_vc.c:407
rwlock_t svc_fd_lock
Definition: mt_misc.c:22
static bool_t svc_vc_recv(SVCXPRT *, struct rpc_msg *)
Definition: svc_vc.c:647
#define FD_ISSET(fd, set)
Definition: winsock.h:100

Referenced by rendezvous_request(), and svc_run().

◆ __xdrrec_getrec()

bool_t __xdrrec_getrec ( XDR xdrs,
enum xprt_stat statp,
bool_t  expectdata 
)

Definition at line 581 of file xdr_rec.c.

585{
586 RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
587 int n;
588 u_int fraglen;
589
590 if (!rstrm->in_haveheader) {
591 n = rstrm->readit(rstrm->tcp_handle, rstrm->in_hdrp,
592 (int)sizeof (rstrm->in_header) - rstrm->in_hdrlen);
593 if (n == 0) {
594 *statp = expectdata ? XPRT_DIED : XPRT_IDLE;
595 return FALSE;
596 }
597 if (n < 0) {
598 *statp = XPRT_DIED;
599 return FALSE;
600 }
601 rstrm->in_hdrp += n;
602 rstrm->in_hdrlen += n;
603 if (rstrm->in_hdrlen < sizeof (rstrm->in_header)) {
604 *statp = XPRT_MOREREQS;
605 return FALSE;
606 }
607 rstrm->in_header = ntohl(rstrm->in_header);
608 fraglen = (int)(rstrm->in_header & ~LAST_FRAG);
609 if (fraglen == 0 || fraglen > rstrm->in_maxrec ||
610 (rstrm->in_reclen + fraglen) > rstrm->in_maxrec) {
611 *statp = XPRT_DIED;
612 return FALSE;
613 }
614 rstrm->fbtbc = rstrm->in_header & (~LAST_FRAG);
615 rstrm->in_reclen += fraglen;
616 if (rstrm->in_reclen > rstrm->recvsize)
617 realloc_stream(rstrm, rstrm->in_reclen);
618 if (rstrm->in_header & LAST_FRAG) {
619 rstrm->in_header &= ~LAST_FRAG;
620 rstrm->last_frag = TRUE;
621 }
622 }
623
624 do {
625 n = rstrm->readit(rstrm->tcp_handle,
626 rstrm->in_base + rstrm->in_received,
627 (rstrm->in_reclen - rstrm->in_received));
628
629 /* this case is needed for non-block as socket returns TIMEDOUT and -1
630 * -2 is an error case and covered by the next if() statement */
631 if (n == -1) continue;
632
633 if (n < 0) {
634 *statp = XPRT_DIED;
635 return FALSE;
636 }
637
638 if (n == 0) {
639 *statp = expectdata ? XPRT_DIED : XPRT_IDLE;
640 return FALSE;
641 }
642
643 rstrm->in_received += n;
644 if (rstrm->in_received == rstrm->in_reclen) {
645 rstrm->in_haveheader = FALSE;
646 rstrm->in_hdrp = (char *)(void *)&rstrm->in_header;
647 rstrm->in_hdrlen = 0;
648 if (rstrm->last_frag) {
649 rstrm->in_boundry = rstrm->in_base + rstrm->in_reclen;
650 rstrm->in_finger = rstrm->in_base;
651 rstrm->in_reclen = rstrm->in_received = 0;
652 *statp = XPRT_MOREREQS;
653 return TRUE;
654 }
655 }
656 } while (1);
657
658 *statp = XPRT_MOREREQS;
659 return FALSE;
660}
@ XPRT_IDLE
Definition: svc.h:84
@ XPRT_DIED
Definition: svc.h:82
@ XPRT_MOREREQS
Definition: svc.h:83
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLdouble n
Definition: glext.h:7729
#define ntohl(x)
Definition: module.h:205
void * x_private
Definition: xdr.h:125
u_int recvsize
Definition: xdr_rec.c:148
u_int in_received
Definition: xdr_rec.c:156
char * in_base
Definition: xdr_rec.c:142
bool_t last_frag
Definition: xdr_rec.c:146
char * tcp_handle
Definition: xdr_rec.c:127
u_int fbtbc
Definition: xdr_rec.c:145
bool_t in_haveheader
Definition: xdr_rec.c:151
char * in_finger
Definition: xdr_rec.c:143
int(* readit)(void *, void *, int)
Definition: xdr_rec.c:140
char * in_boundry
Definition: xdr_rec.c:144
u_int32_t in_header
Definition: xdr_rec.c:152
u_int in_maxrec
Definition: xdr_rec.c:157
u_int in_reclen
Definition: xdr_rec.c:155
char * in_hdrp
Definition: xdr_rec.c:153
u_int in_hdrlen
Definition: xdr_rec.c:154
#define LAST_FRAG
Definition: xdr_rec.c:124
static bool_t realloc_stream(RECSTREAM *, u_int)
Definition: xdr_rec.c:826

Referenced by svc_vc_recv(), and xdrrec_skiprecord().

◆ __xdrrec_setblock()

bool_t __xdrrec_setblock ( XDR xdrs)

Definition at line 677 of file xdr_rec.c.

679{
680 RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
681
682 rstrm->nonblock = FALSE;
683 return TRUE;
684}
bool_t nonblock
Definition: xdr_rec.c:150

Referenced by clnt_cb_thread().

◆ __xdrrec_setnonblock()

bool_t __xdrrec_setnonblock ( XDR xdrs,
int  maxrec 
)

Definition at line 663 of file xdr_rec.c.

666{
667 RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
668
669 rstrm->nonblock = TRUE;
670 if (maxrec == 0)
671 maxrec = rstrm->recvsize;
672 rstrm->in_maxrec = maxrec;
673 return TRUE;
674}

Referenced by clnt_cb_thread(), and rendezvous_request().

◆ __xprt_set_raddr()

void __xprt_set_raddr ( SVCXPRT xprt,
const struct sockaddr_storage ss 
)

Definition at line 111 of file svc_vc.c.

112{
113 switch (ss->ss_family) {
114 case AF_INET6:
115 memcpy(&xprt->xp_raddr, ss, sizeof(struct sockaddr_in6));
116 xprt->xp_addrlen = sizeof (struct sockaddr_in6);
117 break;
118 case AF_INET:
119 memcpy(&xprt->xp_raddr, ss, sizeof(struct sockaddr_in));
120 xprt->xp_addrlen = sizeof (struct sockaddr_in);
121 break;
122 default:
123 xprt->xp_raddr.sin6_family = AF_UNSPEC;
124 xprt->xp_addrlen = sizeof (struct sockaddr);
125 break;
126 }
127}
struct sockaddr_in6 xp_raddr
Definition: svc.h:110
int xp_addrlen
Definition: svc.h:109
#define AF_UNSPEC
Definition: winsock.h:344

Referenced by rendezvous_request(), svc_dg_recv(), and svc_fd_create().

◆ __xprt_unregister_unlocked()

void __xprt_unregister_unlocked ( SVCXPRT xprt)

Definition at line 134 of file svc.c.

135{
137}
static void __xprt_do_unregister(SVCXPRT *xprt, bool_t dolock)
Definition: svc.c:143

Referenced by __svc_clean_idle().

◆ _get_next_token()

char * _get_next_token ( char npp,
int  token 
)

Definition at line 228 of file getnetpath.c.

231{
232 char *cp; /* char pointer */
233 char *np; /* netpath pointer */
234 char *ep; /* escape pointer */
235
236 if ((cp = strchr(npp, token)) == NULL) {
237 return (NULL);
238 }
239 /*
240 * did find a token, but it might be escaped.
241 */
242 if ((cp > npp) && (cp[-1] == '\\')) {
243 /* if slash was also escaped, carry on, otherwise find next token */
244 if ((cp > npp + 1) && (cp[-2] != '\\')) {
245 /* shift r-o-s onto the escaped token */
246 strcpy(&cp[-1], cp); /* XXX: overlapping string copy */
247 /*
248 * Do a recursive call.
249 * We don't know how many escaped tokens there might be.
250 */
251 return (_get_next_token(cp, token));
252 }
253 }
254
255 *cp++ = '\0'; /* null-terminate token */
256 /* get rid of any backslash escapes */
257 ep = npp;
258 while ((np = strchr(ep, '\\')) != 0) {
259 if (np[1] == '\\')
260 np++;
261 strcpy(np, (ep = &np[1])); /* XXX: overlapping string copy */
262 }
263 return (cp); /* return ptr to r-o-s */
264}
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
char * strchr(const char *String, int ch)
Definition: utclib.c:501
char * _get_next_token(char *, int)
Definition: getnetpath.c:228
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 token
Definition: glfuncs.h:210
POINT cp
Definition: magnifier.c:59

◆ rpc_nullproc()

void * rpc_nullproc ( CLIENT clnt)

Definition at line 447 of file rpc_generic.c.

449{
450 struct timeval TIMEOUT = {25, 0};
451
454 return (NULL);
455 }
456 return ((void *) clnt);
457}
bool_t xdr_void(void)
Definition: xdr.c:92
#define NULLPROC
Definition: clnt.h:294
#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs)
Definition: clnt.h:202
#define TIMEOUT
Definition: ntpclient.c:12

Variable Documentation

◆ __svc_maxrec

int __svc_maxrec
extern

Definition at line 42 of file rpc_commondata.c.

Referenced by rpc_control(), and svc_vc_create().

◆ __svc_xports

SVCXPRT** __svc_xports
extern