/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\

File: OCTVC1_CPP_API.h

$Octasic_Copyright: $

Description: Contains the definition of the CPP API.

$Octasic_Confidentiality: $

$Octasic_Release: $

$Revision: $

\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/

#ifndef __OCTVC1_CPP_API_H__
#define __OCTVC1_CPP_API_H__


/*****************************  INCLUDE FILES  *******************************/
#include "../../octdev_types.h"
#include "../octvc1_msg.h"
#include "../octvc1_handle.h"
#include "../octvc1_cursor.h"
#include "../octvc1_ip.h"
#include "../octvc1_udp.h"
#include "../octvc1_mac.h"
#include "../octvc1_eth.h"
#include "../octvc1_fifo.h"
#include "../octvocnet_pkt.h"

#include "octvc1_cpp_id.h"
#include "octvc1_cpp_rc.h"

/************************  COMMON DEFINITIONS  *******************************/

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM : 	RX UDP connection types.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM					tOCT_UINT32

#define cOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM_NONE				0x0		
#define cOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM_SRCIPUDP			0x1		
#define cOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM_SSRC				0x2		
#define cOCTVC1_CPP_UDP_SEARCH_TYPE_ENUM_SRCIPUDP_SSRC		0x3		

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TCP_SEARCH_TYPE_ENUM : 	RX TCP connection types.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_TCP_SEARCH_TYPE_ENUM					tOCT_UINT32

#define cOCTVC1_CPP_TCP_SEARCH_TYPE_ENUM_NONE				0x0		
#define cOCTVC1_CPP_TCP_SEARCH_TYPE_ENUM_SRCIPTCP			0x1		

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_TYPE_ENUM : 	Tx Header Types.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_TX_HDR_TYPE_ENUM						tOCT_UINT32

#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_ETHERNET				0x0		
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_ETH_PQ					0x1		
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_LLC					0x2		
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_NLPID					0x3		
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_SNAP					0x4		
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_IPV4					0x5		
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_UDP					0x6		
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_RTP					0x7		
#define cOCTVC1_CPP_TX_HDR_TYPE_ENUM_IPV6					0x8		

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_ETHERTYPE_ENUM : 	Ethernet Encoding Types.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_ETHERTYPE_ENUM							tOCT_UINT32

#define cOCTVC1_CPP_ETHERTYPE_ENUM_ETH_II					0x0		
#define cOCTVC1_CPP_ETHERTYPE_ENUM_IEEE_802_3				0x1		

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_DEST_REMOVE_MODE_ENUM : 	Remove destination modes.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_DEST_REMOVE_MODE_ENUM					tOCT_UINT32

#define cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_SPECIFIC				0x0		
#define cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_ALL					0x1		
#define cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_SPECIFIC_PORT			0x2		
#define cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_SPECIFIC_DEST_OBJ		0x3		

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_DEST_INFO_ENUM : 	Destination info modes.
-------------------------------------------------------------------------------------*/
#define tOCTVC1_CPP_DEST_INFO_ENUM							tOCT_UINT32

#define cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_FIRST				0x0		
#define cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT					0x1		

/*-------------------------------------------------------------------------------------
 	Maximum number of Destination Entry returned in a Destination Info
 	response.
-------------------------------------------------------------------------------------*/

#define cOCTVC1_CPP_MAX_DEST_ENTRY							4		

/*-------------------------------------------------------------------------------------
 	Maximum number of Ethernet Route Entries allocated in a ETH_ROUTE_INFO_RSP.
-------------------------------------------------------------------------------------*/

#define cOCTVC1_CPP_MAX_ETH_ROUTE_ENTRY						10		

/*-------------------------------------------------------------------------------------
 	CPP API configuration default values
-------------------------------------------------------------------------------------*/

