GNUnet  0.19.5
gnunet_util_lib.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2009 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet 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  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
30 #ifndef GNUNET_UTIL_LIB_H
31 #define GNUNET_UTIL_LIB_H
32 
33 #define __GNUNET_UTIL_LIB_H_INSIDE__
34 
35 #include <sys/socket.h>
36 
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #if 0 /* keep Emacsens' auto-indent happy */
41 }
42 #endif
43 #endif
44 
45 
52 #define GNUNET_MAX_MESSAGE_SIZE 65536
53 
57 #define GNUNET_MIN_MESSAGE_SIZE sizeof(struct GNUNET_MessageHeader)
58 
65 #define GNUNET_AGPL_URL "https://git.gnunet.org/gnunet.git/tag/?h=v" \
66  GNUNET_VERSION
67 
68 #include "gnunet_config.h"
69 #include "gnunet_common.h"
70 #include "gnunet_crypto_lib.h"
71 #include "gnunet_bandwidth_lib.h"
72 #include "gnunet_bio_lib.h"
73 #include "gnunet_buffer_lib.h"
74 #include "gnunet_client_lib.h"
75 #include "gnunet_container_lib.h"
76 #include "gnunet_getopt_lib.h"
77 #include "gnunet_helper_lib.h"
78 #include "gnunet_mst_lib.h"
79 #include "gnunet_mq_lib.h"
80 #include "gnunet_nc_lib.h"
81 #include "gnunet_op_lib.h"
82 #include "gnunet_os_lib.h"
83 #include "gnunet_peer_lib.h"
84 #include "gnunet_plugin_lib.h"
85 #include "gnunet_program_lib.h"
86 #include "gnunet_protocols.h"
87 #include "gnunet_service_lib.h"
88 #include "gnunet_signal_lib.h"
89 #include "gnunet_strings_lib.h"
90 #include "gnunet_tun_lib.h"
91 #include "gnunet_dnsstub_lib.h"
92 #include "gnunet_dnsparser_lib.h"
94 #include "gnunet_error_codes.h"
95 
111 int
112 GNUNET_try_compression (const char *data,
113  size_t old_size,
114  char **result,
115  size_t *new_size);
116 
127 char *
128 GNUNET_decompress (const char *input,
129  size_t input_size,
130  size_t output_size);
131 
132 
133 #if 0 /* keep Emacsens' auto-indent happy */
134 {
135 #endif
136 #ifdef __cplusplus
137 }
138 #endif
139 
140 #undef __GNUNET_UTIL_LIB_H_INSIDE__
141 
142 #endif
uint32_t data
The data value.
static int result
Global testing status.
Functions related to bandwidth (unit)
Buffered IO library.
GNUnet child management api.
Functions related to accessing services.
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
Container classes for GNUnet.
cryptographic primitives for GNUnet
API for helper library to parse DNS packets.
API for helper library to send DNS requests to DNS resolver.
Command line parsing and –help formatting.
API for dealing with SUID helper processes.
General-purpose message queue.
Library for tokenizing a message stream.
General-purpose broadcast mechanism for message queues.
Asynchronous operations; register callbacks for operations and call them when a response arrives.
Low level process routines.
Helper library for interning of peer identifiers.
Plugin loading and unloading.
Functions related to starting programs.
Constants for network protocols.
Functions related to starting services.
Functions related to signals.
Strings and string handling functions.
Standard TCP/IP network structs and IP checksum calculations for TUN interaction.
char * GNUNET_decompress(const char *input, size_t input_size, size_t output_size)
Decompress input, return the decompressed data as output.
Definition: compress.c:70
int GNUNET_try_compression(const char *data, size_t old_size, char **result, size_t *new_size)
Try to compress the given block of data using libz.
Definition: compress.c:33