XilinxProcessorIPLib/drivers/hdcp22_rx_dp/src/xhdcp22_rx.c
static int XHdcp22Rx_ProcessMessageLCInit(XHdcp22_Rx *InstancePtr)
{
	/* Verify arguments */
	Xil_AssertNonvoid(InstancePtr != NULL);

	XHdcp22_Rx_Message *MsgPtr = (XHdcp22_Rx_Message*)InstancePtr->MessageBuffer;

	/* Log message read completion */
	XHdcp22Rx_LogWr(InstancePtr, XHDCP22_RX_LOG_EVT_INFO_MESSAGE, XHDCP22_RX_MSG_ID_LCINIT);

	/* Check message size */
	if(InstancePtr->MessageSize != sizeof(XHdcp22_Rx_LCInit))
	{
		XHdcp22Rx_LogWr(InstancePtr, XHDCP22_RX_LOG_EVT_ERROR, XHDCP22_RX_ERROR_FLAG_MESSAGE_SIZE);
		return XST_FAILURE;
	}

	/* Update locality check attempts */
	InstancePtr->Info.LCInitAttempts++;

	/* Record Rn parameter */
	memcpy(InstancePtr->Params.Rn, MsgPtr->LCInit.Rn, XHDCP22_RX_RN_SIZE);

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
* This function processes the LC_Init message received from the
* transmitter. The locality check attempts is incremented for
* each LCInit message received. The random nonce Rn is recorded.
*
* @param    InstancePtr is a pointer to the XHdcp22_Rx core instance.
*
* @return   - XST_SUCCESS if message processed successfully.
*           - XST_FAILURE if message size is incorrect.
*
* @note     None.
******************************************************************************/
This function processes the LC_Init message received from the
transmitter. The locality check attempts is incremented for
each LCInit message received. The random nonce Rn is recorded.
This function processes the LC_Init message received from the transmitter . The locality check attempts is incremented for each LCInit message received . The random nonce Rn is recorded .
static int XHdcp22Rx_ProcessMessageLCInit(XHdcp22_Rx *InstancePtr)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	XHdcp22_Rx_Message *MsgPtr = (XHdcp22_Rx_Message*)InstancePtr->MessageBuffer;
	XHdcp22Rx_LogWr(InstancePtr, XHDCP22_RX_LOG_EVT_INFO_MESSAGE, XHDCP22_RX_MSG_ID_LCINIT);
	if(InstancePtr->MessageSize != sizeof(XHdcp22_Rx_LCInit))
	{
		XHdcp22Rx_LogWr(InstancePtr, XHDCP22_RX_LOG_EVT_ERROR, XHDCP22_RX_ERROR_FLAG_MESSAGE_SIZE);
		return XST_FAILURE;
	}
	InstancePtr->Info.LCInitAttempts++;
	memcpy(InstancePtr->Params.Rn, MsgPtr->LCInit.Rn, XHDCP22_RX_RN_SIZE);
	return XST_SUCCESS;
}
static int XHdcp22Rx_ProcessMessageLCInit ( XHdcp22_Rx * InstancePtr ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; XHdcp22_Rx_Message * MsgPtr = ( XHdcp22_Rx_Message * ) InstancePtr -> MessageBuffer ; XHdcp22Rx_LogWr ( InstancePtr , XHDCP22_RX_LOG_EVT_INFO_MESSAGE , XHDCP22_RX_MSG_ID_LCINIT ) ; if ( InstancePtr -> MessageSize != sizeof ( XHdcp22_Rx_LCInit ) ) { XHdcp22Rx_LogWr ( InstancePtr , XHDCP22_RX_LOG_EVT_ERROR , XHDCP22_RX_ERROR_FLAG_MESSAGE_SIZE ) ; return XST_FAILURE ; } InstancePtr -> Info . LCInitAttempts ++ ; memcpy ( InstancePtr -> Params . Rn , MsgPtr -> LCInit . Rn , XHDCP22_RX_RN_SIZE ) ; return XST_SUCCESS ; }
This function processes the LC_Init message received from the
transmitter.
This function processes the LC_Init message received from the transmitter .
/* Verify arguments */ /* Log message read completion */ /* Check message size */ /* Update locality check attempts */ /* Record Rn parameter */