ReactOS 0.4.15-dev-7918-g2a2556c
rpcb_prot.h File Reference
#include <rpc/rpc.h>
Include dependency graph for rpcb_prot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rpcb
 
struct  rp__list
 
struct  rpcblist
 
struct  rpcb_rmtcallargs
 
struct  r_rpcb_rmtcallargs
 
struct  rpcb_rmtcallres
 
struct  r_rpcb_rmtcallres
 
struct  rpcb_entry
 
struct  rpcb_entry_list
 
struct  rpcbs_addrlist
 
struct  rpcbs_rmtcalllist
 
struct  rpcb_stat
 

Macros

#define IXDR_GET_INT32(buf)   IXDR_GET_LONG((buf))
 
#define IXDR_PUT_INT32(buf, v)   IXDR_PUT_LONG((buf), (v))
 
#define IXDR_GET_U_INT32(buf)   IXDR_GET_U_LONG((buf))
 
#define IXDR_PUT_U_INT32(buf, v)   IXDR_PUT_U_LONG((buf), (v))
 
#define rpcb_highproc_2   RPCBPROC_CALLIT
 
#define rpcb_highproc_3   RPCBPROC_TADDR2UADDR
 
#define rpcb_highproc_4   RPCBPROC_GETSTAT
 
#define RPCBSTAT_HIGHPROC   13
 
#define RPCBVERS_STAT   3
 
#define RPCBVERS_4_STAT   2
 
#define RPCBVERS_3_STAT   1
 
#define RPCBVERS_2_STAT   0
 
#define RPCBVERS_3   RPCBVERS
 
#define RPCBVERS_4   RPCBVERS4
 
#define _PATH_RPCBINDSOCK   "/var/run/rpcbind.sock"
 
#define RPCBPROG   ((u_int32_t)100000)
 
#define RPCBVERS   ((u_int32_t)3)
 
#define RPCBPROC_SET   ((u_int32_t)1)
 
#define RPCBPROC_UNSET   ((u_int32_t)2)
 
#define RPCBPROC_GETADDR   ((u_int32_t)3)
 
#define RPCBPROC_DUMP   ((u_int32_t)4)
 
#define RPCBPROC_CALLIT   ((u_int32_t)5)
 
#define RPCBPROC_GETTIME   ((u_int32_t)6)
 
#define RPCBPROC_UADDR2TADDR   ((u_int32_t)7)
 
#define RPCBPROC_TADDR2UADDR   ((u_int32_t)8)
 
#define RPCBVERS4   ((u_int32_t)4)
 
#define RPCBPROC_BCAST   ((u_int32_t)RPCBPROC_CALLIT)
 
#define RPCBPROC_GETVERSADDR   ((u_int32_t)9)
 
#define RPCBPROC_INDIRECT   ((u_int32_t)10)
 
#define RPCBPROC_GETADDRLIST   ((u_int32_t)11)
 
#define RPCBPROC_GETSTAT   ((u_int32_t)12)
 

Typedefs

typedef struct rpcb rpcb
 
typedef rpcb RPCB
 
typedef struct rp__list rp__list
 
typedef rp__listrpcblist_ptr
 
typedef struct rp__list rpcblist
 
typedef struct rp__list RPCBLIST
 
typedef struct rpcb_rmtcallargs rpcb_rmtcallargs
 
typedef struct rpcb_rmtcallres rpcb_rmtcallres
 
typedef struct rpcb_entry rpcb_entry
 
typedef struct rpcb_entry_list rpcb_entry_list
 
typedef rpcb_entry_listrpcb_entry_list_ptr
 
typedef struct rpcbs_addrlist rpcbs_addrlist
 
typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist
 
typedef int rpcbs_proc[RPCBSTAT_HIGHPROC]
 
typedef rpcbs_addrlistrpcbs_addrlist_ptr
 
typedef rpcbs_rmtcalllistrpcbs_rmtcalllist_ptr
 
typedef struct rpcb_stat rpcb_stat
 
typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]
 

Functions

bool_t xdr_rpcb (XDR *, rpcb *)
 
bool_t xdr_rp__list (XDR *, rp__list *)
 
bool_t xdr_rpcblist_ptr (XDR *, rpcblist_ptr *)
 
bool_t xdr_rpcblist (XDR *, rpcblist **)
 
bool_t xdr_rpcb_rmtcallargs (XDR *, rpcb_rmtcallargs *)
 
