aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-04-07 17:22:23 +0200
committerChristian Grothoff <christian@grothoff.org>2019-04-07 17:22:23 +0200
commit0142079ce2e7a5e062d06aa8dddf2fdc1529035d (patch)
treeeb0bd17aec8a7a5501435d11cfe2d53402db5dcd /src/include
parenta8c2bed07d3d43c34cfcf8fe96e56ea516feaf80 (diff)
downloadgnunet-0142079ce2e7a5e062d06aa8dddf2fdc1529035d.tar.gz
gnunet-0142079ce2e7a5e062d06aa8dddf2fdc1529035d.zip
implement #5551 (UDP broadcast learning in TNG)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_hello_lib.h18
-rw-r--r--src/include/gnunet_protocols.h7
-rw-r--r--src/include/gnunet_transport_application_service.h46
3 files changed, 35 insertions, 36 deletions
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h
index fcd422701..5e2190cc6 100644
--- a/src/include/gnunet_hello_lib.h
+++ b/src/include/gnunet_hello_lib.h
@@ -495,11 +495,11 @@ GNUNET_HELLO_parse_uri (const char *uri,
495 */ 495 */
496void 496void
497GNUNET_HELLO_sign_address (const char *address, 497GNUNET_HELLO_sign_address (const char *address,
498 enum GNUNET_NetworkType nt, 498 enum GNUNET_NetworkType nt,
499 struct GNUNET_TIME_Absolute expiration, 499 struct GNUNET_TIME_Absolute expiration,
500 const struct GNUNET_CRYPTO_EddsaPrivateKey *private_key, 500 const struct GNUNET_CRYPTO_EddsaPrivateKey *private_key,
501 void **result, 501 void **result,
502 size_t *result_size); 502 size_t *result_size);
503 503
504 504
505/** 505/**
@@ -514,10 +514,10 @@ GNUNET_HELLO_sign_address (const char *address,
514 */ 514 */
515char * 515char *
516GNUNET_HELLO_extract_address (const void *raw, 516GNUNET_HELLO_extract_address (const void *raw,
517 size_t raw_size, 517 size_t raw_size,
518 const struct GNUNET_PeerIdentity *pid, 518 const struct GNUNET_PeerIdentity *pid,
519 enum GNUNET_NetworkType *nt, 519 enum GNUNET_NetworkType *nt,
520 struct GNUNET_TIME_Absolute *expiration); 520 struct GNUNET_TIME_Absolute *expiration);
521 521
522 522
523/** 523/**
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 7f1667d51..4f97d3078 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -3189,8 +3189,15 @@ extern "C"
3189 */ 3189 */
3190#define GNUNET_MESSAGE_TYPE_TRANSPORT_SUGGEST_CANCEL 1301 3190#define GNUNET_MESSAGE_TYPE_TRANSPORT_SUGGEST_CANCEL 1301
3191 3191
3192/**
3193 * Type of the 'struct RequestHelloValidationMessage' send by clients to TRANSPORT
3194 * to trigger validation of addresses.
3195 */
3196#define GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_HELLO_VALIDATION 1302
3197
3192 3198
3193/* ************** NEW (NG) ATS Messages ************* */ 3199/* ************** NEW (NG) ATS Messages ************* */
3200/* NOTE: it is not clear ATS will survive in TNG */
3194 3201
3195/** 3202/**
3196 * Type of the 'struct ExpressPreferenceMessage' send by clients to ATS 3203 * Type of the 'struct ExpressPreferenceMessage' send by clients to ATS
diff --git a/src/include/gnunet_transport_application_service.h b/src/include/gnunet_transport_application_service.h
index 31097b88e..bbd4e3ddf 100644
--- a/src/include/gnunet_transport_application_service.h
+++ b/src/include/gnunet_transport_application_service.h
@@ -34,6 +34,7 @@
34 34
35#include "gnunet_constants.h" 35#include "gnunet_constants.h"
36#include "gnunet_util_lib.h" 36#include "gnunet_util_lib.h"
37#include "gnunet_nt_lib.h"
37 38
38/** 39/**
39 * Handle to the TRANSPORT subsystem for making suggestions about 40 * Handle to the TRANSPORT subsystem for making suggestions about
@@ -62,37 +63,28 @@ GNUNET_TRANSPORT_application_done (struct GNUNET_TRANSPORT_ApplicationHandle *ch
62 63
63 64
64/** 65/**
65 * Handle for suggestion requests. 66 * An application (or a communicator) has received a HELLO (or other address
66 */ 67 * data of another peer) and wants TRANSPORT to validate that the address is
67struct GNUNET_TRANSPORT_ApplicationSuggestHandle; 68 * correct. The result is NOT returned, in fact TRANSPORT may do nothing
68 69 * (i.e. if it has too many active validations or recently tried this one
69 70 * already). If the @a addr validates, TRANSPORT will persist the address
70/** 71 * with PEERSTORE.
71 * An application would like to communicate with a peer. TRANSPORT should
72 * allocate bandwith using a suitable address for requiremetns @a pk
73 * to transport.
74 * 72 *
75 * @param ch handle 73 * @param ch handle
76 * @param peer identity of the peer we need an address for 74 * @param peer identity of the peer we have an address for
77 * @param pk what kind of application will the application require (can be 75 * @param expiration when does @a addr expire; used by TRANSPORT to know when
78 * #GNUNET_MQ_PREFERENCE_NONE, we will still try to connect) 76 * to definitively give up attempting to validate
79 * @param bw desired bandwith, can be zero (we will still try to connect) 77 * @param nt network type of @a addr (as claimed by the other peer);
80 * @return suggestion handle, NULL if request is already pending 78 * used by TRANSPORT to avoid trying @a addr's that really cannot work
81 */ 79 * due to network type missmatches
82struct GNUNET_TRANSPORT_ApplicationSuggestHandle * 80 * @param addr address to validate
83GNUNET_TRANSPORT_application_suggest (struct GNUNET_TRANSPORT_ApplicationHandle *ch,
84 const struct GNUNET_PeerIdentity *peer,
85 enum GNUNET_MQ_PreferenceKind pk,
86 struct GNUNET_BANDWIDTH_Value32NBO bw);
87
88
89/**
90 * We no longer care about communicating with a peer.
91 *
92 * @param sh handle
93 */ 81 */
94void 82void
95GNUNET_TRANSPORT_application_suggest_cancel (struct GNUNET_TRANSPORT_ApplicationSuggestHandle *sh); 83GNUNET_TRANSPORT_application_validate (struct GNUNET_TRANSPORT_ApplicationHandle *ch,
84 const struct GNUNET_PeerIdentity *peer,
85 struct GNUNET_TIME_Absolute expiration,
86 enum GNUNET_NetworkType nt,
87 const char *addr);
96 88
97/** @} */ /* end of group */ 89/** @} */ /* end of group */
98 90