2 This file is part of GNUnet
3 (C) 2013 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
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 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file set/gnunet-service-set_intersection.c
23 * @brief two-peer set intersection
24 * @author Christian Fuchs
27 #include "gnunet_util_lib.h"
28 #include "gnunet-service-set.h"
29 #include "gnunet_block_lib.h"
30 #include "set_protocol.h"
33 #define BLOOMFILTER_SIZE GNUNET_CRYPTO_HASH_LENGTH
35 * Current phase we are in for a intersection operation.
37 enum IntersectionOperationPhase
40 * Alices has suggested an operation to bob,
41 * and is waiting for a bf or session end.
45 * Bob has accepted the operation, Bob and Alice are now exchanging bfs
46 * until one notices the their element count is equal
50 * if both peers have an equal peercount, they enter this state for
51 * one more turn, to see if they actually have agreed on a correct set.
52 * if a peer finds the same element count after the next iteration,
53 * it ends the the session
57 * The protocol is over.
58 * Results may still have to be sent to the client.
65 * State of an evaluate operation
71 * The bf we currently receive
73 struct GNUNET_CONTAINER_BloomFilter *remote_bf;
76 * BF of the set's element.
78 struct GNUNET_CONTAINER_BloomFilter *local_bf;
81 * for multipart msgs we have to store the bloomfilter-data until we fully sent it.
86 * for multipart msgs we have to store the bloomfilter-data until we fully sent it.
88 uint32_t local_bf_data_size;
91 * Current state of the operation.
93 enum IntersectionOperationPhase phase;
96 * Generation in which the operation handle
99 unsigned int generation_created;
102 * Maps element-id-hashes to 'elements in our set'.
104 struct GNUNET_CONTAINER_MultiHashMap *my_elements;
107 * Current element count contained within contained_elements
109 uint32_t my_element_count;
112 * Iterator for sending elements on the key to element mapping to the client.
114 struct GNUNET_CONTAINER_MultiHashMapIterator *full_result_iter;
117 * Evaluate operations are held in
120 struct OperationState *next;
123 * Evaluate operations are held in
126 struct OperationState *prev;
129 * Did we send the client that we are done?
131 int client_done_sent;
136 * Extra state required for efficient set intersection.
141 * Number of currently valid elements in the set which have not been removed
143 uint32_t current_set_element_count;
150 * fills the contained-elements hashmap with all relevant
151 * elements and adds their mutated hashes to our local bloomfilter with mutator+1
154 * @param key current key code
155 * @param value value in the hash map
156 * @return #GNUNET_YES if we should continue to
161 iterator_initialization_by_alice (void *cls,
162 const struct GNUNET_HashCode *key,
165 struct ElementEntry *ee = value;
166 struct Operation *op = cls;
167 struct GNUNET_HashCode mutated_hash;
169 //only consider this element, if it is valid for us
170 if ((op->generation_created >= ee->generation_removed)
171 || (op->generation_created < ee->generation_added))
174 // not contained according to bob's bloomfilter
175 GNUNET_BLOCK_mingle_hash(&ee->element_hash,
178 if (GNUNET_NO == GNUNET_CONTAINER_bloomfilter_test (op->state->remote_bf,
182 op->state->my_element_count++;
183 GNUNET_assert (GNUNET_YES ==
184 GNUNET_CONTAINER_multihashmap_put (op->state->my_elements,
185 &ee->element_hash, ee,
186 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
188 /* create our own bloomfilter with salt+1 */
189 GNUNET_BLOCK_mingle_hash (&ee->element_hash,
192 GNUNET_CONTAINER_bloomfilter_add (op->state->local_bf,
199 * fills the contained-elements hashmap with all relevant
200 * elements and adds their mutated hashes to our local bloomfilter
203 * @param key current key code
204 * @param value value in the hash map
205 * @return #GNUNET_YES if we should continue to
210 iterator_initialization (void *cls,
211 const struct GNUNET_HashCode *key,
214 struct ElementEntry *ee = value;
215 struct Operation *op = cls;
216 struct GNUNET_HashCode mutated_hash;
218 //only consider this element, if it is valid for us
219 if ((op->generation_created >= ee->generation_removed)
220 || (op->generation_created < ee->generation_added))
223 GNUNET_assert (GNUNET_YES ==
224 GNUNET_CONTAINER_multihashmap_put (op->state->my_elements,
225 &ee->element_hash, ee,
226 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
227 GNUNET_BLOCK_mingle_hash (&ee->element_hash,
230 GNUNET_CONTAINER_bloomfilter_add (op->state->local_bf,
237 * removes element from a hashmap if it is not contained within the
238 * provided remote bloomfilter. Then, fill our new bloomfilter.
241 * @param key current key code
242 * @param value value in the hash map
243 * @return #GNUNET_YES if we should continue to
248 iterator_bf_round (void *cls,
249 const struct GNUNET_HashCode *key,
252 struct ElementEntry *ee = value;
253 struct Operation *op = cls;
254 struct GNUNET_HashCode mutated_hash;
256 GNUNET_BLOCK_mingle_hash(&ee->element_hash, op->spec->salt, &mutated_hash);
259 GNUNET_CONTAINER_bloomfilter_test (op->state->remote_bf,
262 op->state->my_element_count--;
263 GNUNET_assert (GNUNET_YES ==
264 GNUNET_CONTAINER_multihashmap_remove (op->state->my_elements,
269 GNUNET_BLOCK_mingle_hash(&ee->element_hash,
272 GNUNET_CONTAINER_bloomfilter_add (op->state->local_bf,
279 * Inform the client that the union operation has failed,
280 * and proceed to destroy the evaluate operation.
282 * @param op the intersection operation to fail
285 fail_intersection_operation (struct Operation *op)
287 struct GNUNET_MQ_Envelope *ev;
288 struct GNUNET_SET_ResultMessage *msg;
290 if (op->state->my_elements)
291 GNUNET_CONTAINER_multihashmap_destroy(op->state->my_elements);
293 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "intersection operation failed\n");
295 ev = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_RESULT);
296 msg->result_status = htons (GNUNET_SET_STATUS_FAILURE);
297 msg->request_id = htonl (op->spec->client_request_id);
298 msg->element_type = htons (0);
299 GNUNET_MQ_send (op->spec->set->client_mq, ev);
300 _GSS_operation_destroy (op);
305 * Send a request for the evaluate operation to a remote peer
307 * @param eo operation with the other peer
310 send_operation_request (struct Operation *op)
312 struct GNUNET_MQ_Envelope *ev;
313 struct OperationRequestMessage *msg;
315 ev = GNUNET_MQ_msg_nested_mh (msg, GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST,
316 op->spec->context_msg);
320 /* the context message is too large */
322 GNUNET_SERVER_client_disconnect (op->spec->set->client);
325 msg->operation = htonl (GNUNET_SET_OPERATION_INTERSECTION);
326 msg->app_id = op->spec->app_id;
327 msg->salt = htonl (op->spec->salt);
328 msg->element_count = htonl(op->state->my_element_count);
330 GNUNET_MQ_send (op->mq, ev);
332 if (NULL != op->spec->context_msg)
333 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sent op request with context message\n");
335 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sent op request without context message\n");
337 if (NULL != op->spec->context_msg)
339 GNUNET_free (op->spec->context_msg);
340 op->spec->context_msg = NULL;
346 * Send a bloomfilter to our peer.
347 * that the operation is over.
348 * After the result done message has been sent to the client,
349 * destroy the evaluate operation.
351 * @param eo intersection operation
354 send_bloomfilter (struct Operation *op)
356 struct GNUNET_MQ_Envelope *ev;
357 struct BFMessage *msg;
360 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending bf of size %u\n");
362 // send our bloomfilter
363 bf_size = GNUNET_CONTAINER_bloomfilter_get_size (op->state->local_bf);
364 if ( GNUNET_SERVER_MAX_MESSAGE_SIZE <= bf_size + sizeof(struct BFMessage))
367 ev = GNUNET_MQ_msg_extra (msg, bf_size, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_BF);
369 GNUNET_CONTAINER_bloomfilter_free (op->state->local_bf);
370 op->state->local_bf = NULL;
373 msg->sender_element_count = htonl (op->state->my_element_count);
374 msg->bloomfilter_length = htonl (bf_size);
375 msg->bloomfilter_offset = htonl (0);
376 msg->sender_mutator = htonl (op->spec->salt);
378 GNUNET_MQ_send (op->mq, ev);
381 op->state->local_bf_data = (char *)GNUNET_malloc(bf_size);
382 GNUNET_assert (GNUNET_SYSERR !=
383 GNUNET_CONTAINER_bloomfilter_get_raw_data (op->state->local_bf,
384 op->state->local_bf_data,
386 op->state->local_bf_data_size = bf_size;
387 send_bloomfilter_multipart (op, 0);
393 * Signal to the client that the operation has finished and
394 * destroy the operation.
396 * @param cls operation to destroy
399 send_client_done_and_destroy (void *cls)
401 struct Operation *op = cls;
402 struct GNUNET_MQ_Envelope *ev;
403 struct GNUNET_SET_ResultMessage *rm;
404 ev = GNUNET_MQ_msg (rm, GNUNET_MESSAGE_TYPE_SET_RESULT);
405 rm->request_id = htonl (op->spec->client_request_id);
406 rm->result_status = htons (GNUNET_SET_STATUS_DONE);
407 rm->element_type = htons (0);
408 GNUNET_MQ_send (op->spec->set->client_mq, ev);
409 _GSS_operation_destroy (op);
414 * Send all elements in the full result iterator.
416 * @param cls operation
419 send_remaining_elements (void *cls)
421 struct Operation *op = cls;
422 struct ElementEntry *remaining; //TODO rework this, key entry does not exist here
423 struct GNUNET_MQ_Envelope *ev;
424 struct GNUNET_SET_ResultMessage *rm;
425 struct GNUNET_SET_Element *element;
428 res = GNUNET_CONTAINER_multihashmap_iterator_next (op->state->full_result_iter, NULL, (const void **) &remaining);
429 if (GNUNET_NO == res) {
430 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending done and destroy because iterator ran out\n");
431 send_client_done_and_destroy (op);
435 element = &remaining->element;
436 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending element (size %u) to client (full set)\n", element->size);
437 GNUNET_assert (0 != op->spec->client_request_id);
439 ev = GNUNET_MQ_msg_extra (rm, element->size, GNUNET_MESSAGE_TYPE_SET_RESULT);
440 GNUNET_assert (NULL != ev);
442 rm->result_status = htons (GNUNET_SET_STATUS_OK);
443 rm->request_id = htonl (op->spec->client_request_id);
444 rm->element_type = element->type;
445 memcpy (&rm[1], element->data, element->size);
447 GNUNET_MQ_notify_sent (ev, send_remaining_elements, op);
448 GNUNET_MQ_send (op->spec->set->client_mq, ev);
453 * Inform the peer that this operation is complete.
455 * @param eo the intersection operation to fail
458 send_peer_done (struct Operation *op)
460 struct GNUNET_MQ_Envelope *ev;
462 op->state->phase = PHASE_FINISHED;
463 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Intersection succeeded, sending DONE\n");
464 GNUNET_CONTAINER_bloomfilter_free (op->state->local_bf);
465 op->state->local_bf = NULL;
467 ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SET_P2P_DONE);
468 GNUNET_MQ_send (op->mq, ev);
473 * Handle an BF message from a remote peer.
475 * @param cls the intersection operation
476 * @param mh the header of the message
479 handle_p2p_bf (void *cls, const struct GNUNET_MessageHeader *mh)
481 struct Operation *op = cls;
482 const struct BFMessage *msg = (const struct BFMessage *) mh;
483 uint32_t old_elements;
484 uint32_t peer_elements;
486 old_elements = op->state->my_element_count;
487 op->spec->salt = ntohl (msg->sender_mutator);
489 op->state->remote_bf = GNUNET_CONTAINER_bloomfilter_init ((const char*) &msg[1],
491 ntohl (msg->bloomfilter_length));
492 op->state->local_bf = GNUNET_CONTAINER_bloomfilter_init (NULL,
494 GNUNET_CONSTANTS_BLOOMFILTER_K);
495 switch (op->state->phase)
498 // If we are ot our first msg
499 op->state->my_elements = GNUNET_CONTAINER_multihashmap_create (op->state->my_element_count, GNUNET_YES);
501 GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->elements,
502 &iterator_initialization_by_alice,
505 case PHASE_BF_EXCHANGE:
506 case PHASE_MAYBE_FINISHED:
507 // if we are bob or alice and are continuing operation
508 GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->elements,
514 fail_intersection_operation(op);
516 // the iterators created a new BF with salt+1
517 // the peer needs this information for decoding the next BF
518 // this behavior can be modified at will later on.
521 GNUNET_CONTAINER_bloomfilter_free (op->state->remote_bf);
522 op->state->remote_bf = NULL;
524 peer_elements = ntohl(msg->sender_element_count);
525 if ((op->state->phase == PHASE_MAYBE_FINISHED)
526 && (old_elements == op->state->my_element_count)
527 && (op->state->my_element_count == peer_elements)){
528 // In the last round we though we were finished, we now know this is correct
533 op->state->phase = PHASE_BF_EXCHANGE;
534 // maybe we are finished, but we do one more round to make certain
535 // we don't have false positives ...
536 if (op->state->my_element_count == peer_elements)
537 op->state->phase = PHASE_MAYBE_FINISHED;
539 send_bloomfilter (op);
544 * Handle an BF message from a remote peer.
546 * @param cls the intersection operation
547 * @param mh the header of the message
550 handle_p2p_element_info (void *cls, const struct GNUNET_MessageHeader *mh)
552 struct Operation *op = cls;
553 struct BFMessage *msg = (struct BFMessage *) mh;
555 op->spec->remote_element_count = ntohl(msg->sender_element_count);
556 if ((op->state->phase != PHASE_INITIAL)
557 || (op->state->my_element_count > op->spec->remote_element_count)){
559 fail_intersection_operation(op);
562 op->state->phase = PHASE_BF_EXCHANGE;
563 op->state->my_elements = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_YES);
565 op->state->local_bf = GNUNET_CONTAINER_bloomfilter_init (NULL,
567 GNUNET_CONSTANTS_BLOOMFILTER_K);
568 GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->elements,
569 &iterator_initialization,
572 GNUNET_CONTAINER_bloomfilter_free (op->state->remote_bf);
573 op->state->remote_bf = NULL;
575 if (op->state->my_element_count == ntohl (msg->sender_element_count))
576 op->state->phase = PHASE_MAYBE_FINISHED;
578 send_bloomfilter (op);
583 * Send our element to the peer, in case our element count is lower than his
585 * @param eo intersection operation
588 send_element_count (struct Operation *op)
590 struct GNUNET_MQ_Envelope *ev;
591 struct BFMessage *msg;
593 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending element count (bf_msg)\n");
595 // just send our element count, as the other peer must start
596 ev = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_ELEMENT_INFO);
598 msg->sender_element_count = htonl (op->state->my_element_count);
599 msg->bloomfilter_length = htonl (0);
600 msg->sender_mutator = htonl (0);
602 GNUNET_MQ_send (op->mq, ev);
607 * Send a result message to the client indicating
608 * that the operation is over.
609 * After the result done message has been sent to the client,
610 * destroy the evaluate operation.
612 * @param op intersection operation
615 finish_and_destroy (struct Operation *op)
617 GNUNET_assert (GNUNET_NO == op->state->client_done_sent);
619 if (GNUNET_SET_RESULT_FULL == op->spec->result_mode)
621 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending full result set\n");
622 op->state->full_result_iter =
623 GNUNET_CONTAINER_multihashmap_iterator_create (op->state->my_elements);
624 send_remaining_elements (op);
627 send_client_done_and_destroy (op);
632 * Handle a done message from a remote peer
634 * @param cls the union operation
635 * @param mh the message
638 handle_p2p_done (void *cls,
639 const struct GNUNET_MessageHeader *mh)
641 struct Operation *op = cls;
643 if ((op->state->phase = PHASE_FINISHED) || (op->state->phase = PHASE_MAYBE_FINISHED)){
644 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got final DONE\n");
646 finish_and_destroy (op);
651 fail_intersection_operation (op);
656 * Evaluate a union operation with
659 * @param op operation to evaluate
662 intersection_evaluate (struct Operation *op)
664 op->state = GNUNET_new (struct OperationState);
665 /* we started the operation, thus we have to send the operation request */
666 op->state->phase = PHASE_INITIAL;
667 op->state->my_elements = GNUNET_CONTAINER_multihashmap_create(1, GNUNET_YES);
668 op->state->my_element_count = op->spec->set->state->current_set_element_count;
670 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
671 "evaluating intersection operation");
672 send_operation_request (op);
677 * Accept an union operation request from a remote peer.
678 * Only initializes the private operation state.
680 * @param op operation that will be accepted as a union operation
683 intersection_accept (struct Operation *op)
685 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "accepting set union operation\n");
686 op->state = GNUNET_new (struct OperationState);
687 op->state->my_elements = GNUNET_CONTAINER_multihashmap_create(1, GNUNET_YES);
688 op->state->my_element_count = op->spec->set->state->current_set_element_count;
690 // if Alice (the peer) has more elements than Bob (us), she should start
691 if (op->spec->remote_element_count < op->state->my_element_count){
692 op->state->phase = PHASE_INITIAL;
693 send_element_count(op);
696 // create a new bloomfilter in case we have fewer elements
697 op->state->phase = PHASE_BF_EXCHANGE;
698 op->state->local_bf = GNUNET_CONTAINER_bloomfilter_init (NULL,
700 GNUNET_CONSTANTS_BLOOMFILTER_K);
701 GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->elements,
702 &iterator_initialization,
704 send_bloomfilter (op);
709 * Create a new set supporting the intersection operation
711 * @return the newly created set
713 static struct SetState *
714 intersection_set_create ()
716 struct SetState *set_state;
718 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
719 "intersection set created\n");
720 set_state = GNUNET_new (struct SetState);
721 set_state->current_set_element_count = 0;
728 * Add the element from the given element message to the set.
730 * @param set_state state of the set want to add to
731 * @param ee the element to add to the set
734 intersection_add (struct SetState *set_state,
735 struct ElementEntry *ee)
737 GNUNET_assert(0 < set_state->current_set_element_count);
738 set_state->current_set_element_count++;
743 * Destroy a set that supports the intersection operation
745 * @param set_state the set to destroy
748 intersection_set_destroy (struct SetState *set_state)
750 GNUNET_free (set_state);
755 * Remove the element given in the element message from the set.
757 * @param set_state state of the set to remove from
758 * @param element set element to remove
761 intersection_remove (struct SetState *set_state,
762 struct ElementEntry *element)
764 GNUNET_assert(0 < set_state->current_set_element_count);
765 set_state->current_set_element_count--;
770 * Dispatch messages for a intersection operation.
772 * @param eo the state of the intersection evaluate operation
773 * @param mh the received message
774 * @return #GNUNET_SYSERR if the tunnel should be disconnected,
775 * #GNUNET_OK otherwise
778 intersection_handle_p2p_message (struct Operation *op,
779 const struct GNUNET_MessageHeader *mh)
781 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "received p2p message (t: %u, s: %u)\n",
782 ntohs (mh->type), ntohs (mh->size));
783 switch (ntohs (mh->type))
785 /* this message handler is not active until after we received an
786 * operation request message, thus the ops request is not handled here
788 case GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_ELEMENT_INFO:
789 handle_p2p_element_info (op, mh);
791 case GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_BF:
792 handle_p2p_bf (op, mh);
794 case GNUNET_MESSAGE_TYPE_SET_P2P_DONE:
795 handle_p2p_done (op, mh);
798 /* something wrong with mesh's message handlers? */
806 * handler for peer-disconnects, notifies the client about the aborted operation
808 * @param op the destroyed operation
811 intersection_peer_disconnect (struct Operation *op)
813 if (PHASE_FINISHED != op->state->phase)
815 struct GNUNET_MQ_Envelope *ev;
816 struct GNUNET_SET_ResultMessage *msg;
818 ev = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_RESULT);
819 msg->request_id = htonl (op->spec->client_request_id);
820 msg->result_status = htons (GNUNET_SET_STATUS_FAILURE);
821 msg->element_type = htons (0);
822 GNUNET_MQ_send (op->spec->set->client_mq, ev);
823 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "other peer disconnected prematurely\n");
824 _GSS_operation_destroy (op);
827 // else: the session has already been concluded
828 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "other peer disconnected (finished)\n");
829 if (GNUNET_NO == op->state->client_done_sent)
830 finish_and_destroy (op);
835 * Destroy the union operation. Only things specific to the union operation are destroyed.
837 * @param op union operation to destroy
840 intersection_op_cancel (struct Operation *op)
842 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "destroying intersection op\n");
843 /* check if the op was canceled twice */
844 GNUNET_assert (NULL != op->state);
845 if (NULL != op->state->remote_bf)
847 GNUNET_CONTAINER_bloomfilter_free (op->state->remote_bf);
848 op->state->remote_bf = NULL;
850 if (NULL != op->state->local_bf)
852 GNUNET_CONTAINER_bloomfilter_free (op->state->local_bf);
853 op->state->local_bf = NULL;
855 if (NULL != op->state->my_elements)
857 // no need to free the elements, they are still part of the set
858 GNUNET_CONTAINER_multihashmap_destroy (op->state->my_elements);
859 op->state->my_elements = NULL;
861 GNUNET_free (op->state);
863 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "destroying intersection op done\n");
867 _GSS_intersection_vt ()
869 static const struct SetVT intersection_vt = {
870 .create = &intersection_set_create,
871 .msg_handler = &intersection_handle_p2p_message,
872 .add = &intersection_add,
873 .remove = &intersection_remove,
874 .destroy_set = &intersection_set_destroy,
875 .evaluate = &intersection_evaluate,
876 .accept = &intersection_accept,
877 .peer_disconnect = &intersection_peer_disconnect,
878 .cancel = &intersection_op_cancel,
881 return &intersection_vt;