aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_nat_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_nat_lib.h')
-rw-r--r--src/include/gnunet_nat_lib.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/include/gnunet_nat_lib.h b/src/include/gnunet_nat_lib.h
index 3e9d8171c..2eb18d74f 100644
--- a/src/include/gnunet_nat_lib.h
+++ b/src/include/gnunet_nat_lib.h
@@ -70,6 +70,31 @@ typedef void
70struct GNUNET_NAT_Handle; 70struct GNUNET_NAT_Handle;
71 71
72 72
73
74/**
75 * What the situation of the NAT connectivity
76 */
77enum GNUNET_NAT_Type
78{
79 /**
80 * We have a direct connection
81 */
82 GNUNET_NAT_TYPE_NO_NAT = GNUNET_OK,
83 /**
84 * We are under a NAT but cannot traverse it
85 */
86 GNUNET_NAT_TYPE_UNREACHABLE_NAT,
87 /**
88 * We can traverse using STUN
89 */
90 GNUNET_NAT_TYPE_STUN_PUNCHED_NAT,
91 /**
92 * WE can traverse using UPNP
93 */
94 GNUNET_NAT_TYPE_UPNP_NAT
95
96};
97
73/** 98/**
74 * Error Types for the NAT subsystem (which can then later be converted/resolved to a string) 99 * Error Types for the NAT subsystem (which can then later be converted/resolved to a string)
75 */ 100 */
@@ -428,11 +453,13 @@ struct GNUNET_NAT_AutoHandle;
428 * @param diff minimal suggested changes to the original configuration 453 * @param diff minimal suggested changes to the original configuration
429 * to make it work (as best as we can) 454 * to make it work (as best as we can)
430 * @param result #GNUNET_NAT_ERROR_SUCCESS on success, otherwise the specific error code 455 * @param result #GNUNET_NAT_ERROR_SUCCESS on success, otherwise the specific error code
456 * @param type what the situation of the NAT
431 */ 457 */
432typedef void 458typedef void
433(*GNUNET_NAT_AutoResultCallback)(void *cls, 459(*GNUNET_NAT_AutoResultCallback)(void *cls,
434 const struct GNUNET_CONFIGURATION_Handle *diff, 460 const struct GNUNET_CONFIGURATION_Handle *diff,
435 enum GNUNET_NAT_StatusCode result); 461 enum GNUNET_NAT_StatusCode result,
462 enum GNUNET_NAT_Type type);
436 463
437 464
438/** 465/**