authinfo
struct dvd_authinfo *authinfo;
authinfo = (struct dvd_authinfo *)addr;
error = cdreportkey(periph, authinfo);
error = cdsendkey(periph, authinfo);
struct dvd_authinfo *authinfo);
struct dvd_authinfo *authinfo);
cdreportkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
switch (authinfo->format) {
lba = authinfo->lba;
/* agid */ authinfo->agid,
/* key_format */ authinfo->format,
switch(authinfo->format) {
authinfo->agid = (agid_data->agid & RKD_AGID_MASK) >>
bcopy(chal_data->challenge_key, authinfo->keychal,
sizeof(authinfo->keychal)));
bcopy(key1_data->key1, authinfo->keychal,
min(sizeof(key1_data->key1), sizeof(authinfo->keychal)));
authinfo->cpm = (title_data->byte0 & RKD_TITLE_CPM) >>
authinfo->cp_sec = (title_data->byte0 & RKD_TITLE_CP_SEC) >>
authinfo->cgms = (title_data->byte0 & RKD_TITLE_CMGS_MASK) >>
bcopy(title_data->title_key, authinfo->keychal,
sizeof(authinfo->keychal)));
authinfo->asf = asf_data->success & RKD_ASF_SUCCESS;
authinfo->reg_type = (rpc_data->byte4 & RKD_RPC_TYPE_MASK) >>
authinfo->vend_rsts =
authinfo->user_rsts = rpc_data->byte4 & RKD_RPC_USER_RESET_MASK;
authinfo->region = rpc_data->region_mask;
authinfo->rpc_scheme = rpc_data->rpc_scheme1;
cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
switch(authinfo->format) {
bcopy(authinfo->keychal, challenge_data->challenge_key,
min(sizeof(authinfo->keychal),
bcopy(authinfo->keychal, key2_data->key1,
min(sizeof(authinfo->keychal), sizeof(key2_data->key1)));
rpc_data->region_code = authinfo->region;
/* agid */ authinfo->agid,
/* key_format */ authinfo->format,
void *authinfo; /* authentication information */
if (rp->authinfo)
free(rp->authinfo);
struct authinfo *authp = (struct authinfo *)vauthp;
auth_Init(struct authinfo *authp, struct physical *p, auth_func req,
memset(authp, '\0', sizeof(struct authinfo));
auth_StartReq(struct authinfo *authp)
auth_StopTimer(struct authinfo *authp)
auth_ReadHeader(struct authinfo *authp, struct mbuf *bp)
auth_ReadName(struct authinfo *authp, struct mbuf *bp, size_t len)
struct authinfo;
typedef void (*auth_func)(struct authinfo *);
extern void auth_Init(struct authinfo *, struct physical *,
extern void auth_StopTimer(struct authinfo *);
extern void auth_StartReq(struct authinfo *);
extern struct mbuf *auth_ReadHeader(struct authinfo *, struct mbuf *);
extern struct mbuf *auth_ReadName(struct authinfo *, struct mbuf *, size_t);
chap_ChallengeInit(struct authinfo *authp)
chap_Challenge(struct authinfo *authp)
chap_Success(struct authinfo *authp)
chap_Failure(struct authinfo *authp)
struct authinfo auth;
struct authinfo pap; /* Authentication using pap */
SendPapCode(struct authinfo *authp, int code, const char *message)
pap_Success(struct authinfo *authp)
pap_Failure(struct authinfo *authp)
pap_Init(struct authinfo *pap, struct physical *p)
struct authinfo *authp = &p->dl->pap;
pap_Req(struct authinfo *authp)
struct authinfo;
extern void pap_Init(struct authinfo *, struct physical *);
radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
struct authinfo *auth; /* Tell this about success/failure */
extern int radius_Authenticate(struct radius *, struct authinfo *,