81 #ifndef _CL_IOC_API_H_
82 # define _CL_IOC_API_H_
107 # define CL_IOC_HEADER_VERSION 1
109 # define CL_IOC_NOTIFICATION_VERSION 1
115 # define CL_IOC_TIMEOUT_FOREVER ~0U
116 # define CL_IOC_RECEIVE_TIMEOUT 1500
123 # define CL_IOC_UNRELIABLE_MESSAGING 0
129 # define CL_IOC_RELIABLE_MESSAGING (1<<0)
142 # define CL_IOC_NODE_UP 1
147 # define CL_IOC_NODE_DOWN 0
155 # define CL_IOC_LINK_UP 2
160 # define CL_IOC_LINK_DOWN 3
168 # define CL_IOC_BROADCAST_ADDRESS 0xffffffff
173 # define CL_IOC_RESERVED_ADDRESS 0
178 # define CL_IOC_GEO_ADDR_MAX_LENGTH 128
186 # define CL_IOC_PHYSICAL_ADDRESS_TYPE 0
191 # define CL_IOC_LOGICAL_ADDRESS_TYPE 1
196 # define CL_IOC_MULTICAST_ADDRESS_TYPE 2
201 # define CL_IOC_MASTER_ADDRESS_TYPE 3
206 # define CL_IOC_INTRANODE_ADDRESS_TYPE 4
209 # define CL_IOC_USER_ADDRESS_TYPE 10
214 # define CL_IOC_BROADCAST_ADDRESS_TYPE 0xff
244 CL_IOC_ORDERED_PRIORITY = 3,
249 CL_IOC_NOTIFICATION_PRIORITY = 4,
256 CL_IOC_RESERVED_PRIORITY_USER = 6,
258 CL_IOC_RESERVED_PRIORITY_USER_END = 16,
285 #define CL_IOC_ADDRESS_TYPE_BITS (0x8)
286 #define CL_IOC_ADDRESS_TYPE_MASK ((1<<CL_IOC_ADDRESS_TYPE_BITS)-1)
287 #define CL_IOC_NODE_MASK (~0U >> CL_IOC_ADDRESS_TYPE_BITS)
288 #define CL_IOC_ADDRESS_TYPE_SHIFT_WORD (32-CL_IOC_ADDRESS_TYPE_BITS)
289 #define CL_IOC_ADDRESS_TYPE_SHIFT_DWORD (64-CL_IOC_ADDRESS_TYPE_BITS)
294 # define CL_IOC_ADDRESS_TYPE_GET(param)\
295 ((ClUint32T)((*((ClUint64T*)(param))) >> CL_IOC_ADDRESS_TYPE_SHIFT_DWORD))
297 #define CL_IOC_ADDRESS_FORM(addrType,addr,compId) \
299 ( (((ClUint64T)(addrType)) & CL_IOC_ADDRESS_TYPE_MASK) << CL_IOC_ADDRESS_TYPE_SHIFT_DWORD ) | \
300 ( ( ((ClUint64T)(addr)) & CL_IOC_NODE_MASK) << 32 ) | \
301 ( ((ClUint64T)(compId)) & 0xffffffff ) \
304 #define CL_IOC_TIPC_ADDRESS_TYPE_FORM(t,v) (((t) << CL_IOC_ADDRESS_TYPE_SHIFT_WORD) | ( (v) & CL_IOC_NODE_MASK ) )
306 #define CL_IOC_TIPC_TYPE_FORM(v) \
307 CL_IOC_TIPC_ADDRESS_TYPE_FORM(CL_IOC_USER_ADDRESS_TYPE,v)
312 # define CL_IOC_LOGICAL_ADDRESS_FORM(compId)\
313 CL_IOC_ADDRESS_FORM(CL_IOC_LOGICAL_ADDRESS_TYPE, 0 , compId)
318 # define CL_IOC_MULTICAST_ADDRESS_FORM(addr, compId) \
319 CL_IOC_ADDRESS_FORM(CL_IOC_MULTICAST_ADDRESS_TYPE, addr, compId)
326 # define CL_IOC_TL_ACTIVE 0
332 # define CL_IOC_TL_STDBY 1
531 typedef enum ClIocQueueId
538 typedef struct ClIocQueueInfo
541 ClWaterMarkT queueWM;
544 typedef struct ClIocQueueStats
546 ClIocQueueInfoT queueInfo;
547 ClUint32T queueUtilisation;
550 typedef struct ClIocLibConfig
567 ClUint32T iocMaxNumOfPriorities;
571 ClUint32T iocReassemblyTimeOut;
575 ClUint32T iocMaxNumOfXports;
579 ClUint32T iocHeartbeatTimeInterval;
583 ClUint32T iocTLMaxEntries;
586 ClIocQueueInfoT iocSendQInfo;
589 ClIocQueueInfoT iocRecvQInfo;
595 ClBoolT isNodeRepresentative;
642 #define CL_IOC_TL_NO_REPLICATION 0
643 #define repliSemantics unused
684 typedef struct ClIocMcastUserInfo
688 } ClIocMcastUserInfoT;
999 CL_IN ClUint8T protoType,
1068 ClRcT clIocReceiveAsync(
1075 ClRcT clIocReceiveWithBuffer(
1078 CL_IN ClUint8T *buffer,
1079 CL_IN ClUint32T bufSize,
1084 ClRcT clIocReceiveWithBufferAsync(
1087 CL_IN ClUint8T *buffer,
1088 CL_IN ClUint32T bufSize,
1210 CL_IN ClUint32T compId
1391 ClRcT clIocTransparencyDeregisterNode(
1397 ClRcT clIocTransparencyLogicalToPhysicalAddrGet(
1400 CL_OUT ClUint32T * pNoEntries
Typical defines found in any software project.
Header file of Buffer Management related APIs.
Header file of Ioc Error Codes.
Header file of Ioc Protocols.
Header file of Reserved Communication Ports.
ClPtrT ClBufferHandleT
The type of the handle for the buffer messages.
Definition: clBufferApi.h:82
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_INOUT
CL_INOUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:108
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
struct ClIocRecvParam ClIocRecvParamT
The IOC receive returns this structure along with the message.
ClWordT ClIocCommPortHandleT
The Communication port handle.
Definition: clIocApi.h:353
ClRcT clIocMulticastRegister(CL_IN ClIocMcastUserInfoT *pMcastInfo)
Registers an application against a multicast address with IOC Multicast Layer.
struct ClIocTlInfo ClIocTLInfoT
Transparency layer parameters.
ClUint64T ClIocMulticastAddressT
IOC Multicast address.
Definition: clIocApi.h:376
struct ClIocSendOption ClIocSendOptionT
Send related options.
ClRcT clIocReceive(CL_IN ClIocCommPortHandleT commPortHdl, CL_IN ClIocRecvOptionT *pRecvOption, CL_OUT ClBufferHandleT userMsg, CL_OUT ClIocRecvParamT *pRecvParam)
Receives message on communication port.
ClIocNotificationActionT
This defines all notification related actions that can be performed on a port.
Definition: clIocApi.h:271
ClUint64T ClIocLogicalAddressT
IOC Logical address.
Definition: clIocApi.h:371
ClRcT clIocCommPortReceiverUnblock(CL_IN ClIocCommPortHandleT commPortHdl)
Unblocks all receive calls.
union ClIocAddress ClIocAddressT
IOC address.
ClRcT clIocCommPortDelete(CL_IN ClIocCommPortHandleT iocCommPortHdl)
Deletes the communication port.
ClIocNodeAddressT clIocLocalAddressGet(void)
Returns the local IOC node addrress.
ClRcT clIocCommPortGet(CL_IN ClIocCommPortHandleT pIocCommPort, CL_OUT ClIocPortT *pPortId)
Returns the port Id.
ClUint32T ClIocCommPortFlagsT
Port Type.
Definition: clIocApi.h:366
ClUint32T ClIocPortT
The IOC communication port.
Definition: clIocApi.h:348
#define CL_IOC_GEO_ADDR_MAX_LENGTH
The maximum size of the geographical address.
Definition: clIocApi.h:178
enum ClIocTLContext ClIocTLContextT
Transparency layer context.
ClIocTLContext
Transparency layer context.
Definition: clIocApi.h:608
ClIocMessageOption
The send message option.
Definition: clIocApi.h:435
ClRcT clIocSend(CL_IN ClIocCommPortHandleT commPortHandle, CL_IN ClBufferHandleT message, CL_IN ClUint8T protoType, CL_IN ClIocAddressT *pDestAddr, CL_IN ClIocSendOptionT *pSendOption)
Sends message on a communication port.
struct ClIocRecvOption ClIocRecvOptionT
IOC receive options.
ClIocPriorityT
This defines all the priorities that can be used with IOC.
Definition: clIocApi.h:224
ClRcT clIocTransparencyDeregister(CL_IN ClUint32T compId)
De-registers the application with Transparency Layer.
ClRcT clIocCommPortFdGet(CL_IN ClIocCommPortHandleT portHandle, CL_INOUT ClInt32T *pSd)
Gets the socket descriptor used by communication of a CommPort.
ClRcT clIocCommPortCreate(CL_IN ClIocPortT portId, CL_IN ClIocCommPortFlagsT portType, CL_OUT ClIocCommPortHandleT *pIocCommPortHdl)
Creates a communication port.
ClRcT clIocVersionCheck(CL_IN ClVersionT *pVersion)
Checks for appropriate version of application.
ClRcT clIocMulticastDeregister(CL_IN ClIocMcastUserInfoT *pMcastInfo)
De-registers the application against a multicast address with the IOC Multicast Layer.
ClRcT clIocTransparencyRegister(CL_IN ClIocTLInfoT *pTLInfo)
Registers an application's logical address with Transparency Layer.
struct ClIocPhysicalAddress ClIocPhysicalAddressT
The IOC Physical address of an application's communication end point.
ClHandleT ClIocToBindHandleT
The Transport handle.
Definition: clIocApi.h:358
enum ClIocMessageOption ClIocMessageOptionT
The send message option.
ClUint32T ClIocNodeAddressT
The IOC node address.
Definition: clIocApi.h:343
ClRcT clIocPortNotification(CL_IN ClIocPortT port, CL_IN ClIocNotificationActionT action)
Enables/Disables the notifications form IOC on the port.
ClRcT clIocMulticastDeregisterAll(CL_IN ClIocMulticastAddressT *pMcastAddress)
De-registers the application against a multicast address with the IOC Multicast Layer.
@ CL_IOC_NOTIFICATION_DISABLE
Disables component/node arrival/departure notifications.
Definition: clIocApi.h:275
@ CL_IOC_NOTIFICATION_ENABLE
Enable scomponent/node arrival/departure notifications.
Definition: clIocApi.h:280
@ CL_IOC_TL_LOCAL_SCOPE
The context for local scope entries.
Definition: clIocApi.h:618
@ CL_IOC_TL_GLOBAL_SCOPE
The context for Global scope entries.
Definition: clIocApi.h:613
@ CL_IOC_NON_PERSISTENT_MSG
The message is non persistent in nature and is consumed by IOC on send.
Definition: clIocApi.h:446
@ CL_IOC_PERSISTENT_MSG
The message is persistent in nature and is not consumed by IOC on send.
Definition: clIocApi.h:440
@ CL_IOC_DEFAULT_PRIORITY
This is the default priority.
Definition: clIocApi.h:228
@ CL_IOC_HIGH_PRIORITY
This is the higest priority with which a packet can be sent.
Definition: clIocApi.h:233
@ CL_IOC_LOW_PRIORITY
This is the lowest priority.
Definition: clIocApi.h:238
@ CL_IOC_RESERVED_PRIORITY
This is reserved by IOC for future use.
Definition: clIocApi.h:254
@ CL_IOC_MAX_PRIORITIES
This limits the use of the number of priorities that can be used with IOC.
Definition: clIocApi.h:263
Version Information for various services.
Definition: clCommon.h:250
The IOC Physical address of an application's communication end point.
Definition: clIocApi.h:383
ClIocPortT portId
The IOC communication end point identification on a node.
Definition: clIocApi.h:393
ClIocNodeAddressT nodeAddress
The IOC Node address.
Definition: clIocApi.h:388
IOC address.
Definition: clIocApi.h:401
ClIocPhysicalAddressT iocPhyAddress
Physical address.
Definition: clIocApi.h:406
ClIocMulticastAddressT iocMulticastAddress
Multicast address.
Definition: clIocApi.h:416
ClIocLogicalAddressT iocLogicalAddress
Logical address.
Definition: clIocApi.h:411
Send related options.
Definition: clIocApi.h:457
ClUint8T sendType
The send type, it can be session based or not.
Definition: clIocApi.h:467
ClUint32T timeout
The timeout interval in milliseconds.
Definition: clIocApi.h:481
ClWordT linkHandle
The Handle for uniquely identifying Transport and Link.
Definition: clIocApi.h:471
ClUint8T priority
Message priority.
Definition: clIocApi.h:462
ClIocMessageOptionT msgOption
The message type, it can be persistent or non persistent message.
Definition: clIocApi.h:476
The IOC receive returns this structure along with the message.
Definition: clIocApi.h:491
ClUint32T length
Length of the message received.
Definition: clIocApi.h:505
ClUint8T protoType
Protocol used.
Definition: clIocApi.h:500
ClUint8T priority
Priority of the message received.
Definition: clIocApi.h:495
ClIocAddressT srcAddr
Sender address.
Definition: clIocApi.h:510
IOC receive options.
Definition: clIocApi.h:523
ClUint32T recvTimeout
Timeout value for blocking call.
Definition: clIocApi.h:528
Data-type for holding the physical address and its state.
Definition: clIocApi.h:628
ClIocPhysicalAddressT physicalAddr
Physical address of the component.
Definition: clIocApi.h:637
ClUint32T haState
State of the component corresponding to the physicalAddr.
Definition: clIocApi.h:632
Transparency layer parameters.
Definition: clIocApi.h:649
ClUint32T haState
Active or Standby mode.
Definition: clIocApi.h:674
ClUint32T compId
Id of the component providing the service.
Definition: clIocApi.h:659
ClUint32T unused
Replication Semantics.
Definition: clIocApi.h:669
ClIocLogicalAddressT logicalAddr
Logical address of the service.
Definition: clIocApi.h:654
ClIocPhysicalAddressT physicalAddr
Physical address of the component.
Definition: clIocApi.h:679
ClIocTLContextT contextType
Context, it can be either GLOBAL or LOCAL.
Definition: clIocApi.h:664