diff options
Diffstat (limited to 'src/nat')
-rw-r--r-- | src/nat/nat_test.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/nat/nat_test.c b/src/nat/nat_test.c index a8bf227a0..4b502ec60 100644 --- a/src/nat/nat_test.c +++ b/src/nat/nat_test.c | |||
@@ -28,37 +28,39 @@ | |||
28 | #include "gnunet_nat_lib.h" | 28 | #include "gnunet_nat_lib.h" |
29 | #include "nat.h" | 29 | #include "nat.h" |
30 | 30 | ||
31 | |||
31 | /** | 32 | /** |
32 | * | 33 | * Entry we keep for each incoming connection. |
33 | */ | 34 | */ |
34 | struct NatActivity | 35 | struct NatActivity |
35 | { | 36 | { |
36 | /** | 37 | /** |
37 | * | 38 | * This is a doubly-linked list. |
38 | */ | 39 | */ |
39 | struct NatActivity *next; | 40 | struct NatActivity *next; |
40 | 41 | ||
41 | /** | 42 | /** |
42 | * | 43 | * This is a doubly-linked list. |
43 | */ | 44 | */ |
44 | struct NatActivity *prev; | 45 | struct NatActivity *prev; |
45 | 46 | ||
46 | /** | 47 | /** |
47 | * | 48 | * Socket of the incoming connection. |
48 | */ | 49 | */ |
49 | struct GNUNET_NETWORK_Handle *sock; | 50 | struct GNUNET_NETWORK_Handle *sock; |
50 | 51 | ||
51 | /** | 52 | /** |
52 | * | 53 | * Handle of the master context. |
53 | */ | 54 | */ |
54 | struct GNUNET_NAT_Test *h; | 55 | struct GNUNET_NAT_Test *h; |
55 | 56 | ||
56 | /** | 57 | /** |
57 | * | 58 | * Task reading from the incoming connection. |
58 | */ | 59 | */ |
59 | GNUNET_SCHEDULER_TaskIdentifier rtask; | 60 | GNUNET_SCHEDULER_TaskIdentifier rtask; |
60 | }; | 61 | }; |
61 | 62 | ||
63 | |||
62 | /** | 64 | /** |
63 | * Handle to a NAT test. | 65 | * Handle to a NAT test. |
64 | */ | 66 | */ |
@@ -66,57 +68,57 @@ struct GNUNET_NAT_Test | |||
66 | { | 68 | { |
67 | 69 | ||
68 | /** | 70 | /** |
69 | * | 71 | * Configuration used |
70 | */ | 72 | */ |
71 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 73 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
72 | 74 | ||
73 | /** | 75 | /** |
74 | * | 76 | * Function to call with success report |
75 | */ | 77 | */ |
76 | GNUNET_NAT_TestCallback report; | 78 | GNUNET_NAT_TestCallback report; |
77 | 79 | ||
78 | /** | 80 | /** |
79 | * | 81 | * Closure for 'report'. |
80 | */ | 82 | */ |
81 | void *report_cls; | 83 | void *report_cls; |
82 | 84 | ||
83 | /** | 85 | /** |
84 | * | 86 | * Handle to NAT traversal in use |
85 | */ | 87 | */ |
86 | struct GNUNET_NAT_Handle *nat; | 88 | struct GNUNET_NAT_Handle *nat; |
87 | 89 | ||
88 | /** | 90 | /** |
89 | * | 91 | * Handle to listen socket, or NULL |
90 | */ | 92 | */ |
91 | struct GNUNET_NETWORK_Handle *lsock; | 93 | struct GNUNET_NETWORK_Handle *lsock; |
92 | 94 | ||
93 | /** | 95 | /** |
94 | * | 96 | * Head of list of nat activities. |
95 | */ | 97 | */ |
96 | struct NatActivity *head; | 98 | struct NatActivity *head; |
97 | 99 | ||
98 | /** | 100 | /** |
99 | * | 101 | * Tail of list of nat activities. |
100 | */ | 102 | */ |
101 | struct NatActivity *tail; | 103 | struct NatActivity *tail; |
102 | 104 | ||
103 | /** | 105 | /** |
104 | * | 106 | * Identity of task for the listen socket (if any) |
105 | */ | 107 | */ |
106 | GNUNET_SCHEDULER_TaskIdentifier ltask; | 108 | GNUNET_SCHEDULER_TaskIdentifier ltask; |
107 | 109 | ||
108 | /** | 110 | /** |
109 | * | 111 | * GNUNET_YES if we're testing TCP |
110 | */ | 112 | */ |
111 | int is_tcp; | 113 | int is_tcp; |
112 | 114 | ||
113 | /** | 115 | /** |
114 | * | 116 | * Data that should be transmitted or source-port. |
115 | */ | 117 | */ |
116 | uint16_t data; | 118 | uint16_t data; |
117 | 119 | ||
118 | /** | 120 | /** |
119 | * | 121 | * Advertised port to the other peer. |
120 | */ | 122 | */ |
121 | uint16_t adv_port; | 123 | uint16_t adv_port; |
122 | 124 | ||