| 1 |
/* |
| 2 |
* Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. |
| 3 |
* |
| 4 |
* This Software is licensed under one of the following licenses: |
| 5 |
* |
| 6 |
* 1) under the terms of the "Common Public License 1.0" a copy of which is |
| 7 |
* in the file LICENSE.txt in the root directory. The license is also |
| 8 |
* available from the Open Source Initiative, see |
| 9 |
* http://www.opensource.org/licenses/cpl.php. |
| 10 |
* |
| 11 |
* 2) under the terms of the "The BSD License" a copy of which is in the file |
| 12 |
* LICENSE2.txt in the root directory. The license is also available from |
| 13 |
* the Open Source Initiative, see |
| 14 |
* http://www.opensource.org/licenses/bsd-license.php. |
| 15 |
* |
| 16 |
* 3) under the terms of the "GNU General Public License (GPL) Version 2" a |
| 17 |
* copy of which is in the file LICENSE3.txt in the root directory. The |
| 18 |
* license is also available from the Open Source Initiative, see |
| 19 |
* http://www.opensource.org/licenses/gpl-license.php. |
| 20 |
* |
| 21 |
* Licensee has the right to choose one of the above licenses. |
| 22 |
* |
| 23 |
* Redistributions of source code must retain the above copyright |
| 24 |
* notice and one of the license notices. |
| 25 |
* |
| 26 |
* Redistributions in binary form must reproduce both the above copyright |
| 27 |
* notice, one of the license notices in the documentation |
| 28 |
* and/or other materials provided with the distribution. |
| 29 |
*/ |
| 30 |
|
| 31 |
#ifndef DAPL_FFT_UTIL_H |
| 32 |
#define DAPL_FFT_UTIL_H |
| 33 |
|
| 34 |
#include "dapl_proto.h" |
| 35 |
#include "dapl_test_data.h" |
| 36 |
|
| 37 |
#define DT_assert_dat(test_num, x) if(x) ; \ |
| 38 |
else { \ |
| 39 |
DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \ |
| 40 |
DT_Tdep_PT_Printf(test_num,"Error = %d, %s\n", rc, DT_RetToString(rc)); \ |
| 41 |
goto cleanup; \ |
| 42 |
} |
| 43 |
|
| 44 |
#define DT_assert(test_num, x) if(x) ; \ |
| 45 |
else { \ |
| 46 |
DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \ |
| 47 |
goto cleanup; \ |
| 48 |
} |
| 49 |
|
| 50 |
#define DT_assert_clean(test_num, x) if(x) ; \ |
| 51 |
else { \ |
| 52 |
DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \ |
| 53 |
DT_Tdep_PT_Printf(test_num,"Error = %d, %s\n", rc, DT_RetToString(rc)); \ |
| 54 |
return 0; \ |
| 55 |
} |
| 56 |
|
| 57 |
typedef struct |
| 58 |
{ |
| 59 |
DAT_IA_HANDLE ia_handle; |
| 60 |
DAT_PZ_HANDLE pz_handle; |
| 61 |
DAT_PSP_HANDLE psp_handle; |
| 62 |
DAT_EP_HANDLE ep_handle; |
| 63 |
DAT_EVD_HANDLE cr_evd, conn_evd, send_evd, recv_evd; |
| 64 |
DAT_EVENT event; |
| 65 |
DAT_COUNT count; |
| 66 |
DAT_CR_HANDLE cr_handle; |
| 67 |
Bpool *bpool; |
| 68 |
DAT_CR_ARRIVAL_EVENT_DATA cr_stat; |
| 69 |
DAT_EVENT_NUMBER event_num; |
| 70 |
DAT_IA_ADDRESS_PTR remote_netaddr; |
| 71 |
Per_Test_Data_t *pt_ptr; |
| 72 |
bool connected; |
| 73 |
} FFT_Connection_t; |
| 74 |
|
| 75 |
typedef enum |
| 76 |
{ |
| 77 |
QUERY_CNO, |
| 78 |
QUERY_CR, |
| 79 |
QUERY_EP, |
| 80 |
QUERY_EVD, |
| 81 |
QUERY_IA, |
| 82 |
QUERY_LMR, |
| 83 |
QUERY_RMR, |
| 84 |
QUERY_PSP, |
| 85 |
QUERY_RSP, |
| 86 |
QUERY_PZ, |
| 87 |
} FFT_query_enum; |
| 88 |
|
| 89 |
typedef struct |
| 90 |
{ |
| 91 |
int (*fun) (Params_t *params_ptr, FFT_Cmd_t* cmd); |
| 92 |
} FFT_Testfunc_t; |
| 93 |
|
| 94 |
#endif |
| 95 |
|