GNUnet 0.21.1
gnunet_setu_service.h File Reference

Two-peer set union operations. More...

Include dependency graph for gnunet_setu_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_SETU_Element
 Element stored in a set. More...
 
struct  GNUNET_SETU_Option
 Option for set operations. More...
 

Macros

#define GNUNET_SETU_CONTEXT_MESSAGE_MAX_SIZE   ((1 << 16) - 1024)
 Maximum size of a context message for set operation requests. More...
 

Typedefs

typedef void(* GNUNET_SETU_ResultIterator) (void *cls, const struct GNUNET_SETU_Element *element, uint64_t current_size, enum GNUNET_SETU_Status status)
 Callback for set union operation results. More...
 
typedef void(* GNUNET_SETU_ListenCallback) (void *cls, const struct GNUNET_PeerIdentity *other_peer, const struct GNUNET_MessageHeader *context_msg, struct GNUNET_SETU_Request *request)
 Called when another peer wants to do a set operation with the local peer. More...
 

Enumerations

enum  GNUNET_SETU_Status { GNUNET_SETU_STATUS_ADD_LOCAL , GNUNET_SETU_STATUS_ADD_REMOTE , GNUNET_SETU_STATUS_FAILURE , GNUNET_SETU_STATUS_DONE }
 Status for the result callback. More...
 
enum  GNUNET_SETU_OptionType {
  GNUNET_SETU_OPTION_END =0 , GNUNET_SETU_OPTION_BYZANTINE =1 , GNUNET_SETU_OPTION_FORCE_FULL =2 , GNUNET_SETU_OPTION_FORCE_DELTA =4 ,
  GNUNET_SETU_OPTION_SYMMETRIC = 8 , GNUNET_SETU_OPTION_CUSTOM_BYZANTINE_UPPER_BOUND = 16 , GNUNET_SETU_OPTION_CUSTOM_BANDWIDTH_LATENCY_TRADEOFF = 32 , GNUNET_SETU_OPTION_CUSTOM_IBF_BUCKET_NUMBER_FACTOR = 64 ,
  GNUNET_SETU_OPTION_CUSTOM_IBF_BUCKETS_PER_ELEMENT = 128
}
 Possible options to pass to a set operation. More...
 

Functions

struct GNUNET_SETU_HandleGNUNET_SETU_create (const struct GNUNET_CONFIGURATION_Handle *cfg)
 Create an empty set, supporting the specified operation. More...
 
int GNUNET_SETU_add_element (struct GNUNET_SETU_Handle *set, const struct GNUNET_SETU_Element *element, GNUNET_SCHEDULER_TaskCallback cb, void *cb_cls)
 Add an element to the given set. More...
 
void GNUNET_SETU_destroy (struct GNUNET_SETU_Handle *set)
 Destroy the set handle, and free all associated resources. More...
 
struct GNUNET_SETU_OperationHandleGNUNET_SETU_prepare (const struct GNUNET_PeerIdentity *other_peer, const struct GNUNET_HashCode *app_id, const struct GNUNET_MessageHeader *context_msg, const struct GNUNET_SETU_Option options[], GNUNET_SETU_ResultIterator result_cb, void *result_cls)
 Prepare a set operation to be evaluated with another peer. More...
 
struct GNUNET_SETU_ListenHandleGNUNET_SETU_listen (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_HashCode *app_id, GNUNET_SETU_ListenCallback listen_cb, void *listen_cls)
 Wait for set operation requests for the given application ID. More...
 
void GNUNET_SETU_listen_cancel (struct GNUNET_SETU_ListenHandle *lh)
 Cancel the given listen operation. More...
 
struct GNUNET_SETU_OperationHandleGNUNET_SETU_accept (struct GNUNET_SETU_Request *request, const struct GNUNET_SETU_Option options[], GNUNET_SETU_ResultIterator result_cb, void *result_cls)
 Accept a request we got via GNUNET_SETU_listen(). More...
 
int GNUNET_SETU_commit (struct GNUNET_SETU_OperationHandle *oh, struct GNUNET_SETU_Handle *set)
 Commit a set to be used with a set operation. More...
 
void GNUNET_SETU_operation_cancel (struct GNUNET_SETU_OperationHandle *oh)
 Cancel the given set operation. More...
 
void GNUNET_SETU_element_hash (const struct GNUNET_SETU_Element *element, struct GNUNET_HashCode *ret_hash)
 Hash a set element. More...
 

Detailed Description

Two-peer set union operations.

Definition in file gnunet_setu_service.h.