OpenClovis Logo

clIocManagementApi.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 : clIocManagementApi.h
22  *******************************************************************************/
23 
24 #ifndef _CL_IOC_MANAGEMENT_API_H_
25 # define _CL_IOC_MANAGEMENT_API_H_
26 
27 
28 #include <clCommon.h>
29 #include <clBufferApi.h>
30 #include <clIocTransportApi.h>
31 #include <clIocApi.h>
32 #include <clHash.h>
33 #include <clList.h>
34 
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39 
40 
41 #define CL_IOC_ROUTE_FLAGS_SAME_LINK 0xff
42 
43 #define CL_IOC_ROUTE_UP 1
44 
45 #define CL_IOC_ROUTE_DOWN 0
46 
47 
48 #define CL_IOC_MIN_RECV_Q_SIZE (32*1024)
49 
50 #define CL_IOC_MAX_RECV_Q_SIZE (1024*1024)
51 
52 
53 #define CL_IOC_STATIC_ENTRY 1
54 
55 #define CL_IOC_DYNAMIC_ENTRY 0
56 
57 /*
58  * This type using for general ClIocNodeAddressT and ClIocPortT
59  */
60 typedef ClUint32T ClIocHeartBeatLinkIndex;
61 
62 typedef struct ClIocRouteParam
63 {
64  ClIocNodeAddressT destAddr;
65  ClIocNodeAddressT nextHop;
66  ClUint16T prefixLen;
67  ClUint16T metrics;
68  ClCharT *pXportName;
69  ClCharT *pLinkName;
70  ClUint8T flags;
71  ClUint8T version;
72  ClUint8T status;
73  ClUint8T entryType;
74 } ClIocRouteParamT;
75 
76 typedef struct ClIocArpParam
77 {
78  ClIocNodeAddressT iocAddr;
79  ClUint8T *pTransportAddr;
80  ClUint32T addrSize;
81  ClCharT *pXportName;
82  ClCharT *pLinkName;
83  ClUint8T status;
84  ClUint8T entryType;
85 } ClIocArpParamT;
86 
87 /* Heart-beat start global defined */
88 typedef struct ClIocHeartBeatStatus
89 {
90  ClIocHeartBeatLinkIndex linkIndex;
91  ClUint8T status;
92  ClUint8T retryCount;
93  struct hashStruct hash; /*hash linkage*/
94  ClListHeadT list; /*list linkage*/
95 } ClIocHeartBeatStatusT;
96 
97 
98 ClRcT clIocCommPortWaterMarksGet(CL_IN ClUint32T commPort,
99  CL_OUT ClUint64T* pLowWaterMark,
100  CL_OUT ClUint64T* pHighWaterMark) CL_DEPRECATED;
101 ClRcT clIocCommPortWaterMarksSet(CL_IN ClUint32T commPort,
102  CL_IN ClUint32T lowWaterMark,
103  CL_IN ClUint32T highWaterMark) CL_DEPRECATED;
104 ClRcT clIocRouteInsert(CL_IN ClIocRouteParamT*pRouteInfo) CL_DEPRECATED;
105 ClRcT clIocRouteDelete(CL_IN ClIocNodeAddressT destAddr,
106  CL_IN ClUint16T prefixLen) CL_DEPRECATED;
107 ClRcT clIocRouteTablePrint( void) CL_DEPRECATED;
108 ClRcT clIocArpInsert(CL_IN ClIocArpParamT *pArpInfo) CL_DEPRECATED;
109 ClRcT clIocArpDelete(CL_IN ClIocNodeAddressT iocAddr,
110  CL_IN ClCharT *pXportName,
111  CL_IN ClCharT* pLinkName) CL_DEPRECATED;
112 ClRcT clIocArpTablePrint(void) CL_DEPRECATED;
113 ClRcT clIocLinkStatusGet(CL_IN ClCharT *pXportName,
114  CL_IN ClCharT* pLinkName,
115  CL_OUT ClUint8T *pStatus) CL_DEPRECATED;
116 ClRcT clIocLinkStatusSet(CL_IN ClCharT *pXportName,
117  CL_IN ClCharT* pLinkName,
118  CL_IN ClUint8T status) CL_DEPRECATED;
119 ClRcT clIocHeartBeatStart(void);
120 ClRcT clIocHeartBeatStop(void);
121 ClRcT clIocCommPortQueueSizeSet(ClIocCommPortHandleT portId,ClUint32T queueSize) CL_DEPRECATED;
122 ClRcT clIocCommPortQueueStatsGet(ClIocCommPortHandleT portId,
123  ClIocQueueStatsT *pQueueStats) CL_DEPRECATED;
124 ClRcT clIocNodeQueueWaterMarksSet(ClIocQueueIdT queueId,ClWaterMarkT *pWM) CL_DEPRECATED;
125 ClRcT clIocNodeQueueSizeSet(ClIocQueueIdT queueId,ClUint32T queueSize) CL_DEPRECATED;
126 ClRcT clIocNodeQueueStatsGet(ClIocQueueStatsT *pSendQStats,
127  ClIocQueueStatsT *pRecvQStats
128  ) CL_DEPRECATED;
129 
130 ClRcT clIocHearBeatHealthCheckUpdate(ClIocNodeAddressT nodeAddr, ClUint32T portId, ClCharT *message);
131 ClRcT clIocHeartBeatInitialize(ClBoolT nodeRep);
132 ClRcT clIocHeartBeatFinalize(ClBoolT nodeRep);
133 
134 ClRcT clIocHeartBeatMessageReqRep(ClIocCommPortHandleT commPort, ClIocAddressT *destAddress, ClUint32T reqRep, ClBoolT shutdown);
135 
136 ClRcT clIocHeartBeatPause(void);
137 
138 ClRcT clIocHeartBeatUnpause(void);
139 
140 const ClCharT *clIocHeartBeatStatusGet(void);
141 
142 # ifdef __cplusplus
143 }
144 # endif
145 
146 #endif /* _CL_IOC_MANAGEMENT_API_H_ */

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