#define cOCTVC1_CPP_DEFAULT_ADDITIONAL_OBJECT_DEST_POOL		0		
#define cOCTVC1_CPP_DEFAULT_MAX_FORWARD						256		
#define cOCTVC1_CPP_DEFAULT_IP_FRAGMENT_ID_MASK				0x0		
#define cOCTVC1_CPP_DEFAULT_IP_FRAGMENT_ID_MATCH			0x0		
#define cOCTVC1_CPP_DEFAULT_MAX_NON_ETHERNET_BANDWIDTH		0		
#define cOCTVC1_CPP_DEFAULT_MAX_NON_UDP_BANDWIDTH			0		
#define cOCTVC1_CPP_DEFAULT_MAX_RTP_CONNECTION				800		
#define cOCTVC1_CPP_DEFAULT_MAX_TCP_CONNECTION				8		
#define cOCTVC1_CPP_DEFAULT_MAX_UDP_CONNECTION				8		

/*-------------------------------------------------------------------------------------
 	CPP API Object Type.
-------------------------------------------------------------------------------------*/

#define cOCTVC1_CPP_OBJ_TYPE_FORWARD						(0x0001|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)	
#define cOCTVC1_CPP_OBJ_TYPE_RX_UDP_PORT					(0x0002|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)	
#define cOCTVC1_CPP_OBJ_TYPE_TX_UDP_CNCT					(0x0003|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)	
#define cOCTVC1_CPP_OBJ_TYPE_RX_IP_PORT						(0x0004|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)	
#define cOCTVC1_CPP_OBJ_TYPE_RX_TCP_PORT					(0x0005|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)	
#define cOCTVC1_CPP_OBJ_TYPE_INTERNAL_FORWARD				(0x0006|cOCTVC1_HANDLE_BASE_OBJ_TYPE_CPP)	

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_CONFIG_STATIC

 Members:
	ulMaxDestination
	ulMaxRxUdpPort
	ulMaxRxUdpCnct
	ulMaxTxUdpCnct
	ulMaxRxRtpPort
	ulMaxRxRtpCnct
	ulMaxTxRtpCnct
	ulMaxRxTcpPort
	ulMaxRxTcpCnct
	ulMaxRxIpPort
	ulMaxForwardObj
	ulIpFragmentIdMask
	ulIpFragmentIdMatch
	ulMaxNonEthernetBandwidth
	ulMaxNonUdpBandwidth
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCT_UINT32	ulMaxDestination;
	tOCT_UINT32	ulMaxRxUdpPort;
	tOCT_UINT32	ulMaxRxUdpCnct;
	tOCT_UINT32	ulMaxTxUdpCnct;
	tOCT_UINT32	ulMaxRxRtpPort;
	tOCT_UINT32	ulMaxRxRtpCnct;
	tOCT_UINT32	ulMaxTxRtpCnct;
	tOCT_UINT32	ulMaxRxTcpPort;
	tOCT_UINT32	ulMaxRxTcpCnct;
	tOCT_UINT32	ulMaxRxIpPort;
	tOCT_UINT32	ulMaxForwardObj;
	tOCT_UINT32	ulIpFragmentIdMask;
	tOCT_UINT32	ulIpFragmentIdMatch;
	tOCT_UINT32	ulMaxNonEthernetBandwidth;
	tOCT_UINT32	ulMaxNonUdpBandwidth;

} tOCTVC1_CPP_CONFIG_STATIC;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY

 Members:
	ulPacketEncodeType
 		Packet encoding type
	ulRtpPayloadType
 		RTP payload type
	ulPktPortIndex
 		Index of the associated packet port
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVOCNET_PKT_D_TYPE_ENUM	ulPacketEncodeType;
	tOCT_UINT32					ulRtpPayloadType;
	tOCT_UINT32					ulPktPortIndex;

} tOCTVC1_CPP_RX_RTP_PROFILE_ENTRY;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_RTP_PROFILE_ENTRY

 Members:
	ulPacketEncodeType
 		Packet encoding type
	ulRtpPayloadType
 		RTP payload type
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVOCNET_PKT_D_TYPE_ENUM	ulPacketEncodeType;
	tOCT_UINT32					ulRtpPayloadType;

} tOCTVC1_CPP_TX_RTP_PROFILE_ENTRY;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_DEST_ENTRY

 Members:
	hCppObj
 		CPP SVP Source Object handle
	ulCppObjPort
 		CPP SVP Source packet port to bind.
	hDestObj
 		Destination Object handle
	ulDestObjPort
 		Destination packet port to bind.
	ulDestObjFifoId
 		Destination object FIFO ID.
	DestMacAddress
 		Mac Address of the Vocallo port of the destination object
	BridgeMacAddress
 		Mac Address that must be used to create the Packet Bridging Header
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_HANDLE		hCppObj;
	tOCT_UINT32			ulCppObjPort;
	tOCTVC1_HANDLE		hDestObj;
	tOCT_UINT32			ulDestObjPort;
	tOCT_UINT32			ulDestObjFifoId;
	tOCTVC1_MAC_ADDRESS	DestMacAddress;
	tOCTVC1_MAC_ADDRESS	BridgeMacAddress;

} tOCTVC1_CPP_DEST_ENTRY;

