JULEA
Loading...
Searching...
No Matches
jnetwork.h
Go to the documentation of this file.
1/*
2 * JULEA - Flexible storage framework
3 * Copyright (C) 2021 Julian Benda
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
24
25#ifndef JULEA_NETWORK_H
26#define JULEA_NETWORK_H
27
28#if !defined(JULEA_H) && !defined(JULEA_COMPILATION)
29#error "Only <julea.h> can be included directly."
30#endif
31
32#include <glib.h>
33#include <gio/gio.h>
34
35//#include <rdma/fabric.h>
36
37G_BEGIN_DECLS
38
109struct JNetworkConnection;
110
112
122
124
129{
130 struct fid_mr* memory_region;
131 guint64 addr;
132 guint64 size;
133};
134
136
141{
142 guint64 key;
143 guint64 offset;
144 guint64 size;
145};
146
148
154struct JNetworkFabric;
155
157
158G_END_DECLS
159
160#include <core/jbackend.h>
161#include <core/jconfiguration.h>
162
163G_BEGIN_DECLS
164
175
185
211
225
235
253gboolean j_network_connection_send(JNetworkConnection* connection, gpointer data, gsize length);
254
268gboolean j_network_connection_recv(JNetworkConnection* connection, gsize length, gpointer data);
269
283gboolean j_network_connection_rma_read(JNetworkConnection* connection, JNetworkConnectionMemoryID const* memory_id, gpointer data);
284
295
300
313gboolean j_network_connection_rma_register(JNetworkConnection* connection, gconstpointer data, gsize length, JNetworkConnectionMemory* handle);
314
325
330G_END_DECLS
331
332#endif
JNetworkConnection * j_network_connection_init_server(JNetworkFabric *fabric, GSocketConnection *gconnection)
Definition jnetwork.c:812
gboolean j_network_connection_recv(JNetworkConnection *connection, gsize length, gpointer data)
Definition jnetwork.c:947
gboolean j_network_connection_closed(JNetworkConnection *connection)
Definition jnetwork.c:990
gboolean j_network_connection_rma_register(JNetworkConnection *connection, gconstpointer data, gsize length, JNetworkConnectionMemory *handle)
Definition jnetwork.c:1087
gboolean j_network_connection_send(JNetworkConnection *connection, gpointer data, gsize length)
Definition jnetwork.c:878
gboolean j_network_connection_rma_unregister(JNetworkConnection *connection, JNetworkConnectionMemory *handle)
Definition jnetwork.c:1109
gboolean j_network_connection_fini(JNetworkConnection *connection)
Definition jnetwork.c:1181
gboolean j_network_connection_rma_read(JNetworkConnection *connection, JNetworkConnectionMemoryID const *memory_id, gpointer data)
Definition jnetwork.c:1139
JNetworkConnectionAck
Definition jnetwork.h:119
gboolean j_network_connection_wait_for_completion(JNetworkConnection *connection)
Definition jnetwork.c:998
G_END_DECLS G_BEGIN_DECLS JNetworkFabric * j_network_fabric_init_server(JConfiguration *configuration)
Definition jnetwork.c:428
JNetworkConnection * j_network_connection_init_client(JConfiguration *configuration, JBackendType backend, guint index)
Definition jnetwork.c:727
gboolean j_network_connection_memory_get_id(JNetworkConnectionMemory *this, JNetworkConnectionMemoryID *id)
Definition jnetwork.c:1127
@ J_NETWORK_CONNECTION_ACK
Definition jnetwork.h:120
JBackendType
Definition jbackend.h:108
Definition jconfiguration.c:46
Definition jnetwork.h:141
guint64 key
access key for authentication
Definition jnetwork.h:142
guint64 size
size in bytes of memery region
Definition jnetwork.h:144
guint64 offset
used to identifie memory region
Definition jnetwork.h:143
Definition jnetwork.h:129
struct fid_mr * memory_region
Definition jnetwork.h:130
guint64 size
Definition jnetwork.h:132
guint64 addr
Definition jnetwork.h:131
Definition jnetwork.c:124
Definition jnetwork.c:84
struct fid_fabric * fabric
Definition jnetwork.c:92