X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Finclude%2Flnet%2Fnal.h;fp=lnet%2Finclude%2Flnet%2Fnal.h;h=88be63c5a7a1f322d1411f6eb062b8582a791c10;hb=96ec6856f91f7f9031cfce4273c714d72cfe59ae;hp=0000000000000000000000000000000000000000;hpb=0bcac33c5aec463e9f471fba6f7d0adc26e6df9f;p=fs%2Flustre-release.git diff --git a/lnet/include/lnet/nal.h b/lnet/include/lnet/nal.h new file mode 100644 index 0000000..88be63c --- /dev/null +++ b/lnet/include/lnet/nal.h @@ -0,0 +1,49 @@ +/* +*/ +#ifndef _NAL_H_ +#define _NAL_H_ + +/* + * p30/nal.h + * + * The API side NAL declarations + */ + +#include + +#ifdef yield +#undef yield +#endif + +typedef struct nal_t nal_t; + +struct nal_t { + ptl_ni_t ni; + int refct; + void *nal_data; + int *timeout; /* for libp30api users */ + int (*forward) (nal_t * nal, int index, /* Function ID */ + void *args, size_t arg_len, void *ret, size_t ret_len); + + int (*shutdown) (nal_t * nal, int interface); + + int (*validate) (nal_t * nal, void *base, size_t extent); + + void (*yield) (nal_t * nal); + + void (*lock) (nal_t * nal, unsigned long *flags); + + void (*unlock) (nal_t * nal, unsigned long *flags); +}; + +typedef nal_t *(ptl_interface_t) (int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid); +extern nal_t *PTL_IFACE_IP(int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid); +extern nal_t *PTL_IFACE_MYR(int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid); + +extern nal_t *ptl_hndl2nal(ptl_handle_any_t * any); + +#ifndef PTL_IFACE_DEFAULT +#define PTL_IFACE_DEFAULT (PTL_IFACE_IP) +#endif + +#endif