two-peer set operations More...
Go to the source code of this file.
Functions | |
int | check_union_p2p_strata_estimator (void *cls, const struct StrataEstimatorMessage *msg) |
Handle a strata estimator from a remote peer. More... | |
void | handle_union_p2p_strata_estimator (void *cls, const struct StrataEstimatorMessage *msg) |
Handle a strata estimator from a remote peer. More... | |
int | check_union_p2p_ibf (void *cls, const struct IBFMessage *msg) |
Check an IBF message from a remote peer. More... | |
void | handle_union_p2p_ibf (void *cls, const struct IBFMessage *msg) |
Handle an IBF message from a remote peer. More... | |
int | check_union_p2p_elements (void *cls, const struct GNUNET_SET_ElementMessage *emsg) |
Check an element message from a remote peer. More... | |
void | handle_union_p2p_elements (void *cls, const struct GNUNET_SET_ElementMessage *emsg) |
Handle an element message from a remote peer. More... | |
int | check_union_p2p_full_element (void *cls, const struct GNUNET_SET_ElementMessage *emsg) |
Check a full element message from a remote peer. More... | |
void | handle_union_p2p_full_element (void *cls, const struct GNUNET_SET_ElementMessage *emsg) |
Handle an element message from a remote peer. More... | |
int | check_union_p2p_inquiry (void *cls, const struct InquiryMessage *msg) |
Send offers (for GNUNET_Hash-es) in response to inquiries (for IBF_Key-s). More... | |
void | handle_union_p2p_inquiry (void *cls, const struct InquiryMessage *msg) |
Send offers (for GNUNET_Hash-es) in response to inquiries (for IBF_Key-s). More... | |
void | handle_union_p2p_request_full (void *cls, const struct GNUNET_MessageHeader *mh) |
Handle a request for full set transmission. More... | |
void | handle_union_p2p_full_done (void *cls, const struct GNUNET_MessageHeader *mh) |
Handle a "full done" message. More... | |
int | check_union_p2p_demand (void *cls, const struct GNUNET_MessageHeader *mh) |
Check a demand by the other peer for elements based on a list of struct GNUNET_HashCode s. More... | |
void | handle_union_p2p_demand (void *cls, const struct GNUNET_MessageHeader *mh) |
Handle a demand by the other peer for elements based on a list of struct GNUNET_HashCode s. More... | |
int | check_union_p2p_offer (void *cls, const struct GNUNET_MessageHeader *mh) |
Check offer (of struct GNUNET_HashCode s). More... | |
void | handle_union_p2p_offer (void *cls, const struct GNUNET_MessageHeader *mh) |
Handle offers (of struct GNUNET_HashCode s) and respond with demands (of struct GNUNET_HashCode s). More... | |
void | handle_union_p2p_done (void *cls, const struct GNUNET_MessageHeader *mh) |
Handle a done message from a remote peer. More... | |
void | handle_union_p2p_over (void *cls, const struct GNUNET_MessageHeader *mh) |
Handle an over message from a remote peer. More... | |
two-peer set operations
Definition in file gnunet-service-set_union.h.
int check_union_p2p_strata_estimator | ( | void * | cls, |
const struct StrataEstimatorMessage * | msg | ||
) |
Handle a strata estimator from a remote peer.
cls | the union operation |
msg | the message |
Definition at line 821 of file gnunet-service-set_union.c.
References GNUNET_break, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_SEC, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, IBF_BUCKET_SIZE, msg, op, PHASE_EXPECT_SE, SE_IBF_SIZE, SE_STRATA_COUNT, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.
void handle_union_p2p_strata_estimator | ( | void * | cls, |
const struct StrataEstimatorMessage * | msg | ||
) |
Handle a strata estimator from a remote peer.
cls | the union operation |
msg | the message |
Definition at line 853 of file gnunet-service-set_union.c.
References _GSS_statistics, removetrailingwhitespace::f, fail_union_operation(), get_order_from_difference(), getenv(), GNUNET_assert, GNUNET_break, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_REQUEST_FULL, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_SEC, GNUNET_MQ_msg_header, GNUNET_MQ_send(), GNUNET_NO, GNUNET_ntohll(), GNUNET_OK, GNUNET_STATISTICS_update(), GNUNET_YES, LOG, msg, op, PHASE_EXPECT_IBF, SE_IBF_HASH_NUM, SE_IBF_SIZE, SE_STRATA_COUNT, send_full_set(), send_ibf(), GNUNET_MessageHeader::size, strata_estimator_create(), strata_estimator_destroy(), strata_estimator_difference(), strata_estimator_read(), and GNUNET_MessageHeader::type.
int check_union_p2p_ibf | ( | void * | cls, |
const struct IBFMessage * | msg | ||
) |
Check an IBF message from a remote peer.
Reassemble the IBF from multiple pieces, and process the whole IBF once possible.
cls | the union operation |
msg | the header of the message |
Definition at line 1210 of file gnunet-service-set_union.c.
References GNUNET_break_op, GNUNET_OK, GNUNET_SET_OPERATION_UNION, GNUNET_SYSERR, IBF_BUCKET_SIZE, msg, op, PHASE_EXPECT_IBF, PHASE_EXPECT_IBF_CONT, PHASE_INVENTORY_PASSIVE, and GNUNET_MessageHeader::size.
void handle_union_p2p_ibf | ( | void * | cls, |
const struct IBFMessage * | msg | ||
) |
Handle an IBF message from a remote peer.
Reassemble the IBF from multiple pieces, and process the whole IBF once possible.
cls | the union operation |
msg | the header of the message |
Definition at line 1273 of file gnunet-service-set_union.c.
References decode_and_send(), fail_union_operation(), GNUNET_assert, GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, IBF_BUCKET_SIZE, ibf_create(), ibf_read_slice(), LOG, msg, op, PHASE_EXPECT_IBF, PHASE_EXPECT_IBF_CONT, PHASE_INVENTORY_ACTIVE, PHASE_INVENTORY_PASSIVE, SE_IBF_HASH_NUM, and GNUNET_MessageHeader::size.
int check_union_p2p_elements | ( | void * | cls, |
const struct GNUNET_SET_ElementMessage * | emsg | ||
) |
Check an element message from a remote peer.
cls | the union operation |
emsg | the message |
Definition at line 1489 of file gnunet-service-set_union.c.
References GNUNET_break_op, GNUNET_CONTAINER_multihashmap_size(), GNUNET_OK, GNUNET_SET_OPERATION_UNION, GNUNET_SYSERR, and op.
void handle_union_p2p_elements | ( | void * | cls, |
const struct GNUNET_SET_ElementMessage * | emsg | ||
) |
Handle an element message from a remote peer.
Sent by the other peer either because we decoded an IBF and placed a demand, or because the other peer switched to full set transmission.
cls | the union operation |
emsg | the message |
Definition at line 1517 of file gnunet-service-set_union.c.
References _GSS_statistics, GNUNET_SET_Element::data, ElementEntry::element, ElementEntry::element_hash, GNUNET_SET_ElementMessage::element_type, GNUNET_SET_Element::element_type, fail_union_operation(), GNUNET_break, GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_CONTAINER_multihashmap_remove(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_h2s(), GNUNET_malloc, GNUNET_memcpy, GNUNET_NO, GNUNET_SET_element_hash(), GNUNET_SET_RESULT_ADDED, GNUNET_SET_RESULT_SYMMETRIC, GNUNET_SET_STATUS_ADD_LOCAL, GNUNET_SET_STATUS_OK, GNUNET_STATISTICS_update(), GNUNET_YES, GNUNET_SET_ElementMessage::header, LOG, maybe_finish(), op, op_get_element(), op_register_element(), KeyEntry::received, ElementEntry::remote, send_client_element(), GNUNET_MessageHeader::size, and GNUNET_SET_Element::size.
int check_union_p2p_full_element | ( | void * | cls, |
const struct GNUNET_SET_ElementMessage * | emsg | ||
) |
Check a full element message from a remote peer.
cls | the union operation |
emsg | the message |
Definition at line 1620 of file gnunet-service-set_union.c.
References GNUNET_break_op, GNUNET_OK, GNUNET_SET_OPERATION_UNION, GNUNET_SYSERR, and op.
void handle_union_p2p_full_element | ( | void * | cls, |
const struct GNUNET_SET_ElementMessage * | emsg | ||
) |
Handle an element message from a remote peer.
cls | the union operation |
emsg | the message |
Definition at line 1642 of file gnunet-service-set_union.c.
References _GSS_statistics, GNUNET_SET_Element::data, ElementEntry::element, ElementEntry::element_hash, GNUNET_SET_ElementMessage::element_type, GNUNET_SET_Element::element_type, fail_union_operation(), GNUNET_break, GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_h2s(), GNUNET_malloc, GNUNET_memcpy, GNUNET_NO, GNUNET_SET_element_hash(), GNUNET_SET_RESULT_ADDED, GNUNET_SET_RESULT_SYMMETRIC, GNUNET_SET_STATUS_ADD_LOCAL, GNUNET_SET_STATUS_OK, GNUNET_STATISTICS_update(), GNUNET_YES, GNUNET_SET_ElementMessage::header, LOG, op, op_get_element(), op_register_element(), KeyEntry::received, ElementEntry::remote, send_client_element(), GNUNET_MessageHeader::size, and GNUNET_SET_Element::size.
int check_union_p2p_inquiry | ( | void * | cls, |
const struct InquiryMessage * | msg | ||
) |
Send offers (for GNUNET_Hash-es) in response to inquiries (for IBF_Key-s).
cls | the union operation |
msg | the message |
Definition at line 1737 of file gnunet-service-set_union.c.
References GNUNET_break_op, GNUNET_OK, GNUNET_SET_OPERATION_UNION, GNUNET_SYSERR, msg, op, PHASE_INVENTORY_PASSIVE, and GNUNET_MessageHeader::size.
void handle_union_p2p_inquiry | ( | void * | cls, |
const struct InquiryMessage * | msg | ||
) |
Send offers (for GNUNET_Hash-es) in response to inquiries (for IBF_Key-s).
cls | the union operation |
msg | the message |
Definition at line 1773 of file gnunet-service-set_union.c.
References GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, LOG, msg, op, send_offers_for_key(), GNUNET_MessageHeader::size, and unsalt_key().
void handle_union_p2p_request_full | ( | void * | cls, |
const struct GNUNET_MessageHeader * | mh | ||
) |
Handle a request for full set transmission.
cls | closure, a set union operation |
mh | the demand message |
Definition at line 1843 of file gnunet-service-set_union.c.
References fail_union_operation(), GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_SET_OPERATION_UNION, LOG, op, PHASE_EXPECT_IBF, and send_full_set().
void handle_union_p2p_full_done | ( | void * | cls, |
const struct GNUNET_MessageHeader * | mh | ||
) |
Handle a "full done" message.
cls | closure, a set union operation |
mh | the demand message |
Definition at line 1877 of file gnunet-service-set_union.c.
References _GSS_operation_destroy2(), fail_union_operation(), GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_CONTAINER_multihashmap32_iterate(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_FULL_DONE, GNUNET_MQ_msg_header, GNUNET_MQ_send(), LOG, op, PHASE_DONE, PHASE_EXPECT_IBF, PHASE_FULL_SENDING, send_client_done(), and send_missing_full_elements_iter().
int check_union_p2p_demand | ( | void * | cls, |
const struct GNUNET_MessageHeader * | mh | ||
) |
Check a demand by the other peer for elements based on a list of struct GNUNET_HashCode
s.
cls | closure, a set union operation |
mh | the demand message |
Definition at line 1938 of file gnunet-service-set_union.c.
References GNUNET_break_op, GNUNET_OK, GNUNET_SET_OPERATION_UNION, GNUNET_SYSERR, mh, and op.
void handle_union_p2p_demand | ( | void * | cls, |
const struct GNUNET_MessageHeader * | mh | ||
) |
Handle a demand by the other peer for elements based on a list of struct GNUNET_HashCode
s.
cls | closure, a set union operation |
mh | the demand message |
Definition at line 1969 of file gnunet-service-set_union.c.
References _GSS_is_element_of_operation(), _GSS_statistics, GNUNET_SET_Element::data, ElementEntry::element, ElementEntry::element_hash, GNUNET_SET_ElementMessage::element_type, GNUNET_SET_Element::element_type, fail_union_operation(), GNUNET_break, GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_CONTAINER_multihashmap_get(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_memcpy, GNUNET_MESSAGE_TYPE_SET_P2P_ELEMENTS, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_NO, GNUNET_SET_RESULT_ADDED, GNUNET_SET_RESULT_SYMMETRIC, GNUNET_SET_STATUS_ADD_REMOTE, GNUNET_STATISTICS_update(), LOG, mh, op, GNUNET_SET_ElementMessage::reserved, send_client_element(), and GNUNET_SET_Element::size.
int check_union_p2p_offer | ( | void * | cls, |
const struct GNUNET_MessageHeader * | mh | ||
) |
Check offer (of struct GNUNET_HashCode
s).
cls | the union operation |
mh | the message |
Definition at line 2045 of file gnunet-service-set_union.c.
References GNUNET_break_op, GNUNET_OK, GNUNET_SET_OPERATION_UNION, GNUNET_SYSERR, mh, op, PHASE_INVENTORY_ACTIVE, and PHASE_INVENTORY_PASSIVE.
void handle_union_p2p_offer | ( | void * | cls, |
const struct GNUNET_MessageHeader * | mh | ||
) |
Handle offers (of struct GNUNET_HashCode
s) and respond with demands (of struct GNUNET_HashCode
s).
cls | the union operation |
mh | the message |
Definition at line 2083 of file gnunet-service-set_union.c.
References _GSS_is_element_of_operation(), GNUNET_assert, GNUNET_CADET_receive_done(), GNUNET_CONTAINER_multihashmap_contains(), GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST, GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_memcpy, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_DEMAND, GNUNET_MQ_msg_header_extra, GNUNET_MQ_send(), GNUNET_OK, GNUNET_YES, LOG, mh, and op.
void handle_union_p2p_done | ( | void * | cls, |
const struct GNUNET_MessageHeader * | mh | ||
) |
Handle a done message from a remote peer.
cls | the union operation |
mh | the message |
Definition at line 2144 of file gnunet-service-set_union.c.
References fail_union_operation(), GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_SET_OPERATION_UNION, LOG, maybe_finish(), op, PHASE_FINISH_CLOSING, PHASE_FINISH_WAITING, PHASE_INVENTORY_ACTIVE, and PHASE_INVENTORY_PASSIVE.
void handle_union_p2p_over | ( | void * | cls, |
const struct GNUNET_MessageHeader * | mh | ||
) |
Handle an over message from a remote peer.
cls | the union operation |
mh | the message |
Definition at line 2198 of file gnunet-service-set_union.c.
References send_client_done().