Whamcloud - gitweb
smash the HEAD with the contents of b_cmd. HEAD_PRE_CMD_SMASH and
[fs/lustre-release.git] / lustre / portals / include / portals / nal.h
1 #ifndef _NAL_H_
2 #define _NAL_H_
3
4 #include "build_check.h"
5
6 /*
7  * p30/nal.h
8  *
9  * The API side NAL declarations
10  */
11
12 #include <portals/types.h>
13
14 #ifdef yield
15 #undef yield
16 #endif
17
18 typedef struct nal_t nal_t;
19
20 struct nal_t {
21         ptl_ni_t ni;
22         int refct;
23         void *nal_data;
24         int *timeout;           /* for libp30api users */
25         int (*forward) (nal_t * nal, int index, /* Function ID */
26                         void *args, size_t arg_len, void *ret, size_t ret_len);
27
28         int (*shutdown) (nal_t * nal, int interface);
29
30         int (*validate) (nal_t * nal, void *base, size_t extent);
31
32         int (*yield) (nal_t * nal, unsigned long *flags, int milliseconds);
33
34         void (*lock) (nal_t * nal, unsigned long *flags);
35
36         void (*unlock) (nal_t * nal, unsigned long *flags);
37 };
38
39 typedef nal_t *(ptl_interface_t) (int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid);
40 extern nal_t *PTL_IFACE_IP(int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid);
41 extern nal_t *PTL_IFACE_MYR(int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid);
42
43 extern nal_t *ptl_hndl2nal(ptl_handle_any_t * any);
44
45 #ifndef PTL_IFACE_DEFAULT
46 #define PTL_IFACE_DEFAULT (PTL_IFACE_IP)
47 #endif
48
49 #endif