ReactOS  0.4.14-dev-115-g4576127
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,
57  MAXNETNAMELEN));
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:
64  ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_nickname,
65  sizeof(cred->adc_nickname)));
66  return (TRUE);
67  default:
68  return (FALSE);
69  }
70 }
#define TRUE
Definition: types.h:120
bool_t xdr_string(XDR *xdrs, char **cpp, u_int maxsize)
Definition: xdr.c:678
struct authdes_fullname adc_fullname
Definition: auth_des.h:72
char * caddr_t
Definition: rosdhcp.h:36
u_int32_t adc_nickname
Definition: auth_des.h:74
bool_t xdr_enum(XDR *xdrs, enum_t *ep)
Definition: xdr.c:458
int32_t enum_t
Definition: types.h:102
bool_t xdr_opaque(XDR *xdrs, caddr_t cp, u_int cnt)
Definition: xdr.c:484
enum authdes_namekind adc_namekind
Definition: auth_des.h:71
#define MAXNETNAMELEN
Definition: auth.h:78
#define ATTEMPT(xdr_op)
Definition: authdes_prot.c:43

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 }
#define TRUE
Definition: types.h:120
char * caddr_t
Definition: rosdhcp.h:36
bool_t xdr_opaque(XDR *xdrs, caddr_t cp, u_int cnt)
Definition: xdr.c:484
u_int32_t adv_int_u
Definition: auth_des.h:88
#define ATTEMPT(xdr_op)
Definition: authdes_prot.c:43

Referenced by authdes_marshal().