bool_t xdr_rpcb_rmtcallres (XDR *, rpcb_rmtcallres *)
 
bool_t xdr_rpcb_entry ()
 
bool_t xdr_rpcb_entry_list ()
 
bool_t xdr_rpcb_entry_list_ptr ()
 
bool_t xdr_rpcbs_addrlist ()
 
bool_t xdr_rpcbs_rmtcalllist ()
 
bool_t xdr_rpcbs_proc ()
 
bool_t xdr_rpcbs_addrlist_ptr ()
 
bool_t xdr_rpcbs_rmtcalllist_ptr (XDR *, rpcbs_rmtcalllist_ptr *)
 
bool_t xdr_rpcb_stat ()
 
bool_t xdr_rpcb_stat_byvers ()
 
bool_t xdr_netbuf (XDR *, struct netbuf *)
 
bool_trpcbproc_set_3 ()
 
bool_trpcbproc_set_3_svc ()
 
bool_trpcbproc_unset_3 ()
 
bool_trpcbproc_unset_3_svc ()
 
char ** rpcbproc_getaddr_3 ()
 
char ** rpcbproc_getaddr_3_svc ()
 
rpcblist_ptrrpcbproc_dump_3 ()
 
rpcblist_ptrrpcbproc_dump_3_svc ()
 
rpcb_rmtcallresrpcbproc_callit_3 ()
 
rpcb_rmtcallresrpcbproc_callit_3_svc ()
 
u_intrpcbproc_gettime_3 ()
 
u_intrpcbproc_gettime_3_svc ()
 
struct netbufrpcbproc_uaddr2taddr_3 ()
 
struct netbufrpcbproc_uaddr2taddr_3_svc ()
 
char ** rpcbproc_taddr2uaddr_3 ()
 
char ** rpcbproc_taddr2uaddr_3_svc ()
 
bool_trpcbproc_set_4 ()
 
bool_trpcbproc_set_4_svc ()
 
bool_trpcbproc_unset_4 ()
 
bool_trpcbproc_unset_4_svc ()
 
char ** rpcbproc_getaddr_4 ()
 
char ** rpcbproc_getaddr_4_svc ()
 
rpcblist_ptrrpcbproc_dump_4 ()
 
rpcblist_ptrrpcbproc_dump_4_svc ()
 
rpcb_rmtcallresrpcbproc_bcast_4 ()
 
rpcb_rmtcallresrpcbproc_bcast_4_svc ()
 
u_intrpcbproc_gettime_4 ()
 
u_intrpcbproc_gettime_4_svc ()
 
struct netbufrpcbproc_uaddr2taddr_4 ()
 
struct netbufrpcbproc_uaddr2taddr_4_svc ()
 
char ** rpcbproc_taddr2uaddr_4 ()
 
char ** rpcbproc_taddr2uaddr_4_svc ()
 
char ** rpcbproc_getversaddr_4 ()
 
char ** rpcbproc_getversaddr_4_svc ()
 
rpcb_rmtcallresrpcbproc_indirect_4 ()
 
rpcb_rmtcallresrpcbproc_indirect_4_svc ()
 
rpcb_entry_list_ptrrpcbproc_getaddrlist_4 ()
 
rpcb_entry_list_ptrrpcbproc_getaddrlist_4_svc ()
 
rpcb_statrpcbproc_getstat_4 ()
 
rpcb_statrpcbproc_getstat_4_svc ()
 

Macro Definition Documentation

◆ _PATH_RPCBINDSOCK

#define _PATH_RPCBINDSOCK   "/var/run/rpcbind.sock"

Definition at line 485 of file rpcb_prot.h.

◆ IXDR_GET_INT32

#define IXDR_GET_INT32 (   buf)    IXDR_GET_LONG((buf))

Definition at line 12 of file rpcb_prot.h.

◆ IXDR_GET_U_INT32

#define IXDR_GET_U_INT32 (   buf)    IXDR_GET_U_LONG((buf))

Definition at line 18 of file rpcb_prot.h.

◆ IXDR_PUT_INT32

#define IXDR_PUT_INT32 (   buf,
  v 
)    IXDR_PUT_LONG((buf), (v))

Definition at line 15 of file rpcb_prot.h.

◆ IXDR_PUT_U_INT32

#define IXDR_PUT_U_INT32 (   buf,
  v 
)    IXDR_PUT_U_LONG((buf), (v))

