C API for BALTECH SDK
ulrdr.h
Go to the documentation of this file.
1 
10 #ifndef __BRP_BALTECH_API_CMDS_ULRDR_H__
11 #define __BRP_BALTECH_API_CMDS_ULRDR_H__
12 #include "../typedefs.h"
16 #define BRP_UlRdr_ErrResponse BRP_ERR_STATUS(0xA500, 0x01)
17 
20 #define BRP_UlRdr_ErrSequence BRP_ERR_STATUS(0xA500, 0x02)
21 
24 #define BRP_UlRdr_ErrSignature BRP_ERR_STATUS(0xA500, 0x03)
25 
36 brp_errcode brp_UlRdr_SendAuth1(brp_protocol protocol, unsigned* SendDevCode, unsigned* SendCmdCode, brp_buf* SendParams, size_t* SendParams_len, brp_mempool *mempool);
45 brp_errcode brp_UlRdr_RecvAuth1(brp_protocol protocol, unsigned RecvStatus, brp_buf RecvResult, size_t RecvResult_len);
57 brp_errcode brp_UlRdr_SendAuth2(brp_protocol protocol, unsigned* SendDevCode, unsigned* SendCmdCode, brp_buf* SendParams, size_t* SendParams_len, brp_mempool *mempool);
66 brp_errcode brp_UlRdr_RecvAuth2(brp_protocol protocol, unsigned RecvStatus, brp_buf RecvResult, size_t RecvResult_len);
83 brp_errcode brp_UlRdr_SendEncryptedCmd(brp_protocol protocol, brp_buf Signature, unsigned DevCode, unsigned CmdCode, brp_buf Params, size_t Params_len, unsigned* SendDevCode, unsigned* SendCmdCode, brp_buf* SendParams, size_t* SendParams_len, brp_mempool *mempool);
94 brp_errcode brp_UlRdr_RecvEncryptedCmd(brp_protocol protocol, unsigned RecvStatus, brp_buf RecvResult, size_t RecvResult_len, unsigned* Status);
95 #endif
96 
brp_errcode brp_UlRdr_SendAuth1(brp_protocol protocol, unsigned *SendDevCode, unsigned *SendCmdCode, brp_buf *SendParams, size_t *SendParams_len, brp_mempool *mempool)
Retrieves the command that has to be sent to the reader to unlock, to initiate authentication.
brp_errcode brp_UlRdr_RecvAuth2(brp_protocol protocol, unsigned RecvStatus, brp_buf RecvResult, size_t RecvResult_len)
Passes the response of the reader to unlock.
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
brp_errcode brp_UlRdr_SendAuth2(brp_protocol protocol, unsigned *SendDevCode, unsigned *SendCmdCode, brp_buf *SendParams, size_t *SendParams_len, brp_mempool *mempool)
Retrieves the command that has to be send to the reader to unlock, to continue authentication.
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:27
brp_errcode brp_UlRdr_RecvAuth1(brp_protocol protocol, unsigned RecvStatus, brp_buf RecvResult, size_t RecvResult_len)
Passes the response of the reader to unlock.
brp_errcode brp_UlRdr_RecvEncryptedCmd(brp_protocol protocol, unsigned RecvStatus, brp_buf RecvResult, size_t RecvResult_len, unsigned *Status)
Check the response received by the command brp_UlRdr_SendEncryptedCmd().
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61
brp_errcode brp_UlRdr_SendEncryptedCmd(brp_protocol protocol, brp_buf Signature, unsigned DevCode, unsigned CmdCode, brp_buf Params, size_t Params_len, unsigned *SendDevCode, unsigned *SendCmdCode, brp_buf *SendParams, size_t *SendParams_len, brp_mempool *mempool)
Encrypts the given command with the session key generated in the previous 3-pass-authentication.