1 #ifndef _CL_TRANSPORT_H_
2 #define _CL_TRANSPORT_H_
14 #define CL_TRANSPORT_BASE_PORT (18000)
16 typedef ClRcT (*ClTransportNotifyCallbackT)
19 extern ClInt32T gClTransportId;
21 typedef struct ClIocAddrMap
27 struct sockaddr_in sin_addr;
28 struct sockaddr_in6 sin6_addr;
37 static __inline__ ClInt32T clTransportIdGet(
void)
39 return ++gClTransportId;
42 extern ClRcT clTransportLayerInitialize(
void);
43 extern ClRcT clTransportLayerFinalize(
void);
44 extern ClRcT clTransportInitialize(
const ClCharT *type, ClBoolT nodeRep);
45 extern ClRcT clTransportFinalize(
const ClCharT *type, ClBoolT nodeRep);
47 extern ClRcT clTransportNotifyInitialize(
void);
48 extern ClRcT clTransportNotifyFinalize(
void);
49 extern ClRcT clTransportAddressAssign(
const ClCharT *type);
50 extern ClRcT clTransportNotificationInitialize(
const ClCharT *type);
51 extern ClRcT clTransportNotificationFinalize(
const ClCharT *type);
54 extern ClRcT clTransportBindClose(
const ClCharT *type,
ClIocPortT port);
55 extern ClRcT clTransportMaxPayloadSizeGet(
const ClCharT *type, ClUint32T *pSize);
57 extern ClRcT clTransportListenStop(
const ClCharT *type,
ClIocPortT port);
67 extern ClRcT clTransportNotifyRegister(ClTransportNotifyCallbackT callback, ClPtrT arg);
68 extern ClRcT clTransportNotifyDeregister(ClTransportNotifyCallbackT callback);
77 struct iovec *iov, ClInt32T iovlen, ClInt32T flags);
79 clTransportRecv(
const ClCharT *type,
ClIocCommPortHandleT commPort, ClIocDispatchOptionT *pRecvOption,
80 ClUint8T *buffer, ClUint32T bufSize,
84 ClUint8T *buffer, ClUint32T bufSize,
87 extern ClRcT clTransportTransparencyRegister(
const ClCharT *type,
89 extern ClRcT clTransportTransparencyDeregister(
const ClCharT *type,
91 extern ClRcT clTransportMulticastRegister(
const ClCharT *type,
93 extern ClRcT clTransportMulticastDeregister(
const ClCharT *type,
96 clTransportListenerRegister(ClInt32T fd,
ClRcT (*dispatchCallback)(ClInt32T fd, ClInt32T events,
void *cookie),
99 clTransportListenerDeregister(ClInt32T fd);
102 clTransportPrivateDataSet(ClInt32T fd,
ClIocPortT port,
void *
private,
void **privateLast);
105 clTransportPrivateDataGet(ClInt32T fd,
ClIocPortT port);
108 clTransportPrivateDataDelete(ClInt32T fd,
ClIocPortT port);
111 clTransportDispatch(
ClIocPortT port, ClUint8T *buffer, ClUint32T bufSize);
114 ClCharT **typeXport);
116 extern ClRcT clTransportNodeAddrGet(ClUint32T *pNumberOfEntries,
119 extern ClCharT *clTransportMcastAddressGet();
120 extern ClUint32T clTransportMcastPortGet();
121 extern ClUint32T clTransportHeartBeatIntervalGet();
122 extern ClUint32T clTransportHeartBeatIntervalCompGet();
123 extern ClUint32T clTransportHeartBeatRetriesGet();
126 extern ClBoolT clTransportMcastSupported(ClUint32T *numPeers);
127 extern ClRcT clTransportMcastPeerListGet(ClIocAddrMapT *peers, ClUint32T *numPeers);