Definition at line 21 of file rpcb_prot.h.

◆ rpcb_highproc_2

#define rpcb_highproc_2   RPCBPROC_CALLIT

Definition at line 354 of file rpcb_prot.h.

◆ rpcb_highproc_3

#define rpcb_highproc_3   RPCBPROC_TADDR2UADDR

Definition at line 355 of file rpcb_prot.h.

◆ rpcb_highproc_4

#define rpcb_highproc_4   RPCBPROC_GETSTAT

Definition at line 356 of file rpcb_prot.h.

◆ RPCBPROC_BCAST

#define RPCBPROC_BCAST   ((u_int32_t)RPCBPROC_CALLIT)

Definition at line 780 of file rpcb_prot.h.

◆ RPCBPROC_CALLIT

#define RPCBPROC_CALLIT   ((u_int32_t)5)

Definition at line 694 of file rpcb_prot.h.

◆ RPCBPROC_DUMP

#define RPCBPROC_DUMP   ((u_int32_t)4)

Definition at line 691 of file rpcb_prot.h.

◆ RPCBPROC_GETADDR

#define RPCBPROC_GETADDR   ((u_int32_t)3)

Definition at line 688 of file rpcb_prot.h.

◆ RPCBPROC_GETADDRLIST

#define RPCBPROC_GETADDRLIST   ((u_int32_t)11)

Definition at line 795 of file rpcb_prot.h.

◆ RPCBPROC_GETSTAT

#define RPCBPROC_GETSTAT   ((u_int32_t)12)

Definition at line 798 of file rpcb_prot.h.

◆ RPCBPROC_GETTIME

#define RPCBPROC_GETTIME   ((u_int32_t)6)

Definition at line 697 of file rpcb_prot.h.

◆ RPCBPROC_GETVERSADDR

#define RPCBPROC_GETVERSADDR   ((u_int32_t)9)

Definition at line 789 of file rpcb_prot.h.

◆ RPCBPROC_INDIRECT

#define RPCBPROC_INDIRECT   ((u_int32_t)10)

Definition at line 792 of file rpcb_prot.h.

◆ RPCBPROC_SET

#define RPCBPROC_SET   ((u_int32_t)1)

Definition at line 682 of file rpcb_prot.h.

◆ RPCBPROC_TADDR2UADDR

#define RPCBPROC_TADDR2UADDR   ((u_int32_t)8)

Definition at line 703 of file rpcb_prot.h.

◆ RPCBPROC_UADDR2TADDR

#define RPCBPROC_UADDR2TADDR   ((u_int32_t)7)

Definition at line 700 of file rpcb_prot.h.

◆ RPCBPROC_UNSET

#define RPCBPROC_UNSET   ((u_int32_t)2)

Definition at line 685 of file rpcb_prot.h.

◆ RPCBPROG

#define RPCBPROG   ((u_int32_t)100000)

Definition at line 626 of file rpcb_prot.h.

◆ RPCBSTAT_HIGHPROC

#define RPCBSTAT_HIGHPROC   13

Definition at line 357 of file rpcb_prot.h.

◆ RPCBVERS

#define RPCBVERS   ((u_int32_t)3)

Definition at line 627 of file rpcb_prot.h.

◆ RPCBVERS4

#define RPCBVERS4   ((u_int32_t)4)

Definition at line 707 of file rpcb_prot.h.

◆ RPCBVERS_2_STAT

#define RPCBVERS_2_STAT   0

Definition at line 361 of file rpcb_prot.h.

◆ RPCBVERS_3

#define RPCBVERS_3   RPCBVERS

Definition at line 482 of file rpcb_prot.h.

◆ RPCBVERS_3_STAT

#define RPCBVERS_3_STAT   1

Definition at line 360 of file rpcb_prot.h.

◆ RPCBVERS_4

#define RPCBVERS_4   RPCBVERS4

Definition at line 483 of file rpcb_prot.h.

◆ RPCBVERS_4_STAT

#define RPCBVERS_4_STAT   2

Definition at line 359 of file rpcb_prot.h.

◆ RPCBVERS_STAT

#define RPCBVERS_STAT   3

Definition at line 358 of file rpcb_prot.h.

Typedef Documentation

◆ rp__list

Definition at line 176 of file rpcb_prot.h.

◆ rpcb

typedef struct rpcb rpcb

Definition at line 147 of file rpcb_prot.h.

