aboutsummaryrefslogtreecommitdiff
path: root/src/nat/nat.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-10-23 19:53:59 +0000
committerChristian Grothoff <christian@grothoff.org>2016-10-23 19:53:59 +0000
commit10f9bc91ab9d758d0d60dd672206027cd136342a (patch)
treecb8c09ffe145ae925d5a51d4bd85029bb61f7df2 /src/nat/nat.h
parent588f820301bf298496e7bf0e6dea7b2c60ab3936 (diff)
downloadgnunet-10f9bc91ab9d758d0d60dd672206027cd136342a.tar.gz
gnunet-10f9bc91ab9d758d0d60dd672206027cd136342a.zip
new NAT lib client api skeleton
Diffstat (limited to 'src/nat/nat.h')
-rw-r--r--src/nat/nat.h38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/nat/nat.h b/src/nat/nat.h
index 9ab402c1d..debe011ef 100644
--- a/src/nat/nat.h
+++ b/src/nat/nat.h
@@ -77,21 +77,15 @@ enum GNUNET_NAT_RegisterFlags
77 GNUNET_NAT_RF_NONE = 0, 77 GNUNET_NAT_RF_NONE = 0,
78 78
79 /** 79 /**
80 * This client wants to be informed about our IPv4 address
81 * changing.
82 */
83 GNUNET_NAT_RF_IPV4 = 1,
84
85 /**
86 * This client wants to be informed about changes to our 80 * This client wants to be informed about changes to our
87 * external addresses. 81 * external addresses.
88 */ 82 */
89 GNUNET_NAT_RF_ADDRESSES = 2, 83 GNUNET_NAT_RF_ADDRESSES = 1,
90 84
91 /** 85 /**
92 * This client supports address reversal. 86 * This client supports address reversal.
93 */ 87 */
94 GNUNET_NAT_RF_REVERSAL = 4 88 GNUNET_NAT_RF_REVERSAL = 2
95}; 89};
96 90
97 91
@@ -108,12 +102,12 @@ struct GNUNET_NAT_RegisterMessage
108 /** 102 /**
109 * An `enum GNUNET_NAT_RegisterFlags`. 103 * An `enum GNUNET_NAT_RegisterFlags`.
110 */ 104 */
111 uint8_t flags GNUNET_PACKED; 105 uint8_t flags;
112 106
113 /** 107 /**
114 * Client's IPPROTO, e.g. IPPROTO_UDP or IPPROTO_TCP. 108 * Client's IPPROTO, e.g. IPPROTO_UDP or IPPROTO_TCP.
115 */ 109 */
116 uint8_t proto GNUNET_PACKED; 110 uint8_t proto;
117 111
118 /** 112 /**
119 * Port we would like as we are configured to use this one for 113 * Port we would like as we are configured to use this one for
@@ -236,30 +230,6 @@ struct GNUNET_NAT_AddressChangeNotificationMessage
236 230
237 231
238/** 232/**
239 * Service notifying the client about a change of our
240 * known external IPv4 address.
241 */
242struct GNUNET_NAT_Ipv4ChangeNotificationMessage
243{
244 /**
245 * Header with type #GNUNET_MESSAGE_TYPE_NAT_IPV4_CHANGE
246 */
247 struct GNUNET_MessageHeader header;
248
249 /**
250 * #GNUNET_YES to add, #GNUNET_NO to remove the address from the list.
251 */
252 int32_t add_remove GNUNET_PACKED;
253
254 /**
255 * IPv4 address affected.
256 */
257 struct in_addr addr GNUNET_PACKED;
258
259};
260
261
262/**
263 * Client requesting test of network connectivity. 233 * Client requesting test of network connectivity.
264 */ 234 */
265struct GNUNET_NAT_RequestTestMessage 235struct GNUNET_NAT_RequestTestMessage