1 #ifndef _CL_TRANSPORT_H_
2 #define _CL_TRANSPORT_H_
14 #define CL_TRANSPORT_BASE_PORT (18000)
15 #define CL_TRANSPORT_CONFIG_FILE "clTransport.xml"
20 #define CL_MCAST_MAX_NODES 16
22 typedef ClRcT (*ClTransportNotifyCallbackT)
25 typedef ClPtrT ClTransportListenerHandleT;
27 extern ClInt32T gClTransportId;
29 typedef struct ClIocAddrMap
35 struct sockaddr_in sin_addr;
36 struct sockaddr_in6 sin6_addr;
47 static __inline__ ClInt32T clTransportIdGet(
void)
49 return ++gClTransportId;
52 extern ClRcT clTransportLayerInitialize(
void);
53 extern ClRcT clTransportLayerFinalize(
void);
54 extern ClRcT clTransportLayerGmsFinalize(
void);
55 extern ClRcT clTransportInitialize(
const ClCharT *type, ClBoolT nodeRep);
56 extern ClRcT clTransportFinalize(
const ClCharT *type, ClBoolT nodeRep);
58 extern ClRcT clTransportNotifyInitialize(
void);
59 extern ClRcT clTransportNotifyFinalize(
void);
60 extern ClRcT clTransportAddressAssign(
const ClCharT *type);
61 extern ClRcT clTransportNotificationInitialize(
const ClCharT *type);
62 extern ClRcT clTransportNotificationFinalize(
const ClCharT *type);
65 extern ClRcT clTransportBindClose(
const ClCharT *type,
ClIocPortT port);
66 extern ClRcT clTransportMaxPayloadSizeGet(
const ClCharT *type, ClUint32T *pSize);
68 extern ClRcT clTransportListenStop(
const ClCharT *type,
ClIocPortT port);
78 extern ClRcT clTransportNotifyRegister(ClTransportNotifyCallbackT callback, ClPtrT arg);
79 extern ClRcT clTransportNotifyDeregister(ClTransportNotifyCallbackT callback);
88 struct iovec *iov, ClInt32T iovlen, ClInt32T flags);
91 struct iovec *iov, ClInt32T iovlen, ClInt32T flags, ClBoolT proxy);
94 clTransportRecv(
const ClCharT *type,
ClIocCommPortHandleT commPort, ClIocDispatchOptionT *pRecvOption,
95 ClUint8T *buffer, ClUint32T bufSize,
99 ClUint8T *buffer, ClUint32T bufSize,
102 extern ClRcT clTransportTransparencyRegister(
const ClCharT *type,
104 extern ClRcT clTransportTransparencyDeregister(
const ClCharT *type,
106 extern ClRcT clTransportMulticastRegister(
const ClCharT *type,
108 extern ClRcT clTransportMulticastDeregister(
const ClCharT *type,
112 clTransportListenerCreate(ClTransportListenerHandleT *handle);
115 clTransportListenerDestroy(ClTransportListenerHandleT *handle);
118 clTransportListenerAdd(ClTransportListenerHandleT handle, ClInt32T fd,
119 ClRcT (*dispatchCallback)(ClInt32T fd, ClInt32T events,
void *cookie),
123 clTransportListenerDel(ClTransportListenerHandleT handle, ClInt32T fd);
126 clTransportListenerRegister(ClInt32T fd,
ClRcT (*dispatchCallback)(ClInt32T fd, ClInt32T events,
void *cookie),
129 clTransportListenerDeregister(ClInt32T fd);
132 clTransportPrivateDataSet(ClInt32T fd,
ClIocPortT port,
void *
private,
void **privateLast);
135 clTransportPrivateDataGet(ClInt32T fd,
ClIocPortT port);
138 clTransportPrivateDataDelete(ClInt32T fd,
ClIocPortT port);
141 clTransportDispatch(
ClIocPortT port, ClUint8T *buffer, ClUint32T bufSize);
144 ClCharT **typeXport);
146 extern ClCharT *clTransportMcastAddressGet();
147 extern void clTransportMcastAddressSet(
const ClCharT* maddr);
148 extern ClUint32T clTransportMcastPortGet();
149 extern ClUint32T clTransportHeartBeatIntervalGet();
150 extern ClUint32T clTransportHeartBeatIntervalCompGet();
151 extern ClUint32T clTransportHeartBeatRetriesGet();
153 extern ClRcT clTransportBroadcastListGet(
const ClCharT *hostXport,
157 extern ClBoolT clTransportMcastSupported(ClUint32T *numPeers);
158 extern ClRcT clTransportMcastPeerListGet(ClIocAddrMapT *peers, ClUint32T *numPeers);
159 extern ClRcT clTransportMcastPeerListAdd(
const ClCharT *addr);
160 extern ClRcT clTransportMcastPeerListDelete(
const ClCharT *addr);
Typical defines found in any software project.
Common Error Codes shared across multiple Clovis ASP Components.
Header file of Ioc Data Structures and APIs.
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
ClWordT ClIocCommPortHandleT
The Communication port handle.
Definition: clIocApi.h:353
ClUint64T ClIocMulticastAddressT
IOC Multicast address.
Definition: clIocApi.h:376
ClUint64T ClIocLogicalAddressT
IOC Logical address.
Definition: clIocApi.h:371
ClUint32T ClIocPortT
The IOC communication port.
Definition: clIocApi.h:348
enum ClIocNotificationId ClIocNotificationIdT
The port close notification payload.
ClUint32T ClIocNodeAddressT
The IOC node address.
Definition: clIocApi.h:343
The IOC Physical address of an application's communication end point.
Definition: clIocApi.h:383
IOC address.
Definition: clIocApi.h:401
The IOC receive returns this structure along with the message.
Definition: clIocApi.h:491