/*-------------------------------------------------------------------------------------
 	Header structures
-------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_COMMON

 Members:
	ulHeaderType
	ulHeaderLength
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_TYPE_ENUM	ulHeaderType;
	tOCT_UINT32						ulHeaderLength;

} tOCTVC1_CPP_TX_HDR_COMMON;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_ETHERNET

 Members:
	CommonHeader
	ulEthertypeEncoding
	ulEthertype
	SourceMacAddr
	DestinationMacAddr
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_COMMON	CommonHeader;
	tOCTVC1_CPP_ETHERTYPE_ENUM	ulEthertypeEncoding;
	tOCT_UINT32					ulEthertype;
	tOCTVC1_MAC_ADDRESS			SourceMacAddr;
	tOCTVC1_MAC_ADDRESS			DestinationMacAddr;

} tOCTVC1_CPP_TX_HDR_ETHERNET;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_ETH_PQ

 Members:
	CommonHeader
	ulEthertypeEncoding
	ulEthertype
	ulTci
	SourceMacAddr
	DestinationMacAddr
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_COMMON	CommonHeader;
	tOCTVC1_CPP_ETHERTYPE_ENUM	ulEthertypeEncoding;
	tOCT_UINT32					ulEthertype;
	tOCT_UINT32					ulTci;
	tOCTVC1_MAC_ADDRESS			SourceMacAddr;
	tOCTVC1_MAC_ADDRESS			DestinationMacAddr;

} tOCTVC1_CPP_TX_HDR_ETH_PQ;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_LLC

 Members:
	CommonHeader
	ulLlcValue
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_COMMON	CommonHeader;
	tOCT_UINT32					ulLlcValue;

} tOCTVC1_CPP_TX_HDR_LLC;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_NLPID

 Members:
	CommonHeader
	ulNlpidValue
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_COMMON	CommonHeader;
	tOCT_UINT32					ulNlpidValue;

} tOCTVC1_CPP_TX_HDR_NLPID;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_SNAP

 Members:
	CommonHeader
	ulOuiValue
	ulPidValue
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_COMMON	CommonHeader;
	tOCT_UINT32					ulOuiValue;
	tOCT_UINT32					ulPidValue;

} tOCTVC1_CPP_TX_HDR_SNAP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_IPV4

 Members:
	CommonHeader
	ulTypeOfService
	ulTimeToLive
	ulProtocol
	ulFlags
	ulSourceAddr
	ulDestinationAddr
	ulUdpChecksumAddr
	ulOptionsLength
	aulOptions
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_COMMON	CommonHeader;
	tOCT_UINT32					ulTypeOfService;
	tOCT_UINT32					ulTimeToLive;
	tOCT_UINT32					ulProtocol;
	tOCT_UINT32					ulFlags;
	tOCT_UINT32					ulSourceAddr;
	tOCT_UINT32					ulDestinationAddr;
	tOCT_UINT32					ulUdpChecksumAddr;
	tOCT_UINT32					ulOptionsLength;
	tOCT_UINT32					aulOptions[1];/* NOSWAPMAC */

} tOCTVC1_CPP_TX_HDR_IPV4;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_IPV6

 Members:
	CommonHeader
	ulTrafficClass
	ulFlowLabel
	ulHopLimit
	aulSourceAddr
	aulDestinationAddr
	aulUdpChecksumAddr
	ulNextHeader
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_COMMON	CommonHeader;
	tOCT_UINT32					ulTrafficClass;
	tOCT_UINT32					ulFlowLabel;
	tOCT_UINT32					ulHopLimit;
	tOCT_UINT32					aulSourceAddr[4];
	tOCT_UINT32					aulDestinationAddr[4];
	tOCT_UINT32					aulUdpChecksumAddr[4];
	tOCT_UINT32					ulNextHeader;

} tOCTVC1_CPP_TX_HDR_IPV6;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_UDP

 Members:
	CommonHeader
	ulSourcePort
	ulDestinationPort
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_COMMON	CommonHeader;
	tOCT_UINT32					ulSourcePort;
	tOCT_UINT32					ulDestinationPort;

} tOCTVC1_CPP_TX_HDR_UDP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_TX_HDR_RTP

 Members:
	CommonHeader
	ulNumContributingSources
	ulSynchronizationSource
	ulExtensionFlag
	ulExtensionType
	ulExtensionLength
	aulCsrcs
	aulExtensions
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_CPP_TX_HDR_COMMON	CommonHeader;
	tOCT_UINT32					ulNumContributingSources;
	tOCT_UINT32					ulSynchronizationSource;
	tOCT_BOOL32					ulExtensionFlag;
	tOCT_UINT32					ulExtensionType;
	tOCT_UINT32					ulExtensionLength;
	tOCT_UINT32					aulCsrcs[15];
	tOCT_UINT32					aulExtensions[1];/* NOSWAPMAC */

} tOCTVC1_CPP_TX_HDR_RTP;

