NewMadeleine

Documentation

nm_pack_interface.h
Go to the documentation of this file.
1/*
2 * NewMadeleine
3 * Copyright (C) 2006-2019 (see AUTHORS file)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 */
15
16#ifndef NM_PACK_INTERFACE_H
17#define NM_PACK_INTERFACE_H
18
19#include <nm_public.h>
22
35{
42};
43
51
60
67extern int nm_pack(nm_pack_cnx_t*p_cnx, const void*ptr, nm_len_t len);
68
71extern int nm_pack_express(nm_pack_cnx_t*p_cnx, const void*ptr, nm_len_t len);
72
77extern int nm_end_packing(nm_pack_cnx_t*p_cnx);
78
87
95extern int nm_unpack(nm_pack_cnx_t*p_cnx, void*ptr, nm_len_t len);
96
100extern int nm_unpack_express(nm_pack_cnx_t*p_cnx, void*ptr, nm_len_t len);
101
107
110#endif /* NM_PACK_INTERFACE_H */
int nm_pack(nm_pack_cnx_t *p_cnx, const void *ptr, nm_len_t len)
Append a data fragment to the current message.
int nm_end_packing(nm_pack_cnx_t *p_cnx)
End building and send the current message.
int nm_end_unpacking(nm_pack_cnx_t *p_cnx)
End receiving and flush extraction of the current message.
int nm_begin_unpacking(nm_session_t p_session, nm_gate_t p_gate, nm_tag_t tag, nm_pack_cnx_t *p_cnx)
Start receiving and extracting a new message.
int nm_begin_packing(nm_session_t p_session, nm_gate_t p_gate, nm_tag_t tag, nm_pack_cnx_t *p_cnx)
Start building a new message for sending.
int nm_unpack(nm_pack_cnx_t *p_cnx, void *ptr, nm_len_t len)
Extract a data fragment from the current message; data will actually be available after end_unpacking...
int nm_unpack_express(nm_pack_cnx_t *p_cnx, void *ptr, nm_len_t len)
Extract a data fragment from the current message in express mode: data will be available upon functio...
int nm_pack_express(nm_pack_cnx_t *p_cnx, const void *ptr, nm_len_t len)
Append a data fragment to the current message, in express mode: data will be aavailable immediately a...
nm_tag_t tag
the user-supplied tag
static nm_session_t p_session
static nm_gate_t p_gate
uint16_t len
chunk len
Definition: nm_headers.h:0
This is the common public header for NewMad.
uint64_t nm_tag_t
user tags, 64 bits, contained in indirect hashtable
Definition: nm_types.h:58
uint64_t nm_len_t
data length used by nmad
Definition: nm_types.h:70
encapsulate a dynamic vector of nm_data
Definition: nm_data.h:245
Connection to another process.
Definition: nm_gate.h:100
Content for the request in the pack interface.
nm_session_t p_session
session used for the connexion.
struct nm_datav_s datav
vector of regular data
nm_tag_t tag
Message tag.
nm_gate_t gate
Source or destination gate.
nm_sr_request_t req
sendrecv request
struct nm_datav_s express
vector of data in expresss mode
internal defintion of the sendrecv request