◆ RPCB

typedef rpcb RPCB

Definition at line 158 of file rpcb_prot.h.

◆ rpcb_entry

Definition at line 312 of file rpcb_prot.h.

◆ rpcb_entry_list

Definition at line 330 of file rpcb_prot.h.

◆ rpcb_entry_list_ptr

Definition at line 340 of file rpcb_prot.h.

◆ rpcb_rmtcallargs

Definition at line 230 of file rpcb_prot.h.

◆ rpcb_rmtcallres

Definition at line 275 of file rpcb_prot.h.

◆ rpcb_stat

Definition at line 443 of file rpcb_prot.h.

◆ rpcb_stat_byvers

typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]

Definition at line 458 of file rpcb_prot.h.

◆ rpcblist

Definition at line 198 of file rpcb_prot.h.

◆ RPCBLIST

Definition at line 199 of file rpcb_prot.h.

◆ rpcblist_ptr

Definition at line 187 of file rpcb_prot.h.

◆ rpcbs_addrlist

Definition at line 373 of file rpcb_prot.h.

◆ rpcbs_addrlist_ptr

Definition at line 415 of file rpcb_prot.h.

◆ rpcbs_proc

typedef int rpcbs_proc[RPCBSTAT_HIGHPROC]

Definition at line 405 of file rpcb_prot.h.

◆ rpcbs_rmtcalllist

Definition at line 395 of file rpcb_prot.h.

◆ rpcbs_rmtcalllist_ptr

Definition at line 425 of file rpcb_prot.h.

Function Documentation

◆ rpcbproc_bcast_4()

rpcb_rmtcallres * rpcbproc_bcast_4 ( )

◆ rpcbproc_bcast_4_svc()

rpcb_rmtcallres * rpcbproc_bcast_4_svc ( )

◆ rpcbproc_callit_3()

rpcb_rmtcallres * rpcbproc_callit_3 ( )

◆ rpcbproc_callit_3_svc()

rpcb_rmtcallres * rpcbproc_callit_3_svc ( )

◆ rpcbproc_dump_3()

rpcblist_ptr * rpcbproc_dump_3 ( )

◆ rpcbproc_dump_3_svc()

rpcblist_ptr * rpcbproc_dump_3_svc ( )

◆ rpcbproc_dump_4()

rpcblist_ptr * rpcbproc_dump_4 ( )

◆ rpcbproc_dump_4_svc()

rpcblist_ptr * rpcbproc_dump_4_svc ( )

◆ rpcbproc_getaddr_3()

char ** rpcbproc_getaddr_3 ( )

◆ rpcbproc_getaddr_3_svc()

char ** rpcbproc_getaddr_3_svc ( )

◆ rpcbproc_getaddr_4()

char ** rpcbproc_getaddr_4 ( )

◆ rpcbproc_getaddr_4_svc()

char ** rpcbproc_getaddr_4_svc ( )

◆ rpcbproc_getaddrlist_4()

rpcb_entry_list_ptr * rpcbproc_getaddrlist_4 ( )

◆ rpcbproc_getaddrlist_4_svc()

rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc ( )

◆ rpcbproc_getstat_4()

rpcb_stat * rpcbproc_getstat_4 ( )

◆ rpcbproc_getstat_4_svc()

rpcb_stat * rpcbproc_getstat_4_svc ( )

◆ rpcbproc_gettime_3()

u_int * rpcbproc_gettime_3 ( )

◆ rpcbproc_gettime_3_svc()

u_int * rpcbproc_gettime_3_svc ( )

◆ rpcbproc_gettime_4()

u_int * rpcbproc_gettime_4 ( )

◆ rpcbproc_gettime_4_svc()

u_int * rpcbproc_gettime_4_svc ( )

◆ rpcbproc_getversaddr_4()

char ** rpcbproc_getversaddr_4 ( )

◆ rpcbproc_getversaddr_4_svc()

char ** rpcbproc_getversaddr_4_svc ( )

◆ rpcbproc_indirect_4()

rpcb_rmtcallres * rpcbproc_indirect_4 ( )

◆ rpcbproc_indirect_4_svc()

rpcb_rmtcallres * rpcbproc_indirect_4_svc ( )

◆ rpcbproc_set_3()

bool_t * rpcbproc_set_3 ( )

◆ rpcbproc_set_3_svc()

bool_t * rpcbproc_set_3_svc ( )