/*****************************  METHODS  *************************************/
/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD

 Members:
	Header
 		OCTVC1 Message Header
	ulResetStatsFlag
 		Reset the statistics
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;
	tOCT_BOOL32			ulResetStatsFlag;

} tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP

 Members:
	Header
 		OCTVC1 Message Header
	ulControlRxPktCnt
	ulDataRxPktCnt
	ulControlBadHdrLenCnt
	ulDataBadHdrLenCnt
	ulInvalidPktFormatCnt
	ulNoFwdPktCnt
	ulCppCmdOverflowCnt
	ulTxPktQueueOverflowFlag
	ulTxPktQueueOverflowFifoPoolId
	ulTxPktQueueOverflowFifoIndex
	ulRxFifoResynchFlag
	ulRxFifoResynchFifoPoolId
	ulRxFifoResynchFifoIndex
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;
	tOCT_UINT32			ulControlRxPktCnt;
	tOCT_UINT32			ulDataRxPktCnt;
	tOCT_UINT32			ulControlBadHdrLenCnt;
	tOCT_UINT32			ulDataBadHdrLenCnt;
	tOCT_UINT32			ulInvalidPktFormatCnt;
	tOCT_UINT32			ulNoFwdPktCnt;
	tOCT_UINT32			ulCppCmdOverflowCnt;
	tOCT_BOOL32			ulTxPktQueueOverflowFlag;
	tOCT_UINT32			ulTxPktQueueOverflowFifoPoolId;
	tOCT_UINT32			ulTxPktQueueOverflowFifoIndex;
	tOCT_BOOL32			ulRxFifoResynchFlag;
	tOCT_UINT32			ulRxFifoResynchFifoPoolId;
	tOCT_UINT32			ulRxFifoResynchFifoIndex;

} tOCTVC1_CPP_MSG_MODULE_STATS_GLOBAL_RSP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD

 Members:
	Header
 		OCTVC1 Message Header
	ulEthPort
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER			Header;
	tOCTVC1_ETH_PORT_ID_ENUM	ulEthPort;

} tOCTVC1_CPP_MSG_MODULE_STATS_ETH_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP

 Members:
	Header
 		OCTVC1 Message Header
	ulEthPort
	ulEthRxPktCnt
	ulEthTxPktCnt
	ulEthRxByteCnt
	ulEthTxByteCnt
	ulEthBadHdrCnt
	ulEthBadHdrLenCnt
	ulEth8023BadLlcOuiCnt
	ulRxFifoReSyncCnt
	ulTxPktQueueOverflowCnt
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER			Header;
	tOCTVC1_ETH_PORT_ID_ENUM	ulEthPort;
	tOCT_UINT32					ulEthRxPktCnt;
	tOCT_UINT32					ulEthTxPktCnt;
	tOCT_UINT32					ulEthRxByteCnt;
	tOCT_UINT32					ulEthTxByteCnt;
	tOCT_UINT32					ulEthBadHdrCnt;
	tOCT_UINT32					ulEthBadHdrLenCnt;
	tOCT_UINT32					ulEth8023BadLlcOuiCnt;
	tOCT_UINT32					ulRxFifoReSyncCnt;
	tOCT_UINT32					ulTxPktQueueOverflowCnt;

} tOCTVC1_CPP_MSG_MODULE_STATS_ETH_RSP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD

 Members:
	Header
 		OCTVC1 Message Header
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;

} tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP

 Members:
	Header
 		OCTVC1 Message Header
	Static
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER			Header;
	tOCTVC1_CPP_CONFIG_STATIC	Static;

} tOCTVC1_CPP_MSG_MODULE_GET_CONFIG_RSP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD

 Members:
	Header
 		OCTVC1 Message Header
	hDestObj
 		Destination Object handle
	ulDestObjPort
 		Destination packet port to bind.
	ulDestObjFifoId
		Default:	cOCTVC1_FIFO_ID_INVALID
 		Destination object FIFO ID.
	DestMacAddress
 		Mac Address of the Vocallo port of the destination object
	SrcMacAddress
 		Mac Address of the Vocallo port of the source object, only effective if
 		the destination Mac Address is not equal to 0
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;
	tOCTVC1_HANDLE		hDestObj;
	tOCT_UINT32			ulDestObjPort;
	tOCT_UINT32			ulDestObjFifoId;
	tOCTVC1_MAC_ADDRESS	DestMacAddress;
	tOCTVC1_MAC_ADDRESS	SrcMacAddress;

} tOCTVC1_CPP_MSG_FORWARD_OPEN_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_FORWARD_OPEN_RSP

 Members:
	Header
 		OCTVC1 Message Header
	hForward
 		Forward Object Handle
	ulFifoId
 		Fifo ID used to reach the Forward object.
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;
	tOCTVC1_HANDLE		hForward;
	tOCT_UINT32			ulFifoId;

} tOCTVC1_CPP_MSG_FORWARD_OPEN_RSP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD

 Members:
	Header
 		OCTVC1 Message Header
	hForward
 		Forward Object Handle
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;
	tOCTVC1_HANDLE		hForward;

} tOCTVC1_CPP_MSG_FORWARD_CLOSE_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP

 Members:
	Header
 		OCTVC1 Message Header
	hForward
 		Forward Object Handle
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;
	tOCTVC1_HANDLE		hForward;

} tOCTVC1_CPP_MSG_FORWARD_CLOSE_RSP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_FORWARD_STATS_CMD

 Members:
	Header
 		OCTVC1 Message Header
	ObjectGet
 		Generic object get structure.
	ulResetStatsFlag
 		Reset the statistics
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER			Header;
	tOCTVC1_CURSOR_HANDLE_GET	ObjectGet;
	tOCT_BOOL32					ulResetStatsFlag;

} tOCTVC1_CPP_MSG_FORWARD_STATS_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_FORWARD_STATS_RSP

 Members:
	Header
 		OCTVC1 Message Header
	ObjectGet
 		Generic object get structure.
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER			Header;
	tOCTVC1_CURSOR_HANDLE_GET	ObjectGet;

} tOCTVC1_CPP_MSG_FORWARD_STATS_RSP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_FORWARD_INFO_CMD

 Members:
	Header
 		OCTVC1 Message Header
	ObjectGet
 		Generic object get structure.
	ulGetType
		Default:	cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_FIRST
	hDestObj
 		Destination Object handle of the entry to search from. Must be specified only
 		when ulGetType is set to cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT.
	ulDestObjPort
 		Destination packet port of the entry to search from. Must be specified only
 		when ulGetType is set to cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT.
	ulDestObjFifoId
		Default:	cOCTVC1_FIFO_ID_INVALID
 		Destination object FIFO ID of the entry to search from. Must be specified only
 		when ulGetType is set to cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT.
	DestMacAddress
 		Mac Address of the Vocallo port of the entry's destination object to search
 		from. Must be specified only when ulGetType is set to
 		cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT.
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER			Header;
	tOCTVC1_CURSOR_HANDLE_GET	ObjectGet;
	tOCTVC1_CPP_DEST_INFO_ENUM	ulGetType;
	tOCTVC1_HANDLE				hDestObj;
	tOCT_UINT32					ulDestObjPort;
	tOCT_UINT32					ulDestObjFifoId;
	tOCTVC1_MAC_ADDRESS			DestMacAddress;

} tOCTVC1_CPP_MSG_FORWARD_INFO_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_FORWARD_INFO_RSP

 Members:
	Header
 		OCTVC1 Message Header
	ObjectGet
 		Generic object get structure.
	ulFifoId
 		FifoId ID used to send packet to this object.
	ulMoreFlag
 		If TRUE, there are more destination entries matching the queried info. To
 		retrieve them, the command can be used with ulGetType parameter set to
 		cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_NEXT and with valid destination information.
	ulNumDestEntry
 		Number of valid destination entries stored in the array aDestEntry.
	aDestEntry
 		Array of destination entries.
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER			Header;
	tOCTVC1_CURSOR_HANDLE_GET	ObjectGet;
	tOCT_UINT32					ulFifoId;
	tOCT_BOOL32					ulMoreFlag;
	tOCT_UINT32					ulNumDestEntry;
	tOCTVC1_CPP_DEST_ENTRY		aDestEntry[cOCTVC1_CPP_MAX_DEST_ENTRY];

} tOCTVC1_CPP_MSG_FORWARD_INFO_RSP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD

 Members:
	Header
 		OCTVC1 Message Header
	hCppObj
 		CPP SVP Source Object handle
	ulCppObjPort
 		CPP SVP Source packet port to bind.
	hDestObj
 		Destination Object handle
	ulDestObjPort
 		Destination packet port to bind.
	ulDestObjFifoId
		Default:	cOCTVC1_FIFO_ID_INVALID
 		Destination object FIFO ID.
	DestMacAddress
 		Mac Address of the Vocallo port of the destination object
	SrcMacAddress
 		Mac Address of the Vocallo port of the source object, only effective if
 		the destination Mac Address is not equal to 0
	BridgeMacAddress
 		Mac Address that must be used to create the Packet Bridging Header
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;
	tOCTVC1_HANDLE		hCppObj;
	tOCT_UINT32			ulCppObjPort;
	tOCTVC1_HANDLE		hDestObj;
	tOCT_UINT32			ulDestObjPort;
	tOCT_UINT32			ulDestObjFifoId;
	tOCTVC1_MAC_ADDRESS	DestMacAddress;
	tOCTVC1_MAC_ADDRESS	SrcMacAddress;
	tOCTVC1_MAC_ADDRESS	BridgeMacAddress;

} tOCTVC1_CPP_MSG_MODULE_ADD_DEST_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP

 Members:
	Header
 		OCTVC1 Message Header
	hCppObj
 		CPP SVP Source Object handle
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;
	tOCTVC1_HANDLE		hCppObj;

} tOCTVC1_CPP_MSG_MODULE_ADD_DEST_RSP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD

 Members:
	Header
 		OCTVC1 Message Header
	ulRemoveMode
		Default:	cOCTVC1_CPP_DEST_REMOVE_MODE_ENUM_SPECIFIC
 		Remove method that is requested.
	hCppObj
 		CPP SVP Source Object handle
	ulCppObjPort
 		CPP SVP Source packet port to bind.
	hDestObj
 		Destination Object handle
	ulDestObjPort
 		Destination packet port to bind.
	ulDestObjFifoId
		Default:	cOCTVC1_FIFO_ID_INVALID
 		Destination object FIFO ID.
	DestMacAddress
 		Mac Address of the Vocallo port of the destination object
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER					Header;
	tOCTVC1_CPP_DEST_REMOVE_MODE_ENUM	ulRemoveMode;
	tOCTVC1_HANDLE						hCppObj;
	tOCT_UINT32							ulCppObjPort;
	tOCTVC1_HANDLE						hDestObj;
	tOCT_UINT32							ulDestObjPort;
	tOCT_UINT32							ulDestObjFifoId;
	tOCTVC1_MAC_ADDRESS					DestMacAddress;

} tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP

 Members:
	Header
 		OCTVC1 Message Header
	ulNumDestRemoved
 		Number of destination removed.
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER	Header;
	tOCT_UINT32			ulNumDestRemoved;

} tOCTVC1_CPP_MSG_MODULE_REMOVE_DEST_RSP;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD

 Members:
	Header
 		OCTVC1 Message Header
	ulGetType
		Default:	cOCTVC1_CPP_DEST_INFO_ENUM_OBJ_FIRST
	hCppObj
 		CPP SVP Source Object handle
	ulCppObjPort
 		CPP SVP Source packet port to bind.
	hDestObj
 		Destination Object handle
	ulDestObjPort
 		Destination packet port to bind.
	ulDestObjFifoId
		Default:	cOCTVC1_FIFO_ID_INVALID
 		Destination object FIFO ID.
	DestMacAddress
 		Mac Address of the Vocallo port of the destination object
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER			Header;
	tOCTVC1_CPP_DEST_INFO_ENUM	ulGetType;
	tOCTVC1_HANDLE				hCppObj;
	tOCT_UINT32					ulCppObjPort;
	tOCTVC1_HANDLE				hDestObj;
	tOCT_UINT32					ulDestObjPort;
	tOCT_UINT32					ulDestObjFifoId;
	tOCTVC1_MAC_ADDRESS			DestMacAddress;

} tOCTVC1_CPP_MSG_MODULE_INFO_DEST_CMD;

/*-------------------------------------------------------------------------------------
	tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP

 Members:
	Header
 		OCTVC1 Message Header
	ulMoreFlag
 		If TRUE, there are more binding matching the queried info
	ulNumDestEntry
 		Number of valid bindings stored in the binding array aBindings.
	aDestEntry
 		Array of destination bind entries.
-------------------------------------------------------------------------------------*/
typedef struct
{
	tOCTVC1_MSG_HEADER		Header;
	tOCT_BOOL32				ulMoreFlag;
	tOCT_UINT32				ulNumDestEntry;
	tOCTVC1_CPP_DEST_ENTRY	aDestEntry[cOCTVC1_CPP_MAX_DEST_ENTRY];

} tOCTVC1_CPP_MSG_MODULE_INFO_DEST_RSP;


/***************  INCLUDE FILES WITH DEPENDENCIES ON THIS FILE  **************/

#ifdef cDO_PRAGMA_PACK_POP
#pragma pack( pop )
#endif /* cDO_PRAGMA_PACK_POP */
#undef cDO_PRAGMA_PACK_POP

#endif /* __OCTVC1_CPP_API_H__ */

