ReactOS 0.4.16-dev-251-ga17b6e9
authdes_prot.c File Reference
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <rpc/auth.h>
#include <rpc/auth_des.h>
Include dependency graph for authdes_prot.c:

Go to the source code of this file.

Macros

#define ATTEMPT(xdr_op)   if (!(xdr_op)) return (FALSE)
 

Functions

bool_t xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred)
 
bool_t xdr_authdes_verf (XDR *xdrs, struct authdes_verf *verf)
 

Macro Definition Documentation

◆ ATTEMPT

#define ATTEMPT (   xdr_op)    if (!(xdr_op)) return (FALSE)

Definition at line 43 of file authdes_prot.c.

Function Documentation

◆ xdr_authdes_cred()

bool_t xdr_authdes_cred ( XDR xdrs,
struct authdes_cred cred 
)

Definition at line 46 of file authdes_prot.c.

49{
50 /*
51 * Unrolled xdr
52 */
53 ATTEMPT(xdr_enum(xdrs, (enum_t *)&cred->adc_namekind));
54 switch (cred->adc_namekind) {
55 case ADN_FULLNAME:
56 ATTEMPT(xdr_string(xdrs, &cred->adc_fullname.name,
58 ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_fullname.key,
59 sizeof(des_block)));
60 ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_fullname.window,
61 sizeof(cred->adc_fullname.window)));
62 return (TRUE);
63 case ADN_NICKNAME:
65 sizeof(cred->adc_nickname)));
66 return (TRUE);
67 default:
68 return (FALSE);
69 }
70}
bool_t xdr_string(XDR *xdrs, char **cpp, u_int maxsize)
Definition: xdr.c:678
bool_t xdr_opaque(XDR *xdrs, caddr_t cp, u_int cnt)
Definition: xdr.c:484
bool_t xdr_enum(XDR *xdrs, enum_t *ep)
Definition: xdr.c:458
#define MAXNETNAMELEN
Definition: auth.h:78
@ ADN_FULLNAME
Definition: auth_des.h:51
@ ADN_NICKNAME
Definition: auth_des.h:52
#define ATTEMPT(xdr_op)
Definition: authdes_prot.c:43
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
int32_t enum_t
Definition: types.h:102
char * caddr_t
Definition: rosdhcp.h:36
u_int32_t adc_nickname
Definition: auth_des.h:74
struct authdes_fullname adc_fullname
Definition: auth_des.h:72
enum authdes_namekind adc_namekind
Definition: auth_des.h:71

Referenced by authdes_marshal().

◆ xdr_authdes_verf()

bool_t xdr_authdes_verf ( XDR xdrs,
struct authdes_verf verf 
)

Definition at line 74 of file authdes_prot.c.

77{
78 /*
79 * Unrolled xdr
80 */
81 ATTEMPT(xdr_opaque(xdrs, (caddr_t)&verf->adv_xtimestamp,
82 sizeof(des_block)));
83 ATTEMPT(xdr_opaque(xdrs, (caddr_t)&verf->adv_int_u,
84 sizeof(verf->adv_int_u)));
85 return (TRUE);
86}
u_int32_t adv_int_u
Definition: auth_des.h:88

Referenced by authdes_marshal().