26#ifndef GNUNET_SERVICE_SET_H_PRIVATE
27#define GNUNET_SERVICE_SET_H_PRIVATE
77(*SetCreateImpl) (void);
static struct GNUNET_ARM_Operation * op
Current operation.
enum State state
current state of profiling
int _GSS_is_element_of_operation(struct ElementEntry *ee, struct Operation *op)
Is element ee part of the set used by op?
void(* SetAddRemoveImpl)(struct SetState *state, struct ElementEntry *ee)
Signature of functions that implement the add/remove functionality for a set supporting a specific op...
struct SetState *(* SetCopyStateImpl)(struct SetState *state)
Make a copy of a set's internal state.
struct OperationState *(* OpAcceptImpl)(struct Operation *op)
Signature of functions that implement accepting a set operation.
struct GNUNET_STATISTICS_Handle * _GSS_statistics
Statistics handle.
const struct SetVT * _GSS_intersection_vt(void)
Get the table with implementing functions for set intersection.
const struct SetVT * _GSS_union_vt(void)
Get the table with implementing functions for set union.
void(* SetDestroyImpl)(struct SetState *state)
Signature of functions that implement the destruction of the implementation-specific set state.
void _GSS_operation_destroy2(struct Operation *op)
This function probably should not exist and be replaced by inlining more specific logic in the variou...
void(* OpCancelImpl)(struct Operation *op)
Signature of functions that implement operation cancellation.
struct SetState *(* SetCreateImpl)(void)
Signature of functions that create the implementation-specific state for a set supporting a specific ...
void(* OpChannelDeathImpl)(struct Operation *op)
Signature of functions called when the CADET channel died.
struct OperationState *(* OpEvaluateImpl)(struct Operation *op, const struct GNUNET_MessageHeader *opaque_context)
Signature of functions that implement starting the evaluation of set operations.
void _GSS_operation_destroy(struct Operation *op, int gc)
Destroy the given operation.
Constants for network applications operating on top of the CADET service.
CADET service; establish channels to distant peers.
Core service; the main API for encrypted P2P communications.
Constants for network protocols.
GNUNET_SET_ResultMode
The way results are given to the client.
GNUNET_SET_OperationType
The operation that a set set supports.
messages used for the set api
State we keep per client.
struct GNUNET_MQ_Handle * mq
MQ to talk to client.
struct Listener * listener
Listener, if associated with the client, otherwise NULL.
struct Set * set
Set, if associated with the client, otherwise NULL.
struct GNUNET_SERVICE_Client * client
Client this is about.
Information about an element element in the set.
int remote
GNUNET_YES if the element is a remote element, and does not belong to the operation's set.
struct GNUNET_SET_Element element
The actual element.
struct MutationEvent * mutations
If mutations is not NULL, it contains a list of mutations, ordered by increasing generation.
unsigned int mutations_size
Number of elements in the array mutations.
struct GNUNET_HashCode element_hash
Hash of the element.
Opaque handle to a channel.
Cursor into a multihashmap.
Internal representation of the hash map.
Handle to a message queue.
The identity of the host (wraps the signing key of the peer).
Entry in list of pending tasks.
Handle to a client that is connected to a service.
Message sent by client to the service to add or remove an element to/from the set.
unsigned int start
First generation that is excluded.
unsigned int end
Generation after the last excluded generation.
A listener is inhabited by a client, and waits for evaluation requests from remote peers.
MutationEvent gives information about changes to an element (removal / addition) in a set content.
unsigned int generation
First generation affected by this mutation event.
int added
If added is GNUNET_YES, then this is a remove event, otherwise it is an add event.
State of an evaluate operation with another peer.
Operation context used to execute a set operation.
unsigned int generation_created
Generation in which the operation handle was created.
uint32_t suggest_id
Unique request id for the request from a remote peer, sent to the client, which will accept or reject...
struct GNUNET_MessageHeader * context_msg
Context message, may be NULL.
int force_delta
Always use delta operation instead of sending full sets, even it it's less efficient.
int force_full
Always send full sets, even if delta operations would be more efficient.
struct Operation * prev
Kept in a DLL of the listener, if listener is non-NULL.
struct GNUNET_CADET_Channel * channel
Channel to the peer.
struct GNUNET_MQ_Handle * mq
Message queue for the channel.
struct GNUNET_PeerIdentity peer
The identity of the requesting peer.
struct Listener * listener
Port this operation runs on.
struct Operation * next
Kept in a DLL of the listener, if listener is non-NULL.
uint32_t salt
Salt to use for the operation.
enum GNUNET_SET_ResultMode result_mode
When are elements sent to the client, and which elements are sent?
uint32_t remote_element_count
Remote peers element count.
uint32_t client_request_id
ID used to identify an operation between service and client.
int byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
struct OperationState * state
Operation-specific operation state.
int byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
struct GNUNET_SCHEDULER_Task * timeout_task
Timeout task, if the incoming peer has not been accepted after the timeout, it will be disconnected.
struct Set * set
Set associated with the operation, NULL until the spec has been associated with a set.
Information about a mutation to apply to a set.
struct GNUNET_SET_ElementMessage * msg
Message that describes the desired mutation.
struct Set * set
Set this mutation is about.
struct PendingMutation * next
Mutations are kept in a DLL.
struct PendingMutation * prev
Mutations are kept in a DLL.
SetContent stores the actual set elements, which may be shared by multiple generations derived from o...
int iterator_count
Number of concurrently active iterators.
unsigned int latest_generation
FIXME: document!
struct GNUNET_CONTAINER_MultiHashMap * elements
Maps struct GNUNET_HashCode * to struct ElementEntry *.
struct PendingMutation * pending_mutations_head
Mutations requested by the client that we're unable to execute right now because we're iterating over...
unsigned int refcount
Number of references to the content.
struct PendingMutation * pending_mutations_tail
Mutations requested by the client that we're unable to execute right now because we're iterating over...
Extra state required for efficient set intersection.
Dispatch table for a specific set operation.
SetCreateImpl create
Callback for the set creation.
SetAddRemoveImpl add
Callback for element insertion.
OpEvaluateImpl evaluate
Callback for starting evaluation with a remote peer.
OpCancelImpl cancel
Callback for canceling an operation.
SetAddRemoveImpl remove
Callback for element removal.
OpChannelDeathImpl channel_death
Callback called in case the CADET channel died.
SetCopyStateImpl copy_state
Callback for making a copy of a set's internal state.
OpAcceptImpl accept
Callback for accepting a set operation request.
SetDestroyImpl destroy_set
Callback for destruction of the set state.
A set that supports a specific operation with other peers.
unsigned int iter_generation
Generation we're currently iteration over.
struct Set * next
Sets are held in a doubly linked list (in sets_head and sets_tail).
struct Operation * ops_head
Evaluate operations are held in a linked list.
struct Operation * ops_tail
Evaluate operations are held in a linked list.
struct Set * prev
Sets are held in a doubly linked list.
struct SetState * state
Implementation-specific state.
enum GNUNET_SET_OperationType operation
Type of operation supported for this set.
uint16_t iteration_id
Each iter is assigned a unique number, so that the client can distinguish iterations.
struct GenerationRange * excluded_generations
List of generations we have to exclude, due to lazy copies.
struct SetContent * content
Content, possibly shared by multiple sets, and thus reference counted.
const struct SetVT * vt
Virtual table for this set.
struct GNUNET_CONTAINER_MultiHashMapIterator * iter
Current state of iterating elements for the client.
struct ClientState * cs
Client that owns the set.
unsigned int excluded_generations_size
Number of elements in array excluded_generations.
unsigned int current_generation
Current generation, that is, number of previously executed operations and lazy copies on the underlyi...