diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-11-27 17:52:18 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-11-27 17:52:18 +0100 |
commit | 40dc7277101ec96373b6237565823ef8a9b71a4e (patch) | |
tree | 14efc2f05d41cacaebce7d5e12896881035777fe /src/nat | |
parent | 48aa183b408caaa59ad6120fb10c5ed6a5254f6f (diff) | |
download | gnunet-40dc7277101ec96373b6237565823ef8a9b71a4e.tar.gz gnunet-40dc7277101ec96373b6237565823ef8a9b71a4e.zip |
add output
Diffstat (limited to 'src/nat')
-rw-r--r-- | src/nat/gnunet-nat.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c index c83333755..01dfa3d32 100644 --- a/src/nat/gnunet-nat.c +++ b/src/nat/gnunet-nat.c | |||
@@ -192,7 +192,7 @@ auto_config_cb (void *cls, | |||
192 | "nat", | 192 | "nat", |
193 | &auto_conf_iter, | 193 | &auto_conf_iter, |
194 | NULL); | 194 | NULL); |
195 | // Have option to save config | 195 | // FIXME: have option to save config |
196 | test_finished (); | 196 | test_finished (); |
197 | } | 197 | } |
198 | 198 | ||
@@ -219,7 +219,7 @@ test_report_cb (void *cls, | |||
219 | * Signature of the callback passed to #GNUNET_NAT_register() for | 219 | * Signature of the callback passed to #GNUNET_NAT_register() for |
220 | * a function to call whenever our set of 'valid' addresses changes. | 220 | * a function to call whenever our set of 'valid' addresses changes. |
221 | * | 221 | * |
222 | * @param cls closure | 222 | * @param cls closure, NULL |
223 | * @param add_remove #GNUNET_YES to add a new public IP address, | 223 | * @param add_remove #GNUNET_YES to add a new public IP address, |
224 | * #GNUNET_NO to remove a previous (now invalid) one | 224 | * #GNUNET_NO to remove a previous (now invalid) one |
225 | * @param ac address class the address belongs to | 225 | * @param ac address class the address belongs to |
@@ -233,7 +233,12 @@ address_cb (void *cls, | |||
233 | const struct sockaddr *addr, | 233 | const struct sockaddr *addr, |
234 | socklen_t addrlen) | 234 | socklen_t addrlen) |
235 | { | 235 | { |
236 | // FIXME: print! | 236 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
237 | "%s %s (%d)\n", | ||
238 | add_remove ? "+" : "-", | ||
239 | GNUNET_a2s (addr, | ||
240 | addrlen), | ||
241 | (int) ac); | ||
237 | } | 242 | } |
238 | 243 | ||
239 | 244 | ||
@@ -242,7 +247,7 @@ address_cb (void *cls, | |||
242 | * for a function to call whenever someone asks us to do connection | 247 | * for a function to call whenever someone asks us to do connection |
243 | * reversal. | 248 | * reversal. |
244 | * | 249 | * |
245 | * @param cls closure | 250 | * @param cls closure, NULL |
246 | * @param local_addr address where we received the request | 251 | * @param local_addr address where we received the request |
247 | * @param local_addrlen actual length of the @a local_addr | 252 | * @param local_addrlen actual length of the @a local_addr |
248 | * @param remote_addr public IP address of the other peer | 253 | * @param remote_addr public IP address of the other peer |
@@ -255,7 +260,10 @@ reversal_cb (void *cls, | |||
255 | const struct sockaddr *remote_addr, | 260 | const struct sockaddr *remote_addr, |
256 | socklen_t remote_addrlen) | 261 | socklen_t remote_addrlen) |
257 | { | 262 | { |
258 | // FIXME: print! | 263 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
264 | "Connection reversal requested by %s\n", | ||
265 | GNUNET_a2s (remote_addr, | ||
266 | remote_addrlen)); | ||
259 | } | 267 | } |
260 | 268 | ||
261 | 269 | ||
@@ -498,6 +506,7 @@ main (int argc, | |||
498 | {'s', "stun", NULL, | 506 | {'s', "stun", NULL, |
499 | gettext_noop ("enable STUN processing"), | 507 | gettext_noop ("enable STUN processing"), |
500 | GNUNET_NO, &GNUNET_GETOPT_set_one, &do_stun }, | 508 | GNUNET_NO, &GNUNET_GETOPT_set_one, &do_stun }, |
509 | // FIMXE: -s not implemented! | ||
501 | {'t', "tcp", NULL, | 510 | {'t', "tcp", NULL, |
502 | gettext_noop ("use TCP"), | 511 | gettext_noop ("use TCP"), |
503 | GNUNET_NO, &GNUNET_GETOPT_set_one, &use_tcp }, | 512 | GNUNET_NO, &GNUNET_GETOPT_set_one, &use_tcp }, |