Fix potential NULL dereference warning.
[oweals/gnunet.git] / src / set / gnunet-service-set_intersection.h
1
2 /*
3       This file is part of GNUnet
4       Copyright (C) 2013-2017 GNUnet e.V.
5
6       GNUnet is free software; you can redistribute it and/or modify
7       it under the terms of the GNU General Public License as published
8       by the Free Software Foundation; either version 3, or (at your
9       option) any later version.
10
11       GNUnet is distributed in the hope that it will be useful, but
12       WITHOUT ANY WARRANTY; without even the implied warranty of
13       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14       General Public License for more details.
15
16       You should have received a copy of the GNU General Public License
17       along with GNUnet; see the file COPYING.  If not, write to the
18       Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19       Boston, MA 02110-1301, USA.
20 */
21 /**
22  * @file set/gnunet-service-set_intersection.h
23  * @brief two-peer set operations
24  * @author Florian Dold
25  * @author Christian Grothoff
26  */
27 #ifndef GNUNET_SERVICE_SET_INTERSECTION_H
28 #define GNUNET_SERVICE_SET_INTERSECTION_H
29
30 #include "gnunet-service-set.h"
31
32
33 /**
34  * Check an BF message from a remote peer.
35  *
36  * @param cls the intersection operation
37  * @param msg the header of the message
38  * @return #GNUNET_OK if @a msg is well-formed
39  */
40 int
41 check_intersection_p2p_bf (void *cls,
42                            const struct BFMessage *msg);
43
44
45 /**
46  * Handle an BF message from a remote peer.
47  *
48  * @param cls the intersection operation
49  * @param msg the header of the message
50  */
51 void
52 handle_intersection_p2p_bf (void *cls,
53                             const struct BFMessage *msg);
54
55
56 /**
57  * Handle the initial `struct IntersectionElementInfoMessage` from a
58  * remote peer.
59  *
60  * @param cls the intersection operation
61  * @param mh the header of the message
62  */
63 void
64 handle_intersection_p2p_element_info (void *cls,
65                                       const struct IntersectionElementInfoMessage *msg);
66
67
68 /**
69  * Handle a done message from a remote peer
70  *
71  * @param cls the intersection operation
72  * @param mh the message
73  */
74 void
75 handle_intersection_p2p_done (void *cls,
76                               const struct IntersectionDoneMessage *idm);
77
78
79 #endif