◆ rpcbproc_set_4()

bool_t * rpcbproc_set_4 ( )

◆ rpcbproc_set_4_svc()

bool_t * rpcbproc_set_4_svc ( )

◆ rpcbproc_taddr2uaddr_3()

char ** rpcbproc_taddr2uaddr_3 ( )

◆ rpcbproc_taddr2uaddr_3_svc()

char ** rpcbproc_taddr2uaddr_3_svc ( )

◆ rpcbproc_taddr2uaddr_4()

char ** rpcbproc_taddr2uaddr_4 ( )

◆ rpcbproc_taddr2uaddr_4_svc()

char ** rpcbproc_taddr2uaddr_4_svc ( )

◆ rpcbproc_uaddr2taddr_3()

struct netbuf * rpcbproc_uaddr2taddr_3 ( )

◆ rpcbproc_uaddr2taddr_3_svc()

struct netbuf * rpcbproc_uaddr2taddr_3_svc ( )

◆ rpcbproc_uaddr2taddr_4()

struct netbuf * rpcbproc_uaddr2taddr_4 ( )

◆ rpcbproc_uaddr2taddr_4_svc()

struct netbuf * rpcbproc_uaddr2taddr_4_svc ( )

◆ rpcbproc_unset_3()

bool_t * rpcbproc_unset_3 ( )

◆ rpcbproc_unset_3_svc()

bool_t * rpcbproc_unset_3_svc ( )

◆ rpcbproc_unset_4()

bool_t * rpcbproc_unset_4 ( )

◆ rpcbproc_unset_4_svc()

bool_t * rpcbproc_unset_4_svc ( )

◆ xdr_netbuf()

bool_t xdr_netbuf ( XDR xdrs,
struct netbuf objp 
)

Definition at line 344 of file rpcb_prot.c.

347{
349
350 if (!xdr_u_int32_t(xdrs, (u_int32_t *) &objp->maxlen)) {
351 return (FALSE);
352 }
353#ifdef __REACTOS__ // CVE-2017-8779
354
355 if (objp->maxlen > RPC_MAXDATASIZE) {
356 return (FALSE);
357 }
358
359#endif
360 dummy = xdr_bytes(xdrs, (char **)&(objp->buf),
361 (u_int *)&(objp->len), objp->maxlen);
362 return (dummy);
363}
bool_t xdr_u_int32_t(XDR *xdrs, u_int32_t *u_int32_p)
Definition: xdr.c:239
bool_t xdr_bytes(XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize)
Definition: xdr.c:536
UINT32 u_int
Definition: types.h:82
int32_t bool_t
Definition: types.h:101
#define FALSE
Definition: types.h:117
unsigned int u_int32_t
Definition: rosdhcp.h:35
#define RPC_MAXDATASIZE
Definition: rpc_com.h:51
void * buf
Definition: types.h:147
unsigned int len
Definition: types.h:146
unsigned int maxlen
Definition: types.h:145

Referenced by rpcb_taddr2uaddr(), and rpcb_uaddr2taddr().

◆ xdr_rp__list()

bool_t xdr_rp__list ( XDR ,
rp__list  
)

◆ xdr_rpcb()

bool_t xdr_rpcb ( XDR xdrs,
rpcb objp 
)

Definition at line 50 of file rpcb_prot.c.

53{
54 if (!xdr_u_int32_t(xdrs, &objp->r_prog)) {
55 return (FALSE);
56 }
57 if (!xdr_u_int32_t(xdrs, &objp->r_vers)) {
58 return (FALSE);
59 }
60#ifndef __REACTOS__ // CVE-2017-8779
61 if (!xdr_string(xdrs, &objp->r_netid, (u_int)~0)) {
62 return (FALSE);
63 }
64 if (!xdr_string(xdrs, &objp->r_addr, (u_int)~0)) {
65 return (FALSE);
66 }
67 if (!xdr_string(xdrs, &objp->r_owner, (u_int)~0)) {
68 return (FALSE);
69 }
70#else
71 if (!xdr_string(xdrs, &objp->r_netid, RPC_MAXDATASIZE)) {
72 return (FALSE);
73 }
74 if (!xdr_string(xdrs, &objp->r_addr, RPC_MAXDATASIZE)) {
75 return (FALSE);
76 }
77 if (!xdr_string(xdrs, &objp->r_owner, RPC_MAXDATASIZE)) {
78 return (FALSE);
79 }
80#endif
81 return (TRUE);
82}
bool_t xdr_string(XDR *xdrs, char **cpp, u_int maxsize)
Definition: xdr.c:678
#define TRUE
Definition: types.h:120
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

