ReactOS 0.4.15-dev-8102-g108db8f
pmap_getmaps.c File Reference
#include <wintirpc.h>
#include <sys/types.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
Include dependency graph for pmap_getmaps.c:

Go to the source code of this file.

Macros

#define NAMELEN   255
 
#define MAX_BROADCAST_SIZE   1400
 

Functions

struct pmaplistpmap_getmaps (struct sockaddr_in *address)
 

Macro Definition Documentation

◆ MAX_BROADCAST_SIZE

#define MAX_BROADCAST_SIZE   1400

Definition at line 58 of file pmap_getmaps.c.

◆ NAMELEN

#define NAMELEN   255

Definition at line 57 of file pmap_getmaps.c.

Function Documentation

◆ pmap_getmaps()

struct pmaplist * pmap_getmaps ( struct sockaddr_in address)

Definition at line 65 of file pmap_getmaps.c.

67{
68 struct pmaplist *head = NULL;
70 struct timeval minutetimeout;
72
74
75 minutetimeout.tv_sec = 60;
76 minutetimeout.tv_usec = 0;
77 address->sin_port = htons(PMAPPORT);
79 PMAPVERS, &sock, 50, 500);
80 if (client != NULL) {
83 (xdrproc_t)xdr_pmaplist, &head, minutetimeout) !=
85 clnt_perror(client, "pmap_getmaps rpc problem");
86 }
88 }
89 address->sin_port = 0;
90 return (head);
91}
bool_t xdr_void(void)
Definition: xdr.c:92
struct outqueuenode * head
Definition: adnsresfilter.c:66
#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs)
Definition: clnt.h:199
#define CLNT_DESTROY(rh)
Definition: clnt.h:275
void clnt_perror(CLIENT *rpch, const char *s)
Definition: clnt_perror.c:181
__BEGIN_DECLS CLIENT * clnttcp_create(struct sockaddr_in *, u_long, u_long, SOCKET *, u_int, u_int)
@ RPC_SUCCESS
Definition: clnt_stat.h:22
#define NULL
Definition: types.h:112
u_int32_t rpcproc_t
Definition: types.h:106
#define assert(x)
Definition: debug.h:53
GLuint address
Definition: glext.h:9393
#define htons(x)
Definition: module.h:215
bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp)
Definition: pmap_prot2.c:83
#define PMAPPORT
Definition: pmap_prot.h:76
#define PMAPVERS
Definition: pmap_prot.h:78
#define PMAPPROC_DUMP
Definition: pmap_prot.h:85
#define PMAPPROG
Definition: pmap_prot.h:77
static FILE * client
Definition: client.c:41
Definition: tcpcore.h:1455
#define INVALID_SOCKET
Definition: winsock.h:332
UINT_PTR SOCKET
Definition: winsock.h:47
bool_t(* xdrproc_t)(XDR *,...)
Definition: xdr.h:144