diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_hello_lib.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_peerstore_service.h | 12 | ||||
-rw-r--r-- | src/include/gnunet_transport_communication_service.h | 22 |
3 files changed, 25 insertions, 13 deletions
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h index 5e2190cc6..c46e847f1 100644 --- a/src/include/gnunet_hello_lib.h +++ b/src/include/gnunet_hello_lib.h | |||
@@ -478,10 +478,6 @@ GNUNET_HELLO_parse_uri (const char *uri, | |||
478 | /* NG API */ | 478 | /* NG API */ |
479 | #include "gnunet_nt_lib.h" | 479 | #include "gnunet_nt_lib.h" |
480 | 480 | ||
481 | /** | ||
482 | * Key used for storing HELLOs in the peerstore | ||
483 | */ | ||
484 | #define GNUNET_HELLO_PEERSTORE_KEY "hello" | ||
485 | 481 | ||
486 | /** | 482 | /** |
487 | * Build address record by signing raw information with private key. | 483 | * Build address record by signing raw information with private key. |
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h index 31567c004..1d7e2259a 100644 --- a/src/include/gnunet_peerstore_service.h +++ b/src/include/gnunet_peerstore_service.h | |||
@@ -43,6 +43,18 @@ extern "C" | |||
43 | #endif | 43 | #endif |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | |||
47 | /** | ||
48 | * Key used for storing addresses in URL format in the peerstore | ||
49 | */ | ||
50 | #define GNUNET_PEERSTORE_TRANSPORT_URLADDRESS_KEY "transport-address" | ||
51 | |||
52 | /** | ||
53 | * Key used for storing HELLOs in the peerstore | ||
54 | */ | ||
55 | #define GNUNET_PEERSTORE_TRANSPORT_HELLO_KEY "transport-address" | ||
56 | |||
57 | |||
46 | /** | 58 | /** |
47 | * Options for storing values in PEERSTORE | 59 | * Options for storing values in PEERSTORE |
48 | */ | 60 | */ |
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h index b3dfccc9a..b4a0ce9c8 100644 --- a/src/include/gnunet_transport_communication_service.h +++ b/src/include/gnunet_transport_communication_service.h | |||
@@ -121,7 +121,7 @@ enum GNUNET_TRANSPORT_CommunicatorCharacteristics { | |||
121 | */ | 121 | */ |
122 | typedef void | 122 | typedef void |
123 | (*GNUNET_TRANSPORT_CommunicatorNotify) (void *cls, | 123 | (*GNUNET_TRANSPORT_CommunicatorNotify) (void *cls, |
124 | const struct GNUNET_PeerIdentity *sender, | 124 | const struct GNUNET_PeerIdentity *sender, |
125 | const struct GNUNET_MessageHeader *msg); | 125 | const struct GNUNET_MessageHeader *msg); |
126 | 126 | ||
127 | 127 | ||
@@ -144,12 +144,12 @@ typedef void | |||
144 | struct GNUNET_TRANSPORT_CommunicatorHandle * | 144 | struct GNUNET_TRANSPORT_CommunicatorHandle * |
145 | GNUNET_TRANSPORT_communicator_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 145 | GNUNET_TRANSPORT_communicator_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
146 | const char *config_section_name, | 146 | const char *config_section_name, |
147 | const char *addr_prefix, | 147 | const char *addr_prefix, |
148 | enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc, | 148 | enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc, |
149 | GNUNET_TRANSPORT_CommunicatorMqInit mq_init, | 149 | GNUNET_TRANSPORT_CommunicatorMqInit mq_init, |
150 | void *mq_init_cls, | 150 | void *mq_init_cls, |
151 | GNUNET_TRANSPORT_CommunicatorNotify notify_cb, | 151 | GNUNET_TRANSPORT_CommunicatorNotify notify_cb, |
152 | void *notify_cb_cls); | 152 | void *notify_cb_cls); |
153 | 153 | ||
154 | 154 | ||
155 | /** | 155 | /** |
@@ -184,6 +184,9 @@ typedef void | |||
184 | * @param sender presumed sender of the message (details to be checked | 184 | * @param sender presumed sender of the message (details to be checked |
185 | * by higher layers) | 185 | * by higher layers) |
186 | * @param msg the message | 186 | * @param msg the message |
187 | * @param expected_addr_validity how long does the communicator believe it | ||
188 | * will continue to be able to receive messages from the same address | ||
189 | * on which it received this message? | ||
187 | * @param cb function to call once handling the message is done, NULL if | 190 | * @param cb function to call once handling the message is done, NULL if |
188 | * flow control is not supported by this communicator | 191 | * flow control is not supported by this communicator |
189 | * @param cb_cls closure for @a cb | 192 | * @param cb_cls closure for @a cb |
@@ -197,6 +200,7 @@ int | |||
197 | GNUNET_TRANSPORT_communicator_receive (struct GNUNET_TRANSPORT_CommunicatorHandle *handle, | 200 | GNUNET_TRANSPORT_communicator_receive (struct GNUNET_TRANSPORT_CommunicatorHandle *handle, |
198 | const struct GNUNET_PeerIdentity *sender, | 201 | const struct GNUNET_PeerIdentity *sender, |
199 | const struct GNUNET_MessageHeader *msg, | 202 | const struct GNUNET_MessageHeader *msg, |
203 | struct GNUNET_TIME_Relative expected_addr_validity, | ||
200 | GNUNET_TRANSPORT_MessageCompletedCallback cb, | 204 | GNUNET_TRANSPORT_MessageCompletedCallback cb, |
201 | void *cb_cls); | 205 | void *cb_cls); |
202 | 206 | ||
@@ -251,9 +255,9 @@ struct GNUNET_TRANSPORT_QueueHandle * | |||
251 | GNUNET_TRANSPORT_communicator_mq_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, | 255 | GNUNET_TRANSPORT_communicator_mq_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, |
252 | const struct GNUNET_PeerIdentity *peer, | 256 | const struct GNUNET_PeerIdentity *peer, |
253 | const char *address, | 257 | const char *address, |
254 | uint32_t mtu, | 258 | uint32_t mtu, |
255 | enum GNUNET_NetworkType nt, | 259 | enum GNUNET_NetworkType nt, |
256 | enum GNUNET_TRANSPORT_ConnectionStatus cs, | 260 | enum GNUNET_TRANSPORT_ConnectionStatus cs, |
257 | struct GNUNET_MQ_Handle *mq); | 261 | struct GNUNET_MQ_Handle *mq); |
258 | 262 | ||
259 | 263 | ||
@@ -320,9 +324,9 @@ GNUNET_TRANSPORT_communicator_address_remove (struct GNUNET_TRANSPORT_AddressIde | |||
320 | */ | 324 | */ |
321 | void | 325 | void |
322 | GNUNET_TRANSPORT_communicator_notify (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, | 326 | GNUNET_TRANSPORT_communicator_notify (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, |
323 | const struct GNUNET_PeerIdentity *pid, | 327 | const struct GNUNET_PeerIdentity *pid, |
324 | const char *comm, | 328 | const char *comm, |
325 | const struct GNUNET_MessageHeader *header); | 329 | const struct GNUNET_MessageHeader *header); |
326 | 330 | ||
327 | 331 | ||
328 | #if 0 /* keep Emacsens' auto-indent happy */ | 332 | #if 0 /* keep Emacsens' auto-indent happy */ |