diff options
Diffstat (limited to 'src/set')
-rw-r--r-- | src/set/Makefile.am | 6 | ||||
-rw-r--r-- | src/set/gnunet-service-set.c | 5 | ||||
-rw-r--r-- | src/set/gnunet-service-set_intersection.c | 9 | ||||
-rw-r--r-- | src/set/gnunet-service-set_intersection.h | 2 | ||||
-rw-r--r-- | src/set/gnunet-service-set_union.c | 6 | ||||
-rw-r--r-- | src/set/gnunet-service-set_union_strata_estimator.c | 6 | ||||
-rw-r--r-- | src/set/gnunet-set-ibf-profiler.c | 2 | ||||
-rw-r--r-- | src/set/ibf.c | 1 | ||||
-rw-r--r-- | src/set/ibf_sim.c | 1 | ||||
-rw-r--r-- | src/set/meson.build | 52 | ||||
-rw-r--r-- | src/set/set_api.c | 63 |
11 files changed, 62 insertions, 91 deletions
diff --git a/src/set/Makefile.am b/src/set/Makefile.am index 837d42ff5..bf4c8229c 100644 --- a/src/set/Makefile.am +++ b/src/set/Makefile.am @@ -14,11 +14,9 @@ if USE_COVERAGE AM_CFLAGS = -fprofile-arcs -ftest-coverage endif -bin_PROGRAMS = \ - gnunet-set-profiler - noinst_PROGRAMS = \ - gnunet-set-ibf-profiler + gnunet-set-ibf-profiler \ + gnunet-set-profiler libexec_PROGRAMS = \ gnunet-service-set diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index 2b859d81a..7c522ec34 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c @@ -23,6 +23,7 @@ * @author Florian Dold * @author Christian Grothoff */ +#include "platform.h" #include "gnunet-service-set.h" #include "gnunet-service-set_union.h" #include "gnunet-service-set_intersection.h" @@ -176,7 +177,6 @@ static uint32_t suggest_id; /** * Get the incoming socket associated with the given id. * - * @param listener the listener to look in * @param id id to look for * @return the incoming socket associated with the id, * or NULL if there is none @@ -1006,7 +1006,7 @@ handle_client_iterate (void *cls, const struct GNUNET_MessageHeader *m) * operation to be performed. * * @param cls client that sent the message - * @param m message sent by the client + * @param msg message sent by the client */ static void handle_client_create_set (void *cls, const struct GNUNET_SET_CreateMessage *msg) @@ -1066,7 +1066,6 @@ handle_client_create_set (void *cls, const struct GNUNET_SET_CreateMessage *msg) * - we got the channel from a peer but no #GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST * * @param cls channel context - * @param tc context information (why was this task triggered now) */ static void incoming_timeout_cb (void *cls) diff --git a/src/set/gnunet-service-set_intersection.c b/src/set/gnunet-service-set_intersection.c index 9313483bb..51a8d0dbc 100644 --- a/src/set/gnunet-service-set_intersection.c +++ b/src/set/gnunet-service-set_intersection.c @@ -754,13 +754,6 @@ begin_bf_exchange (struct Operation *op) } -/** - * Handle the initial `struct IntersectionElementInfoMessage` from a - * remote peer. - * - * @param cls the intersection operation - * @param mh the header of the message - */ void handle_intersection_p2p_element_info (void *cls, const struct @@ -1039,7 +1032,7 @@ filter_all (void *cls, * Handle a done message from a remote peer * * @param cls the intersection operation - * @param mh the message + * @param idm the message */ void handle_intersection_p2p_done (void *cls, diff --git a/src/set/gnunet-service-set_intersection.h b/src/set/gnunet-service-set_intersection.h index 200e8f5ff..d8884d0a7 100644 --- a/src/set/gnunet-service-set_intersection.h +++ b/src/set/gnunet-service-set_intersection.h @@ -57,7 +57,7 @@ handle_intersection_p2p_bf (void *cls, * remote peer. * * @param cls the intersection operation - * @param mh the header of the message + * @param msg the header of the message */ void handle_intersection_p2p_element_info (void *cls, diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index d762e4bba..3a2bc8bd7 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c @@ -2194,12 +2194,6 @@ handle_union_p2p_done (void *cls, } -/** - * Handle a over message from a remote peer - * - * @param cls the union operation - * @param mh the message - */ void handle_union_p2p_over (void *cls, const struct GNUNET_MessageHeader *mh) diff --git a/src/set/gnunet-service-set_union_strata_estimator.c b/src/set/gnunet-service-set_union_strata_estimator.c index 97b4a1f98..6de9fb5eb 100644 --- a/src/set/gnunet-service-set_union_strata_estimator.c +++ b/src/set/gnunet-service-set_union_strata_estimator.c @@ -155,12 +155,6 @@ strata_estimator_insert (struct StrataEstimator *se, } -/** - * Remove a key from the strata estimator. - * - * @param se strata estimator to remove the key from - * @param key key to remove - */ void strata_estimator_remove (struct StrataEstimator *se, struct IBF_Key key) diff --git a/src/set/gnunet-set-ibf-profiler.c b/src/set/gnunet-set-ibf-profiler.c index 944b63d30..6465b15b8 100644 --- a/src/set/gnunet-set-ibf-profiler.c +++ b/src/set/gnunet-set-ibf-profiler.c @@ -67,7 +67,7 @@ register_hashcode (struct GNUNET_HashCode *hash) static void iter_hashcodes (struct IBF_Key key, - GNUNET_CONTAINER_MulitHashMapIteratorCallback iter, + GNUNET_CONTAINER_MultiHashMapIteratorCallback iter, void *cls) { struct GNUNET_HashCode replicated; diff --git a/src/set/ibf.c b/src/set/ibf.c index 0f7eb6a9f..b6fb52b6b 100644 --- a/src/set/ibf.c +++ b/src/set/ibf.c @@ -24,6 +24,7 @@ * @author Florian Dold */ +#include "platform.h" #include "ibf.h" /** diff --git a/src/set/ibf_sim.c b/src/set/ibf_sim.c index 6415d00e1..563ed0fb8 100644 --- a/src/set/ibf_sim.c +++ b/src/set/ibf_sim.c @@ -26,6 +26,7 @@ * This code was used for some internal experiments, it is not * build or shipped as part of the GNUnet system. */ +#include "platform.h" #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/src/set/meson.build b/src/set/meson.build new file mode 100644 index 000000000..51782f446 --- /dev/null +++ b/src/set/meson.build @@ -0,0 +1,52 @@ +libgnunetset_src = ['set_api.c'] + +gnunetserviceset_src = ['gnunet-service-set.c', + 'gnunet-service-set_union.c', + 'gnunet-service-set_intersection.c', + 'gnunet-service-set_union_strata_estimator.c', + 'ibf.c'] + +configure_file(input : 'set.conf.in', + output : 'set.conf', + configuration : cdata, + install: true, + install_dir: pkgcfgdir) + + +if get_option('monolith') + foreach p : libgnunetset_src + gnunetserviceset_src + gnunet_src += 'set/' + p + endforeach + subdir_done() +endif + +libgnunetset = library('gnunetset', + libgnunetset_src, + soversion: '0', + version: '0.0.0', + dependencies: libgnunetutil_dep, + include_directories: [incdir, configuration_inc], + install: true, + install_dir: get_option('libdir')) +pkg.generate(libgnunetset, url: 'https://www.gnunet.org', + description : 'Provides API for accessing the set service') +libgnunetset_dep = declare_dependency(link_with : libgnunetset) +shared_module('gnunet_plugin_block_set_test', + ['plugin_block_set_test.c'], + dependencies: libgnunetutil_dep, + include_directories: [incdir, configuration_inc], + install:true, + install_dir: get_option('libdir')/'gnunet') +executable ('gnunet-service-set', + gnunetserviceset_src, + dependencies: [libgnunetset_dep, + libgnunetutil_dep, + m_dep, + libgnunetstatistics_dep, + libgnunetcore_dep, + libgnunetcadet_dep, + libgnunetblock_dep], + include_directories: [incdir, configuration_inc], + install: true, + install_dir: get_option('libdir') / 'gnunet' / 'libexec') + diff --git a/src/set/set_api.c b/src/set/set_api.c index 6b3dc940c..4f73ff06c 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c @@ -296,7 +296,7 @@ check_iter_element (void *cls, * iterator and sends an acknowledgement to the service. * * @param cls the `struct GNUNET_SET_Handle *` - * @param mh the message + * @param msg the message */ static void handle_iter_element (void *cls, @@ -669,19 +669,6 @@ GNUNET_SET_create (const struct GNUNET_CONFIGURATION_Handle *cfg, } -/** - * Add an element to the given set. After the element has been added - * (in the sense of being transmitted to the set service), @a cont - * will be called. Multiple calls to GNUNET_SET_add_element() can be - * queued. - * - * @param set set to add element to - * @param element element to add to the set - * @param cont continuation called after the element has been added - * @param cont_cls closure for @a cont - * @return #GNUNET_OK on success, #GNUNET_SYSERR if the - * set is invalid (e.g. the set service crashed) - */ int GNUNET_SET_add_element (struct GNUNET_SET_Handle *set, const struct GNUNET_SET_Element *element, @@ -716,19 +703,6 @@ GNUNET_SET_add_element (struct GNUNET_SET_Handle *set, } -/** - * Remove an element to the given set. After the element has been - * removed (in the sense of the request being transmitted to the set - * service), @a cont will be called. Multiple calls to - * GNUNET_SET_remove_element() can be queued - * - * @param set set to remove element from - * @param element element to remove from the set - * @param cont continuation called after the element has been removed - * @param cont_cls closure for @a cont - * @return #GNUNET_OK on success, #GNUNET_SYSERR if the - * set is invalid (e.g. the set service crashed) - */ int GNUNET_SET_remove_element (struct GNUNET_SET_Handle *set, const struct GNUNET_SET_Element *element, @@ -794,20 +768,6 @@ GNUNET_SET_destroy (struct GNUNET_SET_Handle *set) } -/** - * Prepare a set operation to be evaluated with another peer. - * The evaluation will not start until the client provides - * a local set with #GNUNET_SET_commit(). - * - * @param other_peer peer with the other set - * @param app_id hash for the application using the set - * @param context_msg additional information for the request - * @param result_mode specified how results will be returned, - * see `enum GNUNET_SET_ResultMode`. - * @param result_cb called on error or success - * @param result_cls closure for @e result_cb - * @return a handle to cancel the operation - */ struct GNUNET_SET_OperationHandle * GNUNET_SET_prepare (const struct GNUNET_PeerIdentity *other_peer, const struct GNUNET_HashCode *app_id, @@ -1066,20 +1026,6 @@ GNUNET_SET_listen_cancel (struct GNUNET_SET_ListenHandle *lh) } -/** - * Accept a request we got via #GNUNET_SET_listen. Must be called during - * #GNUNET_SET_listen, as the 'struct GNUNET_SET_Request' becomes invalid - * afterwards. - * Call #GNUNET_SET_commit to provide the local set to use for the operation, - * and to begin the exchange with the remote peer. - * - * @param request request to accept - * @param result_mode specified how results will be returned, - * see `enum GNUNET_SET_ResultMode`. - * @param result_cb callback for the results - * @param result_cls closure for @a result_cb - * @return a handle to cancel the operation - */ struct GNUNET_SET_OperationHandle * GNUNET_SET_accept (struct GNUNET_SET_Request *request, enum GNUNET_SET_ResultMode result_mode, @@ -1234,13 +1180,6 @@ GNUNET_SET_element_dup (const struct GNUNET_SET_Element *element) } -/** - * Hash a set element. - * - * @param element the element that should be hashed - * @param[out] ret_hash a pointer to where the hash of @a element - * should be stored - */ void GNUNET_SET_element_hash (const struct GNUNET_SET_Element *element, struct GNUNET_HashCode *ret_hash) |