📄 en_encap.h
字号:
EXTFUNC void en_cd_EncapErrorReply( PKTBUF_P psPktBuf, UINT32 lValue,
void *data, INT32 nDataLen );
/*---------------------------------------------------------------------------
**
** en_cd_RegisterRequest()
**
** Creates and formats a PKTBUF containing a Register command
**
**---------------------------------------------------------------------------
**
** Inputs:
** none
**
** Outputs:
** none
**
** Return
** PKTBUF_P Pointer to Register psPktBuf
** or
** NULL
**
** Usage:
** en_cd_RegisterRequest();
**
**---------------------------------------------------------------------------
*/
EXTFUNC PKTBUF_P en_cd_RegisterRequest( ECE *psEce );
/*---------------------------------------------------------------------------
**
** en_cd_ListServicesReceived()
**
** This function is called when a List Services command is received
** on a ENCAP session.
**
** The meaning of the command is dependent on the context
** of the connection. Receiving the command on an INBOUND
** connection implies a request. Receiving the command
** on an OUTBOUND connection should never happen and is treated
** as a "silent" error.
**
**---------------------------------------------------------------------------
**
** Inputs:
** ECE *psEce Pointer to structure which describes connection
** PKTBUF_P psPktBuf Pointer to PKTBUF used for the error message
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_ListServicesReceived();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_ListServicesReceived( ECE * psEce, PKTBUF_P psPktBuf );
/*---------------------------------------------------------------------------
**
** en_cd_ListInterfacesReceived()
**
** This function is called when a List Interfaces command is received on
** a ENCAP session.
**
** The meaning of the command is dependent on the context of the
** connection. Receiving the command on an inbound connection
** implies a request for our objects. Receiving the command on an
** OUTBOUND connection implies a reply to our request for a list of
** interface objects (which we currently do not request).
**
**---------------------------------------------------------------------------
**
** Inputs:
** ECE *psEce Pointer to structure which describes connection
** PKTBUF_P psPktBuf Pointer to PKTBUF used for the error message
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_ListInterfacesReceived();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_ListInterfacesReceived( ECE * psEce, PKTBUF_P psPktBuf );
/*---------------------------------------------------------------------------
**
** en_cd_CreateMcastTable()
**
**
**---------------------------------------------------------------------------
**
** Inputs:
** none
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_CreateMcastTable();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_CreateMcastTable( struct in_addr *NET_ipaddr, struct in_addr *NET_subnet );
/*---------------------------------------------------------------------------
**
** en_cd_InitTargetData()
**
** This function finishes initializing target (server) data. It should
** be called when the IP addressing information has been set for the module.
**---------------------------------------------------------------------------
**
** Inputs:
** none
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_InitTargetData();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_InitTargetData( void );
/*---------------------------------------------------------------------------
**
** en_cd_ListTargetsReceived()
**
** This function is called when a List Targets command is received
** on a ENCAP session.
**
** The meaning of the command is dependent on the context
** of the connection. Receiving the command on an INBOUND
** connection implies a request. Receiving the command
** on an OUTBOUND connection should never happen and is treated
** as a "silent" error.
**
**---------------------------------------------------------------------------
**
** Inputs:
** ECE *psEce Pointer to structure which describes connection
** PKTBUF_P psPktBuf Pointer to PKTBUF used for the error message
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_ListTargetsReceived();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_ListTargetsReceived( ECE * psEce, PKTBUF_P psPktBuf );
/*---------------------------------------------------------------------------
**
** en_cd_ListIdentityReceived()
**
** This function is called when a List Identity command is received
** on a ENCAP session.
**
** The ListIdentity command is used to locate and identify potential targets.
**
**---------------------------------------------------------------------------
**
** Inputs:
** ECE *psEce Pointer to structure which describes connection
** PKTBUF_P psPktBuf Pointer to PKTBUF used for the error message
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_ListTargetsReceived();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_ListIdentityReceived( ECE * psEce, PKTBUF_P psPktBuf );
/*---------------------------------------------------------------------------
**
** en_cd_RegisterReceived()
**
** This function is called when a RegisterSession command is received
** on a ENCAP session.
**
** The meaning of the command is dependent on the context
** of the connection. Receiving the command on an INBOUND
** connection implies a RegisterSession request. Receiving
** the command on an OUTBOUND connection implies a RegisterSession
** reply.
**---------------------------------------------------------------------------
**
** Inputs:
** ECE *psEce Pointer to structure which describes connection
** PKTBUF_P psPktBuf Pointer to PKTBUF used for the error message
**
**
** Outputs:
** psEce->state set to ECE_STATE_ACTIVE for INBOUND connections
** psEce->sid set to the SESSION id for the session
**
** Return
** none
**
** Usage:
** en_cd_RegisterReceived();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_RegisterReceived( ECE * psEce, PKTBUF_P psPktBuf );
/*---------------------------------------------------------------------------
**
** en_cd_UnRegisterReceived()
**
** This function is called when a UnRegisterSession command is received
** on a ENCAP session.
**
**---------------------------------------------------------------------------
**
** Inputs:
** ECE *psEce Pointer to structure which describes connection
** PKTBUF_P psPktBuf Pointer to PKTBUF used for the error message
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_UnRegisterReceived();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_UnRegisterReceived( ECE * psEce, PKTBUF_P psPktBuf );
/*---------------------------------------------------------------------------
**
** en_cd_IndicateStatusReceived()
**
** This function is called when a IndicateStatus (communications interface)
** command is received on a ENCAP session.
**
** A no operation for now. Since the command does not require
** a response, simply return the buffer.
**---------------------------------------------------------------------------
**
** Inputs:
** ECE *psEce Pointer to structure which describes connection
** PKTBUF_P psPktBuf Pointer to PKTBUF used for the error message
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_IndicateStatusReceived();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_IndicateStatusReceived( ECE * psEce, PKTBUF_P psPktBuf );
/*---------------------------------------------------------------------------
**
** en_cd_EncapSessionInput()
**
** This function is the main entry point for CIP messages originating
** from an encap session.
**
**---------------------------------------------------------------------------
**
** Inputs:
** PKTBUF_P psPktBuf Pointer to PKTBUF containing the message
** ECE *psEce ENCAP connection endpoint structure
**
** Outputs:
** none
**
** Return
** INT32 ENCAP_E_SUCCESS (packet accepted and transfered)
** ENCAP_E_* (format or communications error)
**
** Usage:
** en_cd_EncapSessionInput();
**
**---------------------------------------------------------------------------
*/
EXTFUNC INT32 en_cd_EncapSessionInput( PKTBUF_P psPktBuf, ECE * psEce );
/*---------------------------------------------------------------------------
**
** en_cd_DataTransferReceived()
**
** This function is called when a data transfer command is
** received on an ENCAP session.
**
** The meaning of the command is dependent on the context
** of the connection. This function performs common pre-processing
** for the data transfer commands, specifically converting the
** parameters, address, and packet tags into the correct host
** byte order. The valid field in the encap portion of the PKTBUF
** is set as the components are parsed so that the message can
** be turned around later and used to send a reply if required.
**
**---------------------------------------------------------------------------
**
** Inputs:
** ECE *psEce Pointer to structure which describes connection
** PKTBUF_P psPktBuf Pointer to PKTBUF used for the error message
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_DataTransferReceived();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_DataTransferReceived( ECE * psEce, PKTBUF_P psPktBuf );
/*---------------------------------------------------------------------------
**
** en_cd_ProcessEncapMsg()
**
** This function processes a message received on an ENCAP
** connection.
**
** Fields in the ENCAP header have been converted into HOST
** endian format. The functions responsible for processing
** the specific commands are responsible for converting
** the command specific fields. Statistics are gathered at
** the individual command level, since they determine whether
** or not the command is a request or a reply.
**
**---------------------------------------------------------------------------
**
** Inputs:
** ECE *psEce Pointer to structure which describes connection
** PKTBUF_P psPktBuf Pointer to PKTBUF containing message.
**
** Outputs:
** none
**
** Return
** none
**
** Usage:
** en_cd_ProcessEncapMsg();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void en_cd_ProcessEncapMsg( ECE * psEce, PKTBUF_P psPktBuf );
/* NEW...9/6/00 */
/* Added prototype. */
/*...#include "cm.h" */
/*...EXTFUNC void en_cd_SaveSendToAddress( CM_ConnectionRecordType * psConnRecord ); */
/* END NEW... */
#endif /* #ifdef CD_EN_OBJECTS */
#endif /* inclusion lock */
/****************************************************************************
**
** End of EN_ENCAP.H
**
*****************************************************************************
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -