14 #include "na_config.h"
35 #define NA_ADDR_NULL ((na_addr_t)0)
36 #define NA_OP_ID_NULL ((na_op_id_t)0)
37 #define NA_OP_ID_IGNORE ((na_op_id_t *)1)
38 #define NA_MEM_HANDLE_NULL ((na_mem_handle_t)0)
41 #define NA_MAX_IDLE_TIME (3600*1000)
45 #define NA_TAG_UB UINT_MAX
48 #define NA_MAX_ADDR_LEN 256
52 #define NA_MEM_READWRITE 0x00
53 #define NA_MEM_READ_ONLY 0x01
121 const char *info_string,
123 ) NA_WARN_UNUSED_RESULT;
295 ) NA_WARN_UNUSED_RESULT;
308 ) NA_WARN_UNUSED_RESULT;
321 ) NA_WARN_UNUSED_RESULT;
550 ) NA_WARN_UNUSED_RESULT;
696 unsigned int timeout,
697 unsigned int max_count,
698 unsigned int *actual_count
724 NA_EXPORT
const char *
727 ) NA_WARN_UNUSED_RESULT;
NA_EXPORT na_return_t NA_Addr_to_string(na_class_t *na_class, char *buf, na_size_t buf_size, na_addr_t addr)
Convert an addr to a string (returned string includes the terminating null byte '\0').
NA_EXPORT na_return_t NA_Progress(na_class_t *na_class, na_context_t *context, unsigned int timeout)
Try to progress communication for at most timeout until timeout reached or any completion has occurre...
NA_EXPORT na_return_t NA_Msg_recv_unexpected(na_class_t *na_class, na_context_t *context, na_cb_t callback, void *arg, void *buf, na_size_t buf_size, na_op_id_t *op_id)
Receive an unexpected message.
struct na_cb_info_lookup lookup
NA_EXPORT na_class_t * NA_Initialize(const char *info_string, na_bool_t listen) NA_WARN_UNUSED_RESULT
Initialize the network abstraction layer.
NA_EXPORT na_return_t NA_Addr_lookup(na_class_t *na_class, na_context_t *context, na_cb_t callback, void *arg, const char *name, na_op_id_t *op_id)
Lookup an addr from a peer address/name.
na_size_t actual_buf_size
NA_EXPORT na_return_t NA_Mem_register(na_class_t *na_class, na_mem_handle_t mem_handle)
Register memory for RMA operations.
enum na_return na_return_t
NA_EXPORT na_return_t NA_Get(na_class_t *na_class, na_context_t *context, na_cb_t callback, void *arg, na_mem_handle_t local_mem_handle, na_offset_t local_offset, na_mem_handle_t remote_mem_handle, na_offset_t remote_offset, na_size_t data_size, na_addr_t remote_addr, na_op_id_t *op_id)
Get data from remote target.
struct na_cb_info_recv_unexpected recv_unexpected
NA_EXPORT na_return_t NA_Context_destroy(na_class_t *na_class, na_context_t *context)
Destroy a context created by using NA_Context_create().
NA_EXPORT na_return_t NA_Cancel(na_class_t *na_class, na_context_t *context, na_op_id_t op_id)
Cancel an ongoing operation.
NA_EXPORT na_return_t NA_Msg_recv_expected(na_class_t *na_class, na_context_t *context, na_cb_t callback, void *arg, void *buf, na_size_t buf_size, na_addr_t source, na_tag_t tag, na_op_id_t *op_id)
Receive an expected message from source.
enum na_cb_type na_cb_type_t
NA_EXPORT na_return_t NA_Mem_handle_free(na_class_t *na_class, na_mem_handle_t mem_handle)
Free memory handle.
NA_EXPORT na_return_t NA_Addr_self(na_class_t *na_class, na_addr_t *addr)
Access self address.
NA_EXPORT na_return_t NA_Finalize(na_class_t *na_class)
Finalize the network abstraction layer.
NA_EXPORT na_context_t * NA_Context_create(na_class_t *na_class)
Create a new context.
NA_EXPORT na_return_t NA_Mem_handle_serialize(na_class_t *na_class, void *buf, na_size_t buf_size, na_mem_handle_t mem_handle)
Serialize memory handle into a buffer.
NA_EXPORT na_size_t NA_Mem_handle_get_serialize_size(na_class_t *na_class, na_mem_handle_t mem_handle) NA_WARN_UNUSED_RESULT
Get size required to serialize handle.
NA_EXPORT const char * NA_Error_to_string(na_return_t errnum) NA_WARN_UNUSED_RESULT
Convert error return code to string (null terminated).
NA_EXPORT na_return_t NA_Mem_handle_deserialize(na_class_t *na_class, na_mem_handle_t *mem_handle, const void *buf, na_size_t buf_size)
Deserialize memory handle from buffer.
NA_EXPORT na_return_t NA_Mem_deregister(na_class_t *na_class, na_mem_handle_t mem_handle)
Unregister memory.
NA_EXPORT na_return_t NA_Msg_send_expected(na_class_t *na_class, na_context_t *context, na_cb_t callback, void *arg, const void *buf, na_size_t buf_size, na_addr_t dest, na_tag_t tag, na_op_id_t *op_id)
Send an expected message to dest.
NA_EXPORT na_return_t NA_Addr_free(na_class_t *na_class, na_addr_t addr)
Free the addr from the list of peers.
NA_EXPORT na_size_t NA_Msg_get_max_unexpected_size(na_class_t *na_class) NA_WARN_UNUSED_RESULT
Get the maximum size of messages supported by unexpected send/recv.
NA_EXPORT na_return_t NA_Msg_send_unexpected(na_class_t *na_class, na_context_t *context, na_cb_t callback, void *arg, const void *buf, na_size_t buf_size, na_addr_t dest, na_tag_t tag, na_op_id_t *op_id)
Send an unexpected message to dest.
NA_EXPORT na_return_t NA_Addr_lookup_wait(na_class_t *na_class, const char *name, na_addr_t *addr)
For compatibility, temporarily provide this routine, which waits until addr is returned.
na_return_t(* na_cb_t)(const struct na_cb_info *callback_info)
NA_EXPORT na_return_t NA_Mem_handle_create_segments(na_class_t *na_class, struct na_segment *segments, na_size_t segment_count, unsigned long flags, na_mem_handle_t *mem_handle)
Create memory handle for RMA operations.
union na_cb_info::@0 info
NA_EXPORT na_return_t NA_Put(na_class_t *na_class, na_context_t *context, na_cb_t callback, void *arg, na_mem_handle_t local_mem_handle, na_offset_t local_offset, na_mem_handle_t remote_mem_handle, na_offset_t remote_offset, na_size_t data_size, na_addr_t remote_addr, na_op_id_t *op_id)
Put data to remote target.
NA_EXPORT na_return_t NA_Mem_handle_create(na_class_t *na_class, void *buf, na_size_t buf_size, unsigned long flags, na_mem_handle_t *mem_handle)
Create memory handle for RMA operations.
NA_EXPORT na_return_t NA_Trigger(na_context_t *context, unsigned int timeout, unsigned int max_count, unsigned int *actual_count)
Execute at most max_count callbacks.
NA_EXPORT na_return_t NA_Addr_dup(na_class_t *na_class, na_addr_t addr, na_addr_t *new_addr)
Duplicate an existing NA abstract address.
NA_EXPORT na_bool_t NA_Addr_is_self(na_class_t *na_class, na_addr_t addr)
Test whether address is self or not.
NA_EXPORT na_size_t NA_Msg_get_max_expected_size(na_class_t *na_class) NA_WARN_UNUSED_RESULT
Get the maximum size of messages supported by expected send/recv.
NA_EXPORT na_tag_t NA_Msg_get_max_tag(na_class_t *na_class) NA_WARN_UNUSED_RESULT
Get the maximum tag value that can be used by send/recv.