Referenced by __rpcb_findaddr_timed(), rpcb_set(), rpcb_unset(), and xdr_rpcblist_ptr().

◆ xdr_rpcb_entry()

bool_t xdr_rpcb_entry ( )

Referenced by xdr_rpcb_entry_list_ptr().

◆ xdr_rpcb_entry_list()

bool_t xdr_rpcb_entry_list ( )

◆ xdr_rpcb_entry_list_ptr()

bool_t xdr_rpcb_entry_list_ptr ( )

◆ xdr_rpcb_rmtcallargs()

bool_t xdr_rpcb_rmtcallargs ( XDR xdrs,
rpcb_rmtcallargs p 
)

Definition at line 270 of file rpcb_prot.c.

273{
274 struct r_rpcb_rmtcallargs *objp =
275 (struct r_rpcb_rmtcallargs *)(void *)p;
276 u_int lenposition, argposition, position;
277 int32_t *buf;
278
279 buf = XDR_INLINE(xdrs, 3 * BYTES_PER_XDR_UNIT);
280 if (buf == NULL) {
281 if (!xdr_u_int32_t(xdrs, &objp->prog)) {
282 return (FALSE);
283 }
284 if (!xdr_u_int32_t(xdrs, &objp->vers)) {
285 return (FALSE);
286 }
287 if (!xdr_u_int32_t(xdrs, &objp->proc)) {
288 return (FALSE);
289 }
290 } else {
291 IXDR_PUT_U_INT32(buf, objp->prog);
292 IXDR_PUT_U_INT32(buf, objp->vers);
293 IXDR_PUT_U_INT32(buf, objp->proc);
294 }
295
296 /*
297 * All the jugglery for just getting the size of the arguments
298 */
299 lenposition = XDR_GETPOS(xdrs);
300 if (! xdr_u_int(xdrs, &(objp->args.args_len))) {
301 return (FALSE);
302 }
303 argposition = XDR_GETPOS(xdrs);
304 if (! (*objp->xdr_args)(xdrs, objp->args.args_val)) {
305 return (FALSE);
306 }
307 position = XDR_GETPOS(xdrs);
308 objp->args.args_len = (u_int)((u_long)position - (u_long)argposition);
309 XDR_SETPOS(xdrs, lenposition);
310 if (! xdr_u_int(xdrs, &(objp->args.args_len))) {
311 return (FALSE);
312 }
313 XDR_SETPOS(xdrs, position);
314 return (TRUE);
315}
bool_t xdr_u_int(XDR *xdrs, u_int *up)
Definition: xdr.c:133
#define NULL
Definition: types.h:112
INT32 int32_t
Definition: types.h:71
unsigned long u_long
Definition: linux.h:269
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLfloat GLfloat p
Definition: glext.h:8902
#define IXDR_PUT_U_INT32(buf, v)
Definition: rpcb_prot.h:21
xdrproc_t xdr_args
Definition: rpcb_prot.h:260
rpcprog_t prog
Definition: rpcb_prot.h:253
struct r_rpcb_rmtcallargs::@208 args
rpcvers_t vers
Definition: rpcb_prot.h:254
rpcproc_t proc
Definition: rpcb_prot.h:255
#define XDR_INLINE(xdrs, len)
Definition: xdr.h:209
#define XDR_SETPOS(xdrs, pos)
Definition: xdr.h:204
#define XDR_GETPOS(xdrs)
Definition: xdr.h:199
#define BYTES_PER_XDR_UNIT
Definition: xdr.h:93

Referenced by rpc_broadcast_exp().

◆ xdr_rpcb_rmtcallres()

bool_t xdr_rpcb_rmtcallres ( XDR xdrs,
rpcb_rmtcallres p 
)

Definition at line 322 of file rpcb_prot.c.

