ReactOS 0.4.15-dev-7842-g558ab78
pmap_prot.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pmap
 
struct  pmaplist
 

Macros

#define PMAPPORT   ((u_short)111)
 
#define PMAPPROG   ((u_long)100000)
 
#define PMAPVERS   ((u_long)2)
 
#define PMAPVERS_PROTO   ((u_long)2)
 
#define PMAPVERS_ORIG   ((u_long)1)
 
#define PMAPPROC_NULL   ((u_long)0)
 
#define PMAPPROC_SET   ((u_long)1)
 
#define PMAPPROC_UNSET   ((u_long)2)
 
#define PMAPPROC_GETPORT   ((u_long)3)
 
#define PMAPPROC_DUMP   ((u_long)4)
 
#define PMAPPROC_CALLIT   ((u_long)5)
 

Functions

__BEGIN_DECLS bool_t xdr_pmap (XDR *, struct pmap *)
 
bool_t xdr_pmaplist (XDR *, struct pmaplist **)
 
bool_t xdr_pmaplist_ptr (XDR *, struct pmaplist *)
 

Macro Definition Documentation

◆ PMAPPORT

#define PMAPPORT   ((u_short)111)

Definition at line 76 of file pmap_prot.h.

◆ PMAPPROC_CALLIT

#define PMAPPROC_CALLIT   ((u_long)5)

Definition at line 86 of file pmap_prot.h.

◆ PMAPPROC_DUMP

#define PMAPPROC_DUMP   ((u_long)4)

Definition at line 85 of file pmap_prot.h.

◆ PMAPPROC_GETPORT

#define PMAPPROC_GETPORT   ((u_long)3)

Definition at line 84 of file pmap_prot.h.

◆ PMAPPROC_NULL

#define PMAPPROC_NULL   ((u_long)0)

Definition at line 81 of file pmap_prot.h.

◆ PMAPPROC_SET

#define PMAPPROC_SET   ((u_long)1)

Definition at line 82 of file pmap_prot.h.

◆ PMAPPROC_UNSET

#define PMAPPROC_UNSET   ((u_long)2)

Definition at line 83 of file pmap_prot.h.

◆ PMAPPROG

#define PMAPPROG   ((u_long)100000)

Definition at line 77 of file pmap_prot.h.

◆ PMAPVERS

#define PMAPVERS   ((u_long)2)

Definition at line 78 of file pmap_prot.h.

◆ PMAPVERS_ORIG

#define PMAPVERS_ORIG   ((u_long)1)

Definition at line 80 of file pmap_prot.h.

◆ PMAPVERS_PROTO

#define PMAPVERS_PROTO   ((u_long)2)

Definition at line 79 of file pmap_prot.h.

Function Documentation

◆ xdr_pmap()

__BEGIN_DECLS bool_t xdr_pmap ( XDR xdrs,
struct pmap regs 
)

Definition at line 45 of file pmap_prot.c.

48{
49
50 assert(xdrs != NULL);
51 assert(regs != NULL);
52
53 if (xdr_u_long(xdrs, &regs->pm_prog) &&
54 xdr_u_long(xdrs, &regs->pm_vers) &&
55 xdr_u_long(xdrs, &regs->pm_prot))
56 return (xdr_u_long(xdrs, &regs->pm_port));
57 return (FALSE);
58}
bool_t xdr_u_long(XDR *xdrs, u_long *ulp)
Definition: xdr.c:186
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define assert(x)
Definition: debug.h:53
struct @5011 regs[]

Referenced by __rpcb_findaddr_timed(), pmap_getport(), and xdr_pmaplist().

◆ xdr_pmaplist()

bool_t xdr_pmaplist ( XDR xdrs,
struct pmaplist **  rp 
)

Definition at line 83 of file pmap_prot2.c.

86{
87 /*
88 * more_elements is pre-computed in case the direction is
89 * XDR_ENCODE or XDR_FREE. more_elements is overwritten by
90 * xdr_bool when the direction is XDR_DECODE.
91 */
92 bool_t more_elements;
93 int freeing;
94 struct pmaplist **next = NULL; /* pacify gcc */
95
96 assert(xdrs != NULL);
97 assert(rp != NULL);
98
99 freeing = (xdrs->x_op == XDR_FREE);
100
101 for (;;) {
102 more_elements = (bool_t)(*rp != NULL);
103 if (! xdr_bool(xdrs, &more_elements))
104 return (FALSE);
105 if (! more_elements)
106 return (TRUE); /* we are done */
107 /*
108 * the unfortunate side effect of non-recursion is that in
109 * the case of freeing we must remember the next object
110 * before we free the current object ...
111 */
112 if (freeing)
113 next = &((*rp)->pml_next);
114 if (! xdr_reference(xdrs, (caddr_t *)rp,
115 (u_int)sizeof(struct pmaplist), (xdrproc_t)xdr_pmap))
116 return (FALSE);
117 rp = (freeing) ? next : &((*rp)->pml_next);
118 }
119}
bool_t xdr_bool(XDR *xdrs, bool_t *bp)
Definition: xdr.c:428
UINT32 u_int
Definition: types.h:82
int32_t bool_t
Definition: types.h:101
#define TRUE
Definition: types.h:120
bool_t xdr_pmap(XDR *xdrs, struct pmap *regs)
Definition: pmap_prot.c:45
static unsigned __int64 next
Definition: rand_nt.c:6
char * caddr_t
Definition: rosdhcp.h:36
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 pmap_getmaps(), and xdr_pmaplist_ptr().

◆ xdr_pmaplist_ptr()

bool_t xdr_pmaplist_ptr ( XDR xdrs,
struct pmaplist rp 
)

Definition at line 127 of file pmap_prot2.c.

130{
131 return xdr_pmaplist(xdrs, (struct pmaplist **)(void *)rp);
132}
bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp)
Definition: pmap_prot2.c:83