OpenClovis Logo

clIocTransportApi.h
1 /*
2  * Copyright (C) 2002-2012 OpenClovis Solutions Inc. All Rights Reserved.
3  *
4  * This file is available under a commercial license from the
5  * copyright holder or the GNU General Public License Version 2.0.
6  *
7  * The source code for this program is not published or otherwise
8  * divested of its trade secrets, irrespective of what has been
9  * deposited with the U.S. Copyright office.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * For more information, see the file COPYING provided with this
17  * material.
18  */
19 /*******************************************************************************
20  * ModuleName : ioc
21  * File : clIocTransportApi.h
22  *******************************************************************************/
23 
24 #ifndef _CL_IOC_TRANSPORT_API_H_
25 # define _CL_IOC_TRANSPORT_API_H_
26 
27 # ifdef __cplusplus
28 extern "C"
29 {
30 # endif
31 
32 # include <clCommon.h>
33 # include <clIocApi.h>
34 # include <clTimerApi.h>
35 # include <clBufferApi.h>
36 # include <clCntApi.h>
37 
38 
39 # define CL_TRANS_STAT_INC(value, incr) ((value) = (value) + (incr))
40 # define CL_IOC_DEF_MAX_ALLOWED_XPORTS (1+4)
41 
42 
43 # define CL_IOC_MAX_XPORT_STRING_LENGTH 127
44 # define CL_IOC_MAX_XPORT_ADDR_SIZE CL_IOC_MAX_XPORT_STRING_LENGTH
45 # define CL_IOC_MAX_XPORT_NAME_LENGTH CL_IOC_MAX_XPORT_STRING_LENGTH
46 # define CL_IOC_MIN_MTU_SIZE 256
47 
48 
49  typedef struct ClIocTransportStats
50  {
51  ClUint32T sendMsgs;
52  ClUint32T recvMsgs;
53  ClUint32T sendBytes;
54  ClUint32T recvBytes;
55  ClUint32T badMsgs;
56  ClUint32T dropMsgs;
57  } ClIocTransportStatsT;
58 
59  typedef struct ClIocTransportLinkConfig ClIocTransportLinkConfigT;
60 
61  typedef ClRcT( *ClIocCoreFuncT) ( ClBufferHandleT, ClIocTransportLinkConfigT *, ClUint8T *);
62 
63  typedef ClRcT( *ClIocTransportFuncT) ( ClIocTransportLinkConfigT *);
64 
65  typedef ClRcT( *ClIocTransportSendFuncT) ( ClBufferHandleT, ClIocTransportLinkConfigT *, ClUint8T *);
66 
67  typedef ClRcT( *ClIocTransportAddrConvertFuncT) ( ClUint8T * pTransportAddress, ClUint8T * pIocArpAddrBytes);
68 
69  typedef ClRcT( *ClIocGroupCreateFuncT) ( ClIocAddressT *, ClUint8T *);
70 
71  typedef ClRcT( *ClIocGroupJoinFuncT) ( ClUint8T *);
72 
73  typedef ClRcT( *ClIocGroupLeaveFuncT) ( ClUint8T *);
74 
75  typedef ClRcT( *ClIocGroupDeleteFuncT) ( ClUint8T *);
76 
77 
78 
79  struct ClIocTransportLinkConfig
80  {
81  ClCharT pXportName[CL_IOC_MAX_XPORT_NAME_LENGTH + 1];
82  ClCharT pXportLinkName[CL_IOC_MAX_XPORT_NAME_LENGTH + 1];
83  ClUint8T xportType;
84  ClUint8T isChecksumReqd;
85  ClUint8T addressSize;
86  ClUint8T isBcastSupported;
87  ClUint8T xportBcastAddress[CL_IOC_MAX_XPORT_ADDR_SIZE + 1];
88  ClUint8T xportAddress[CL_IOC_MAX_XPORT_ADDR_SIZE + 1];
89  ClUint32T mtuSize;
90  ClIocTransportStatsT *pIocXportStats;
91  ClIocCoreFuncT iocCoreRecvRoutine;
92  ClUint8T priority;
93  ClUint8T isRegistered;
94  void *pXportLinkPrivData;
95  ClUint8T status;
96  };
97 
98 
99  typedef struct ClIocTransportConfig
100  {
101  ClUint8T version;
102  ClCharT pXportName[CL_IOC_MAX_XPORT_NAME_LENGTH + 1];
103  ClUint8T priority;
104  ClUint8T xportType;
105  ClIocTransportFuncT initRoutine;
106  ClIocTransportSendFuncT sendRoutine;
107  ClIocTransportFuncT closeRoutine;
108  ClIocTransportAddrConvertFuncT addrConvertRoutine;
109  ClIocTransportAddrConvertFuncT addrExtractRoutine;
110  } ClIocTransportConfigT;
111 
112 
113  ClRcT clIocTransportRegister(CL_IN ClIocTransportConfigT *pXportObjConfig) CL_DEPRECATED;
114  ClRcT clIocTransportDeregister(CL_IN ClCharT *pXportName) CL_DEPRECATED;
115  ClRcT clIocLinkRegister( CL_IN ClIocTransportLinkConfigT* pXportLinkConfig) CL_DEPRECATED;
116  ClRcT clIocLinkDeregister(CL_IN ClCharT *pXportLinkName, CL_IN ClCharT *pXportName) CL_DEPRECATED;
117 
118 # ifdef __cplusplus
119 }
120 # endif
121 
122 #endif /* _CL_IOC_TRANSPORT_API_H_ */
Typical defines found in any software project.
Header file of Buffer Management related APIs.
Header file of Clovis Container Related APIs.
Header file of Ioc Data Structures and APIs.
Timer 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
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
IOC address.
Definition: clIocApi.h:401

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen