aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh_connection.h
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-10-08 11:08:09 +0000
committerBart Polot <bart@net.in.tum.de>2013-10-08 11:08:09 +0000
commitb2fadf8c7db18c02814526bf02b3cd05d4389c67 (patch)
tree41b3ce378081244a3372741ac061e46ce85e4537 /src/mesh/gnunet-service-mesh_connection.h
parent39780082b7e3d62ac566bdbfff621b7802cd7d61 (diff)
downloadgnunet-b2fadf8c7db18c02814526bf02b3cd05d4389c67.tar.gz
gnunet-b2fadf8c7db18c02814526bf02b3cd05d4389c67.zip
- export core handlers from connection: all p2p messages are connection related but core is connected to peers
Diffstat (limited to 'src/mesh/gnunet-service-mesh_connection.h')
-rw-r--r--src/mesh/gnunet-service-mesh_connection.h131
1 files changed, 131 insertions, 0 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.h b/src/mesh/gnunet-service-mesh_connection.h
index 8395010fd..f4fd83f98 100644
--- a/src/mesh/gnunet-service-mesh_connection.h
+++ b/src/mesh/gnunet-service-mesh_connection.h
@@ -44,6 +44,137 @@ extern "C"
44 */ 44 */
45struct MeshConnection; 45struct MeshConnection;
46 46
47
48
49
50/**
51 * Core handler for connection creation.
52 *
53 * @param cls Closure (unused).
54 * @param peer Sender (neighbor).
55 * @param message Message.
56 *
57 * @return GNUNET_OK to keep the connection open,
58 * GNUNET_SYSERR to close it (signal serious error)
59 */
60int
61GMC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer,
62 const struct GNUNET_MessageHeader *message);
63
64/**
65 * Core handler for path confirmations.
66 *
67 * @param cls closure
68 * @param message message
69 * @param peer peer identity this notification is about
70 *
71 * @return GNUNET_OK to keep the connection open,
72 * GNUNET_SYSERR to close it (signal serious error)
73 */
74int
75GMC_handle_confirm (void *cls, const struct GNUNET_PeerIdentity *peer,
76 const struct GNUNET_MessageHeader *message);
77
78/**
79 * Core handler for notifications of broken paths
80 *
81 * @param cls Closure (unused).
82 * @param peer Peer identity of sending neighbor.
83 * @param message Message.
84 *
85 * @return GNUNET_OK to keep the connection open,
86 * GNUNET_SYSERR to close it (signal serious error)
87 */
88int
89GMC_handle_broken (void *cls, const struct GNUNET_PeerIdentity *peer,
90 const struct GNUNET_MessageHeader *message);
91
92/**
93 * Core handler for tunnel destruction
94 *
95 * @param cls Closure (unused).
96 * @param peer Peer identity of sending neighbor.
97 * @param message Message.
98 *
99 * @return GNUNET_OK to keep the connection open,
100 * GNUNET_SYSERR to close it (signal serious error)
101 */
102int
103GMC_handle_destroy (void *cls, const struct GNUNET_PeerIdentity *peer,
104 const struct GNUNET_MessageHeader *message);
105
106/**
107 * Core handler for mesh network traffic going orig->dest.
108 *
109 * @param cls Closure (unused).
110 * @param message Message received.
111 * @param peer Peer who sent the message.
112 *
113 * @return GNUNET_OK to keep the connection open,
114 * GNUNET_SYSERR to close it (signal serious error)
115 */
116int
117GMC_handle_fwd (void *cls, const struct GNUNET_PeerIdentity *peer,
118 const struct GNUNET_MessageHeader *message);
119
120
121/**
122 * Core handler for mesh network traffic going dest->orig.
123 *
124 * @param cls Closure (unused).
125 * @param message Message received.
126 * @param peer Peer who sent the message.
127 *
128 * @return GNUNET_OK to keep the connection open,
129 * GNUNET_SYSERR to close it (signal serious error)
130 */
131int
132GMC_handle_bck (void *cls, const struct GNUNET_PeerIdentity *peer,
133 const struct GNUNET_MessageHeader *message);
134
135/**
136 * Core handler for mesh network traffic point-to-point acks.
137 *
138 * @param cls closure
139 * @param message message
140 * @param peer peer identity this notification is about
141 *
142 * @return GNUNET_OK to keep the connection open,
143 * GNUNET_SYSERR to close it (signal serious error)
144 */
145int
146GMC_handle_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
147 const struct GNUNET_MessageHeader *message);
148
149/**
150 * Core handler for mesh network traffic point-to-point ack polls.
151 *
152 * @param cls closure
153 * @param message message
154 * @param peer peer identity this notification is about
155 *
156 * @return GNUNET_OK to keep the connection open,
157 * GNUNET_SYSERR to close it (signal serious error)
158 */
159int
160GMC_handle_poll (void *cls, const struct GNUNET_PeerIdentity *peer,
161 const struct GNUNET_MessageHeader *message);
162
163/**
164 * Core handler for mesh keepalives.
165 *
166 * @param cls closure
167 * @param message message
168 * @param peer peer identity this notification is about
169 * @return GNUNET_OK to keep the connection open,
170 * GNUNET_SYSERR to close it (signal serious error)
171 *
172 * TODO: Check who we got this from, to validate route.
173 */
174int
175GMC_handle_keepalive (void *cls, const struct GNUNET_PeerIdentity *peer,
176 const struct GNUNET_MessageHeader *message);
177
47/** 178/**
48 * Initialize the connections subsystem 179 * Initialize the connections subsystem
49 * 180 *