39typedef int32_t BSL_UIO_InfoCb(
BSL_UIO *, int32_t, int32_t);
42typedef int32_t (*BslUioWriteCb)(
BSL_UIO *uio,
const void *buf, uint32_t len, uint32_t *writeLen);
43typedef int32_t (*BslUioReadCb)(
BSL_UIO *uio,
void *buf, uint32_t len, uint32_t *readLen);
44typedef int32_t (*BslUioCtrlCb)(
BSL_UIO *uio, int32_t cmd, int32_t larg,
void *parg);
45typedef int32_t (*BslUioCreateCb)(
BSL_UIO *uio);
46typedef int32_t (*BslUioDestroyCb)(
BSL_UIO *uio);
47typedef int32_t (*BslUioPutsCb)(
BSL_UIO *uio,
const char *buf, uint32_t *writeLen);
48typedef int32_t (*BslUioGetsCb)(
BSL_UIO *uio,
char *buf, uint32_t *readLen);
49typedef int32_t (*BslUioCbCtrlCb)(
BSL_UIO *uio,
int cmd, BSL_UIO_InfoCb *callback);
51typedef struct BSL_UIO_MethodStruct BSL_UIO_Method;
66 BSL_UIO_EXTEND = 10000,
69#define IS_TRANSTYPE_DATAGRAM(transportType) ((transportType) == BSL_UIO_SCTP || (transportType) == BSL_UIO_UDP)
79 const uint8_t *authKey;
99 BSL_UIO_SET_PEER_IP_ADDR = 0x000,
103 BSL_UIO_GET_PEER_IP_ADDR,
121 BSL_UIO_GET_WRITE_NUM,
123 BSL_UIO_GET_READ_NUM,
127 BIO_UIO_SET_CALLBACK,
131 BSL_UIO_DO_HANDSHAKE,
134 BSL_UIO_SET_SSL_RENEGOTIATE_TIMEOUT,
135 BSL_UIO_SET_SSL_RENEGOTIATE_BYTES,
136 BSL_UIO_UDP_SET_CONNECTED,
137 BSL_UIO_SET_BUFFER_SIZE,
138 BSL_UIO_UDP_GET_MTU_OVERHEAD,
139 BSL_UIO_UDP_QUERY_MTU,
140 BSL_UIO_UDP_MTU_EXCEEDED,
141 BSL_UIO_CIPHER_IS_FINISHED,
142 BSL_UIO_SET_CONNECT_MODE,
145 BSL_UIO_SET_BIND_MODE,
146 BSL_UIO_GET_BIND_MODE,
165 BSL_UIO_SCTP_GET_SEND_STREAM_ID,
167 BSL_UIO_SCTP_SET_APP_STREAM_ID,
169 BSL_UIO_SCTP_MASK_APP_MESSAGE,
171 BSL_UIO_SCTP_SET_CALLBACK,
175 BSL_UIO_MEM_NEW_BUF = 0x400,
183 BSL_UIO_MEM_GET_INFO,
187 BSL_UIO_FILE_OPEN = 0x500,
191 BSL_UIO_FILE_GET_EOF,
194 BSL_UIO_FILE_GET_PTR,
199 BSL_UIO_FD_GET_INFO = 0x600,
202 BSL_UIO_PAIR_MAKE = 0x700,
203 BSL_UIO_PAIR_SET_BUFFER_SIZE,
204 BSL_UIO_PAIR_GET_BUFFER_SIZE,
207 BSL_UIO_TTO_SET_READ_CB = 0x800,
208 BSL_UIO_TTO_SET_WRITE_CB,
209 BSL_UIO_TTO_SET_READ_APP_DATA,
210 BSL_UIO_TTO_SET_WRITE_APP_DATA,
213 BSL_UIO_DTO_SET_KEY = 0x1001,
214 BSL_UIO_DTO_SET_EPOCH_SEQUENCE,
225} BSL_UIO_METHOD_TYPE;
232#define BSL_UIO_FILE_READ 0x02
233#define BSL_UIO_FILE_WRITE 0x04
234#define BSL_UIO_FILE_APPEND 0x08
235#define BSL_UIO_FILE_TEXT 0x10
237#define BSL_UIO_FLAGS_READ 0x01
238#define BSL_UIO_FLAGS_WRITE 0x02
239#define BSL_UIO_FLAGS_IO_SPECIAL 0x04
240#define BSL_UIO_FLAGS_RWS (BSL_UIO_FLAGS_READ | BSL_UIO_FLAGS_WRITE | BSL_UIO_FLAGS_IO_SPECIAL)
241#define BSL_UIO_FLAGS_SHOULD_RETRY 0x08
243#define BSL_UIO_FLAGS_MEM_READ_ONLY 0x10
245#define BSL_UIO_FLAGS_BASE64_NO_NEWLINE 0x20
246#define BSL_UIO_FLAGS_BASE64_PEM 0x40
struct UIO_ControlBlock BSL_UIO
UIO module control structure
定义 bsl_uio.h:37
int32_t BSL_UIO_SetFlags(BSL_UIO *uio, uint32_t flags)
Set the UIO object flag.
int32_t BSL_UIO_Write(BSL_UIO *uio, const void *data, uint32_t len, uint32_t *writeLen)
Write data to the UIO object
int32_t BSL_UIO_SetUserData(BSL_UIO *uio, void *data)
Set the user data in the UIO object
int32_t BSL_UIO_SetMethodType(BSL_UIO_Method *meth, BSL_UIO_TransportType type)
set uio method type
void BSL_UIO_FreeMethod(BSL_UIO_Method *meth)
free uio Method
const BSL_UIO_Method * BSL_UIO_MemMethod(void)
obtain the default MEM UIO
const BSL_UIO_Method * BSL_UIO_GetMethod(const BSL_UIO *uio)
Method for obtaining the UIO
int32_t BSL_UIO_Puts(BSL_UIO *uio, const char *buf, uint32_t *writeLen)
Write a string to the UIO object.
BSL_UIO_Method * BSL_UIO_NewMethod(void)
Creating uio method structure
void BSL_UIO_SetIsUnderlyingClosedByUio(BSL_UIO *uio, bool close)
Set whether resources associated with the UIO are closed by the UIO.
BSL_UIO_CtrlParameter
BSL_UIO_CtrlParameter controls the I/O callback function. Hitls notifies the user of the function to ...
定义 bsl_uio.h:93
const BSL_UIO_Method * BSL_UIO_FileMethod(void)
obtain the default FILE UIO method
int32_t BSL_UIO_SetUserDataFreeFunc(BSL_UIO *uio, BSL_UIO_USERDATA_FREE_FUNC userDataFreeFunc)
Release the user data set in the UIO object.
int32_t BSL_UIO_Read(BSL_UIO *uio, void *data, uint32_t len, uint32_t *readLen)
Read data from the UIO object.
int32_t BSL_UIO_SetMethod(BSL_UIO_Method *meth, int32_t type, void *func)
set uio method callback
BSL_UIO * BSL_UIO_New(const BSL_UIO_Method *method)
Create a UIO object
void BSL_UIO_Free(BSL_UIO *uio)
Release the UIO object.
int32_t BSL_UIO_ClearFlags(BSL_UIO *uio, uint32_t flags)
Clear the UIO object flag
int32_t BSL_UIO_UpRef(BSL_UIO *uio)
Set the value of uio reference counting to 1
int32_t BSL_UIO_Ctrl(BSL_UIO *uio, int32_t cmd, int32_t larg, void *parg)
Process specific UIO implementations by cmd
BSL_UIO * BSL_UIO_Next(BSL_UIO *uio)
Obtain the next UIO object in the chain.
const BSL_UIO_Method * BSL_UIO_UdpMethod(void)
obtain the default UDP UIO method
int32_t BSL_UIO_Append(BSL_UIO *uio, BSL_UIO *tail)
Add a UIO object to the tail of the chain.
void * BSL_UIO_GetCtx(const BSL_UIO *uio)
Obtain the implementation-related context.
void BSL_UIO_FreeChain(BSL_UIO *uio)
Release UIO object b and its subsequent chains.
bool BSL_UIO_GetUioChainTransportType(BSL_UIO *uio, const BSL_UIO_TransportType uioType)
Obtain the UIO transmission protocol type
void BSL_UIO_SetCtx(BSL_UIO *uio, void *ctx)
Set the implementation-related context.
BSL_UIO_TransportType
Transmission protocol enumeration
定义 bsl_uio.h:57
uint32_t BSL_UIO_TestFlags(const BSL_UIO *uio, uint32_t flags, uint32_t *out)
Check the UIO object flag
void(* BSL_UIO_USERDATA_FREE_FUNC)(void *)
userData release function
定义 bsl_uio.h:86
int32_t BSL_UIO_Gets(BSL_UIO *uio, char *buf, uint32_t *readLen)
Reads a string from the UIO object
void BSL_UIO_SetInit(BSL_UIO *uio, bool init)
Set the UIO init.
const BSL_UIO_Method * BSL_UIO_SctpMethod(void)
obtain the default SCTP UIO
BSL_UIO * BSL_UIO_PopCurrent(BSL_UIO *uio)
Pop UIO object from the chain.
void * BSL_UIO_GetUserData(const BSL_UIO *uio)
Obtain the user data in the UIO object.
BSL_UIO_TransportType BSL_UIO_GetTransportType(const BSL_UIO *uio)
Obtain the UIO transmission protocol type
const BSL_UIO_Method * BSL_UIO_TcpMethod(void)
obtain the default TCP UIO method
const BSL_UIO_Method * BSL_UIO_BufferMethod(void)
obtain the default buffer UIO
void BSL_UIO_SetFD(BSL_UIO *uio, int fd)
Set the fd of the UIO object
bool BSL_UIO_GetIsUnderlyingClosedByUio(const BSL_UIO *uio)
Obtains whether resources associated with the UIO are closed by the UIO.
@ BSL_UIO_SCTP_ACTIVE_AUTH_SHARED_KEY
定义 bsl_uio.h:153
@ BSL_UIO_SCTP_RECV_BUFF_IS_EMPTY
定义 bsl_uio.h:160
@ BSL_UIO_SCTP_SND_BUFF_IS_EMPTY
定义 bsl_uio.h:156
@ BSL_UIO_SCTP_CHECK_PEER_AUTH
定义 bsl_uio.h:150
@ BSL_UIO_SCTP_DEL_PRE_AUTH_SHARED_KEY
定义 bsl_uio.h:155
@ BSL_UIO_SCTP_ADD_AUTH_SHARED_KEY
定义 bsl_uio.h:151
Sctp auth key, hitls Use the BSL_UIO_Method.ctrl method to transfer the BSL_UIO_SCTP_ADD_AUTH_SHARED_...
定义 bsl_uio.h:76