openHiTLS API openHiTLS 0.1.0-Alpha1

◆ BSL_UIO_Ctrl()

int32_t BSL_UIO_Ctrl ( BSL_UIO uio,
int32_t  cmd,
int32_t  larg,
void *  parg 
)

Process specific UIO implementations by cmd

参数
uio[IN] UIO object
cmd[IN] Different cmd processes perform different operations on UIO objects.
larg[IN] Determined by cmd. For details, see the following
parg[IN/OUT] Determined by cmd. For details, see the following
返回值
BSL_SUCCESS
Non-BSL_SUCCESS,fordetails, see bsl_errno.h.

set the peer IP address in the UIO object

The address format is a binary address in network byte order, with a length of 4 or 16 bytes. A generated cookie will be provided for use by the HelloVerifyRequest for dtls.

参数
uio[IN] UIO object
cmd[IN] BSL_UIO_SET_PEER_IP_ADDR
larg[IN] Size of the peer address: The length must be 4 or 16
parg[IN] Peer address

Obtain the peer IP address from the UIO object

The obtained address is in the network byte order binary address format. The input length must be greater than the configured size. The purpose is to provide a generated cookie for use by the HelloVerifyRequest of the dtls.

参数
uio[IN] UIO object
cmd[IN] BSL_UIO_GET_PEER_IP_ADDR
larg[IN] 0
parg[IN] BSL_UIO_CtrlGetPeerIpAddrParam *, include: addr [IN/OUT] Peer address, size [IN/OUT] IN: size of the input buffer OUT: size of the output peer address

Obtain the stream ID sent by the SCTP from the UIO object.

This API needs to be called by users in BSL_UIO_Method.write and send SCTP messages based on the obtained stream ID

参数
uio[IN] UIO object
cmd[IN] BSL_UIO_SCTP_GET_SEND_STREAM_ID
larg[IN] 0
parg[IN/OUT] ID of the sent stream, uint16_t* Type

Set the stream ID of the app message sent by the SCTP in the UIO object.

If a service message needs to be processed by a specific stream ID, this interface can be called.

参数
uio[IN] UIO object
cmd[IN] BSL_UIO_SCTP_SET_APP_STREAM_ID
larg[IN] App stream ID. The value ranges from 0 to 65535
parg[IN] NULL