diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-01-07 16:03:59 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-01-07 16:03:59 +0100 |
commit | c6bf6b89b5c1556590eadc3d64676d2f023e6da4 (patch) | |
tree | dbc378b6ac024e73972b0ac0015b60b3f3ca5c5f /src/nat-auto/nat_auto_api_test.c | |
parent | 5c59b1796e462b468321ce1200eb4a6972340cce (diff) | |
download | gnunet-c6bf6b89b5c1556590eadc3d64676d2f023e6da4.tar.gz gnunet-c6bf6b89b5c1556590eadc3d64676d2f023e6da4.zip |
make sure nat-auto code uses NAT_AUTO prefix
Diffstat (limited to 'src/nat-auto/nat_auto_api_test.c')
-rw-r--r-- | src/nat-auto/nat_auto_api_test.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/nat-auto/nat_auto_api_test.c b/src/nat-auto/nat_auto_api_test.c index 056d2a2bf..df2d9fed3 100644 --- a/src/nat-auto/nat_auto_api_test.c +++ b/src/nat-auto/nat_auto_api_test.c | |||
@@ -54,7 +54,7 @@ struct NatActivity | |||
54 | /** | 54 | /** |
55 | * Handle of the master context. | 55 | * Handle of the master context. |
56 | */ | 56 | */ |
57 | struct GNUNET_NAT_Test *h; | 57 | struct GNUNET_NAT_AUTO_Test *h; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Task reading from the incoming connection. | 60 | * Task reading from the incoming connection. |
@@ -86,7 +86,7 @@ struct ClientActivity | |||
86 | /** | 86 | /** |
87 | * Handle to overall NAT test. | 87 | * Handle to overall NAT test. |
88 | */ | 88 | */ |
89 | struct GNUNET_NAT_Test *h; | 89 | struct GNUNET_NAT_AUTO_Test *h; |
90 | 90 | ||
91 | }; | 91 | }; |
92 | 92 | ||
@@ -94,7 +94,7 @@ struct ClientActivity | |||
94 | /** | 94 | /** |
95 | * Handle to a NAT test. | 95 | * Handle to a NAT test. |
96 | */ | 96 | */ |
97 | struct GNUNET_NAT_Test | 97 | struct GNUNET_NAT_AUTO_Test |
98 | { | 98 | { |
99 | 99 | ||
100 | /** | 100 | /** |
@@ -187,7 +187,7 @@ reversal_cb (void *cls, | |||
187 | const struct sockaddr *addr, | 187 | const struct sockaddr *addr, |
188 | socklen_t addrlen) | 188 | socklen_t addrlen) |
189 | { | 189 | { |
190 | struct GNUNET_NAT_Test *h = cls; | 190 | struct GNUNET_NAT_AUTO_Test *h = cls; |
191 | const struct sockaddr_in *sa; | 191 | const struct sockaddr_in *sa; |
192 | 192 | ||
193 | if (sizeof (struct sockaddr_in) != addrlen) | 193 | if (sizeof (struct sockaddr_in) != addrlen) |
@@ -209,12 +209,12 @@ reversal_cb (void *cls, | |||
209 | * Activity on our incoming socket. Read data from the | 209 | * Activity on our incoming socket. Read data from the |
210 | * incoming connection. | 210 | * incoming connection. |
211 | * | 211 | * |
212 | * @param cls the `struct GNUNET_NAT_Test` | 212 | * @param cls the `struct GNUNET_NAT_AUTO_Test` |
213 | */ | 213 | */ |
214 | static void | 214 | static void |
215 | do_udp_read (void *cls) | 215 | do_udp_read (void *cls) |
216 | { | 216 | { |
217 | struct GNUNET_NAT_Test *tst = cls; | 217 | struct GNUNET_NAT_AUTO_Test *tst = cls; |
218 | uint16_t data; | 218 | uint16_t data; |
219 | const struct GNUNET_SCHEDULER_TaskContext *tc; | 219 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
220 | 220 | ||
@@ -255,7 +255,7 @@ static void | |||
255 | do_read (void *cls) | 255 | do_read (void *cls) |
256 | { | 256 | { |
257 | struct NatActivity *na = cls; | 257 | struct NatActivity *na = cls; |
258 | struct GNUNET_NAT_Test *tst; | 258 | struct GNUNET_NAT_AUTO_Test *tst; |
259 | uint16_t data; | 259 | uint16_t data; |
260 | const struct GNUNET_SCHEDULER_TaskContext *tc; | 260 | const struct GNUNET_SCHEDULER_TaskContext *tc; |
261 | 261 | ||
@@ -292,12 +292,12 @@ do_read (void *cls) | |||
292 | * Activity on our listen socket. Accept the | 292 | * Activity on our listen socket. Accept the |
293 | * incoming connection. | 293 | * incoming connection. |
294 | * | 294 | * |
295 | * @param cls the `struct GNUNET_NAT_Test` | 295 | * @param cls the `struct GNUNET_NAT_AUTO_Test` |
296 | */ | 296 | */ |
297 | static void | 297 | static void |
298 | do_accept (void *cls) | 298 | do_accept (void *cls) |
299 | { | 299 | { |
300 | struct GNUNET_NAT_Test *tst = cls; | 300 | struct GNUNET_NAT_AUTO_Test *tst = cls; |
301 | struct GNUNET_NETWORK_Handle *s; | 301 | struct GNUNET_NETWORK_Handle *s; |
302 | struct NatActivity *wl; | 302 | struct NatActivity *wl; |
303 | 303 | ||
@@ -342,7 +342,7 @@ mq_error_handler (void *cls, | |||
342 | enum GNUNET_MQ_Error error) | 342 | enum GNUNET_MQ_Error error) |
343 | { | 343 | { |
344 | struct ClientActivity *ca = cls; | 344 | struct ClientActivity *ca = cls; |
345 | struct GNUNET_NAT_Test *tst = ca->h; | 345 | struct GNUNET_NAT_AUTO_Test *tst = ca->h; |
346 | 346 | ||
347 | GNUNET_CONTAINER_DLL_remove (tst->ca_head, | 347 | GNUNET_CONTAINER_DLL_remove (tst->ca_head, |
348 | tst->ca_tail, | 348 | tst->ca_tail, |
@@ -367,10 +367,10 @@ addr_cb (void *cls, | |||
367 | const struct sockaddr *addr, | 367 | const struct sockaddr *addr, |
368 | socklen_t addrlen) | 368 | socklen_t addrlen) |
369 | { | 369 | { |
370 | struct GNUNET_NAT_Test *h = cls; | 370 | struct GNUNET_NAT_AUTO_Test *h = cls; |
371 | struct ClientActivity *ca; | 371 | struct ClientActivity *ca; |
372 | struct GNUNET_MQ_Envelope *env; | 372 | struct GNUNET_MQ_Envelope *env; |
373 | struct GNUNET_NAT_TestMessage *msg; | 373 | struct GNUNET_NAT_AUTO_TestMessage *msg; |
374 | const struct sockaddr_in *sa; | 374 | const struct sockaddr_in *sa; |
375 | 375 | ||
376 | if (GNUNET_YES != add_remove) | 376 | if (GNUNET_YES != add_remove) |
@@ -428,7 +428,7 @@ addr_cb (void *cls, | |||
428 | static void | 428 | static void |
429 | do_timeout (void *cls) | 429 | do_timeout (void *cls) |
430 | { | 430 | { |
431 | struct GNUNET_NAT_Test *nh = cls; | 431 | struct GNUNET_NAT_AUTO_Test *nh = cls; |
432 | 432 | ||
433 | nh->ttask = NULL; | 433 | nh->ttask = NULL; |
434 | nh->report (nh->report_cls, | 434 | nh->report (nh->report_cls, |
@@ -453,8 +453,8 @@ do_timeout (void *cls) | |||
453 | * @param report_cls closure for @a report | 453 | * @param report_cls closure for @a report |
454 | * @return handle to cancel NAT test or NULL. The error is always indicated via the report callback | 454 | * @return handle to cancel NAT test or NULL. The error is always indicated via the report callback |
455 | */ | 455 | */ |
456 | struct GNUNET_NAT_Test * | 456 | struct GNUNET_NAT_AUTO_Test * |
457 | GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | 457 | GNUNET_NAT_AUTO_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
458 | int is_tcp, | 458 | int is_tcp, |
459 | uint16_t bnd_port, | 459 | uint16_t bnd_port, |
460 | uint16_t adv_port, | 460 | uint16_t adv_port, |
@@ -462,7 +462,7 @@ GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
462 | GNUNET_NAT_TestCallback report, | 462 | GNUNET_NAT_TestCallback report, |
463 | void *report_cls) | 463 | void *report_cls) |
464 | { | 464 | { |
465 | struct GNUNET_NAT_Test *nh; | 465 | struct GNUNET_NAT_AUTO_Test *nh; |
466 | struct sockaddr_in sa; | 466 | struct sockaddr_in sa; |
467 | const struct sockaddr *addrs[] = { | 467 | const struct sockaddr *addrs[] = { |
468 | (const struct sockaddr *) &sa | 468 | (const struct sockaddr *) &sa |
@@ -478,7 +478,7 @@ GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
478 | sa.sin_len = sizeof (sa); | 478 | sa.sin_len = sizeof (sa); |
479 | #endif | 479 | #endif |
480 | 480 | ||
481 | nh = GNUNET_new (struct GNUNET_NAT_Test); | 481 | nh = GNUNET_new (struct GNUNET_NAT_AUTO_Test); |
482 | nh->cfg = cfg; | 482 | nh->cfg = cfg; |
483 | nh->is_tcp = is_tcp; | 483 | nh->is_tcp = is_tcp; |
484 | nh->data = bnd_port; | 484 | nh->data = bnd_port; |
@@ -594,7 +594,7 @@ GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
594 | * @param tst test to stop. | 594 | * @param tst test to stop. |
595 | */ | 595 | */ |
596 | void | 596 | void |
597 | GNUNET_NAT_test_stop (struct GNUNET_NAT_Test *tst) | 597 | GNUNET_NAT_AUTO_test_stop (struct GNUNET_NAT_AUTO_Test *tst) |
598 | { | 598 | { |
599 | struct NatActivity *pos; | 599 | struct NatActivity *pos; |
600 | struct ClientActivity *cpos; | 600 | struct ClientActivity *cpos; |
@@ -641,4 +641,4 @@ GNUNET_NAT_test_stop (struct GNUNET_NAT_Test *tst) | |||
641 | GNUNET_free (tst); | 641 | GNUNET_free (tst); |
642 | } | 642 | } |
643 | 643 | ||
644 | /* end of nat_test.c */ | 644 | /* end of nat_auto_api_test.c */ |