diff options
Diffstat (limited to 'src/include/gnunet_transport_communication_service.h')
-rw-r--r-- | src/include/gnunet_transport_communication_service.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h index 50f94bddf..fed681f0f 100644 --- a/src/include/gnunet_transport_communication_service.h +++ b/src/include/gnunet_transport_communication_service.h | |||
@@ -86,8 +86,6 @@ struct GNUNET_TRANSPORT_CommunicatorHandle; | |||
86 | * @param config_section section of the configuration to use for options | 86 | * @param config_section section of the configuration to use for options |
87 | * @param addr_prefix address prefix for addresses supported by this | 87 | * @param addr_prefix address prefix for addresses supported by this |
88 | * communicator, could be NULL for incoming-only communicators | 88 | * communicator, could be NULL for incoming-only communicators |
89 | * @param mtu maximum message size supported by communicator, 0 if | ||
90 | * sending is not supported, SIZE_MAX for no MTU | ||
91 | * @param mq_init function to call to initialize a message queue given | 89 | * @param mq_init function to call to initialize a message queue given |
92 | * the address of another peer, can be NULL if the | 90 | * the address of another peer, can be NULL if the |
93 | * communicator only supports receiving messages | 91 | * communicator only supports receiving messages |
@@ -98,7 +96,6 @@ struct GNUNET_TRANSPORT_CommunicatorHandle * | |||
98 | GNUNET_TRANSPORT_communicator_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 96 | GNUNET_TRANSPORT_communicator_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
99 | const char *config_section_name, | 97 | const char *config_section_name, |
100 | const char *addr_prefix, | 98 | const char *addr_prefix, |
101 | size_t mtu, | ||
102 | GNUNET_TRANSPORT_CommunicatorMqInit mq_init, | 99 | GNUNET_TRANSPORT_CommunicatorMqInit mq_init, |
103 | void *mq_init_cls); | 100 | void *mq_init_cls); |
104 | 101 | ||
@@ -162,6 +159,25 @@ struct GNUNET_TRANSPORT_QueueHandle; | |||
162 | 159 | ||
163 | 160 | ||
164 | /** | 161 | /** |
162 | * Possible states of a connection. | ||
163 | */ | ||
164 | enum GNUNET_TRANSPORT_ConnectionStatus { | ||
165 | /** | ||
166 | * Connection is down. | ||
167 | */ | ||
168 | GNUNET_TRANSPORT_CS_DOWN = -1, | ||
169 | /** | ||
170 | * this is an outbound connection (transport initiated) | ||
171 | */ | ||
172 | GNUNET_TRANSPORT_CS_OUTBOUND = 0, | ||
173 | /** | ||
174 | * this is an inbound connection (communicator initiated) | ||
175 | */ | ||
176 | GNUNET_TRANSPORT_CS_INBOUND = 1 | ||
177 | }; | ||
178 | |||
179 | |||
180 | /** | ||
165 | * Notify transport service that an MQ became available due to an | 181 | * Notify transport service that an MQ became available due to an |
166 | * "inbound" connection or because the communicator discovered the | 182 | * "inbound" connection or because the communicator discovered the |
167 | * presence of another peer. | 183 | * presence of another peer. |
@@ -169,7 +185,10 @@ struct GNUNET_TRANSPORT_QueueHandle; | |||
169 | * @param ch connection to transport service | 185 | * @param ch connection to transport service |
170 | * @param peer peer with which we can now communicate | 186 | * @param peer peer with which we can now communicate |
171 | * @param address address in human-readable format, 0-terminated, UTF-8 | 187 | * @param address address in human-readable format, 0-terminated, UTF-8 |
188 | * @param mtu maximum message size supported by queue, 0 if | ||
189 | * sending is not supported, SIZE_MAX for no MTU | ||
172 | * @param nt which network type does the @a address belong to? | 190 | * @param nt which network type does the @a address belong to? |
191 | * @param cs what is the connection status of the queue? | ||
173 | * @param mq message queue of the @a peer | 192 | * @param mq message queue of the @a peer |
174 | * @return API handle identifying the new MQ | 193 | * @return API handle identifying the new MQ |
175 | */ | 194 | */ |
@@ -177,7 +196,9 @@ struct GNUNET_TRANSPORT_QueueHandle * | |||
177 | GNUNET_TRANSPORT_communicator_mq_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, | 196 | GNUNET_TRANSPORT_communicator_mq_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, |
178 | const struct GNUNET_PeerIdentity *peer, | 197 | const struct GNUNET_PeerIdentity *peer, |
179 | const char *address, | 198 | const char *address, |
199 | uint32_t mtu, | ||
180 | enum GNUNET_ATS_Network_Type nt, | 200 | enum GNUNET_ATS_Network_Type nt, |
201 | enum GNUNET_TRANSPORT_ConnectionStatus cs, | ||
181 | struct GNUNET_MQ_Handle *mq); | 202 | struct GNUNET_MQ_Handle *mq); |
182 | 203 | ||
183 | 204 | ||