325{
327 struct r_rpcb_rmtcallres *objp = (struct r_rpcb_rmtcallres *)(void *)p;
328
329#ifdef __REACTOS__ // CVE-2017-8779
330 if (!xdr_string(xdrs, &objp->addr, RPC_MAXDATASIZE)) {
331#else
332 if (!xdr_string(xdrs, &objp->addr, (u_int)~0)) {
333#endif
334 return (FALSE);
335 }
336 if (!xdr_u_int(xdrs, &objp->results.results_len)) {
337 return (FALSE);
338 }
339 dummy = (*(objp->xdr_res))(xdrs, objp->results.results_val);
340 return (dummy);
341}
xdrproc_t xdr_res
Definition: rpcb_prot.h:295
struct r_rpcb_rmtcallres::@210 results

Referenced by rpc_broadcast_exp().

◆ xdr_rpcb_stat()

bool_t xdr_rpcb_stat ( )

Referenced by xdr_rpcb_stat_byvers().

◆ xdr_rpcb_stat_byvers()

bool_t xdr_rpcb_stat_byvers ( )

◆ xdr_rpcblist()

bool_t xdr_rpcblist ( XDR ,
rpcblist **   
)

◆ xdr_rpcblist_ptr()

bool_t xdr_rpcblist_ptr ( XDR xdrs,
rpcblist_ptr rp 
)

Definition at line 108 of file rpcb_prot.c.

111{
112 /*
113 * more_elements is pre-computed in case the direction is
114 * XDR_ENCODE or XDR_FREE. more_elements is overwritten by
115 * xdr_bool when the direction is XDR_DECODE.
116 */
117 bool_t more_elements;
118 int freeing = (xdrs->x_op == XDR_FREE);
120 rpcblist_ptr next_copy;
121
122 next = NULL;
123 for (;;) {
124 more_elements = (bool_t)(*rp != NULL);
125 if (! xdr_bool(xdrs, &more_elements)) {
126 return (FALSE);
127 }
128 if (! more_elements) {
129 return (TRUE); /* we are done */
130 }
131 /*
132 * the unfortunate side effect of non-recursion is that in
133 * the case of freeing we must remember the next object
134 * before we free the current object ...
135 */
136 if (freeing)
137 next = (*rp)->rpcb_next;
138 if (! xdr_reference(xdrs, (caddr_t *)rp,
139 (u_int)sizeof (rpcblist), (xdrproc_t)xdr_rpcb)) {
140 return (FALSE);
141 }
142 if (freeing) {
143 next_copy = next;
144 rp = &next_copy;
145 /*
146 * Note that in the subsequent iteration, next_copy
147 * gets nulled out by the xdr_reference
148 * but next itself survives.
149 */
150 } else {
151 rp = &((*rp)->rpcb_next);
152 }
153 }
154 /*NOTREACHED*/
155}
bool_t xdr_bool(XDR *xdrs, bool_t *bp)
Definition: xdr.c:428
static unsigned __int64 next
Definition: rand_nt.c:6
char * caddr_t
Definition: rosdhcp.h:36
bool_t xdr_rpcb(XDR *xdrs, RPCB *objp)
Definition: rpcb_prot.c:50
enum xdr_op x_op
Definition: xdr.h:104
@ XDR_FREE
Definition: xdr.h:87
bool_t(* xdrproc_t)(XDR *,...)
Definition: xdr.h:144
bool_t xdr_reference(XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc)
Definition: xdr_reference.c:62

Referenced by rpcb_getmaps(), and xdr_rpcblist().

◆ xdr_rpcbs_addrlist()

bool_t xdr_rpcbs_addrlist ( )

◆ xdr_rpcbs_addrlist_ptr()

bool_t xdr_rpcbs_addrlist_ptr ( )

Referenced by xdr_rpcb_stat().

◆ xdr_rpcbs_proc()

bool_t xdr_rpcbs_proc ( )

Referenced by xdr_rpcb_stat().

◆ xdr_rpcbs_rmtcalllist()

bool_t xdr_rpcbs_rmtcalllist ( )

◆ xdr_rpcbs_rmtcalllist_ptr()

bool_t xdr_rpcbs_rmtcalllist_ptr ( XDR xdrs,
rpcbs_rmtcalllist_ptr objp 
)

Definition at line 235 of file rpcb_st_xdr.c.

238{
239 if (!xdr_pointer(xdrs, (char **)objp, sizeof (rpcbs_rmtcalllist),
241 return (FALSE);
242 }
243 return (TRUE);
244}
bool_t xdr_rpcbs_rmtcalllist()
bool_t xdr_pointer(XDR *xdrs, char **objpp, u_int obj_size, xdrproc_t xdr_obj)

Referenced by xdr_rpcb_stat().