diff options
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-nat-client-udp.c | 2 | ||||
-rw-r--r-- | src/transport/gnunet-nat-server-udp.c | 2 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport.c | 8 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_blacklist.c | 1 | ||||
-rw-r--r-- | src/transport/plugin_transport.h | 3 | ||||
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 1 | ||||
-rw-r--r-- | src/transport/plugin_transport_template.c | 12 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp.c | 19 | ||||
-rw-r--r-- | src/transport/transport_api.c | 2 |
9 files changed, 30 insertions, 20 deletions
diff --git a/src/transport/gnunet-nat-client-udp.c b/src/transport/gnunet-nat-client-udp.c index c17710b61..f594db20a 100644 --- a/src/transport/gnunet-nat-client-udp.c +++ b/src/transport/gnunet-nat-client-udp.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file src/transport/client-test.c | 22 | * @file src/transport/gnunet-nat-client-udp.c |
23 | * @brief Test for NAT traversal using ICMP method. | 23 | * @brief Test for NAT traversal using ICMP method. |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
diff --git a/src/transport/gnunet-nat-server-udp.c b/src/transport/gnunet-nat-server-udp.c index 693adbcf5..b1d221294 100644 --- a/src/transport/gnunet-nat-server-udp.c +++ b/src/transport/gnunet-nat-server-udp.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file src/transport/server-test.c | 22 | * @file src/transport/gnunet-nat-server-udp.c |
23 | * @brief Test for NAT traversal using ICMP method. | 23 | * @brief Test for NAT traversal using ICMP method. |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 3fbbc8804..e206da43e 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -1844,11 +1844,11 @@ check_pending_validation (void *cls, | |||
1844 | * (otherwise we may be seeing a MiM attack). | 1844 | * (otherwise we may be seeing a MiM attack). |
1845 | * | 1845 | * |
1846 | * @param cls closure | 1846 | * @param cls closure |
1847 | * @param name name of the transport that generated the address | 1847 | * @param message the pong message |
1848 | * @param peer who responded to our challenge | 1848 | * @param peer who responded to our challenge |
1849 | * @param challenge the challenge number we presumably used | ||
1850 | * @param sender_addr string describing our sender address (as observed | 1849 | * @param sender_addr string describing our sender address (as observed |
1851 | * by the other peer in human-readable format) | 1850 | * by the other peer in binary format) |
1851 | * @param sender_address_len number of bytes in 'sender_address' | ||
1852 | */ | 1852 | */ |
1853 | static void | 1853 | static void |
1854 | handle_pong (void *cls, const struct GNUNET_MessageHeader *message, | 1854 | handle_pong (void *cls, const struct GNUNET_MessageHeader *message, |
@@ -2215,7 +2215,7 @@ add_to_foreign_address_list (void *cls, | |||
2215 | * | 2215 | * |
2216 | * @param cls closure | 2216 | * @param cls closure |
2217 | * @param peer id of the peer, NULL for last call | 2217 | * @param peer id of the peer, NULL for last call |
2218 | * @param hello hello message for the peer (can be NULL) | 2218 | * @param h hello message for the peer (can be NULL) |
2219 | * @param trust amount of trust we have in the peer (not used) | 2219 | * @param trust amount of trust we have in the peer (not used) |
2220 | */ | 2220 | */ |
2221 | static void | 2221 | static void |
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index 6b90929f1..8f78f498f 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c | |||
@@ -250,6 +250,7 @@ GNUNET_TRANSPORT_blacklist_check (const struct GNUNET_PeerIdentity *id) | |||
250 | /** | 250 | /** |
251 | * Initialize the blacklisting subsystem. | 251 | * Initialize the blacklisting subsystem. |
252 | * | 252 | * |
253 | * @param server server of the transport service | ||
253 | * @param s scheduler to use | 254 | * @param s scheduler to use |
254 | */ | 255 | */ |
255 | void | 256 | void |
diff --git a/src/transport/plugin_transport.h b/src/transport/plugin_transport.h index e00c97799..2630ffbad 100644 --- a/src/transport/plugin_transport.h +++ b/src/transport/plugin_transport.h | |||
@@ -171,7 +171,8 @@ typedef void | |||
171 | * | 171 | * |
172 | * @param cls closure | 172 | * @param cls closure |
173 | * @param target who should receive this message | 173 | * @param target who should receive this message |
174 | * @param msg the message to transmit | 174 | * @param msgbuf the message to transmit |
175 | * @param msgbuf_size number of bytes in 'msgbuf' | ||
175 | * @param priority how important is the message (most plugins will | 176 | * @param priority how important is the message (most plugins will |
176 | * ignore message priority and just FIFO) | 177 | * ignore message priority and just FIFO) |
177 | * @param timeout how long to wait at most for the transmission (does not | 178 | * @param timeout how long to wait at most for the transmission (does not |
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 05a7c2eb0..7135d5ddc 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -557,6 +557,7 @@ disconnect_session (struct Session *session) | |||
557 | * @param cls closure | 557 | * @param cls closure |
558 | * @param target who should receive this message | 558 | * @param target who should receive this message |
559 | * @param msg the message to transmit | 559 | * @param msg the message to transmit |
560 | * @param msgbuf_size number of bytes in 'msg' | ||
560 | * @param priority how important is the message (most plugins will | 561 | * @param priority how important is the message (most plugins will |
561 | * ignore message priority and just FIFO) | 562 | * ignore message priority and just FIFO) |
562 | * @param timeout how long to wait at most for the transmission (does not | 563 | * @param timeout how long to wait at most for the transmission (does not |
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c index bac9bcd82..fc1c1722b 100644 --- a/src/transport/plugin_transport_template.c +++ b/src/transport/plugin_transport_template.c | |||
@@ -136,13 +136,23 @@ struct Plugin | |||
136 | * @param cls closure | 136 | * @param cls closure |
137 | * @param target who should receive this message | 137 | * @param target who should receive this message |
138 | * @param priority how important is the message | 138 | * @param priority how important is the message |
139 | * @param msg the message to transmit | 139 | * @param msgbuf the message to transmit |
140 | * @param msgbuf_size number of bytes in 'msgbuf' | ||
140 | * @param timeout when should we time out | 141 | * @param timeout when should we time out |
142 | * @param addr the address to use (can be NULL if the plugin | ||
143 | * is "on its own" (i.e. re-use existing TCP connection)) | ||
144 | * @param addrlen length of the address in bytes | ||
145 | * @param force_address GNUNET_YES if the plugin MUST use the given address, | ||
146 | * otherwise the plugin may use other addresses or | ||
147 | * existing connections (if available) | ||
141 | * @param cont continuation to call once the message has | 148 | * @param cont continuation to call once the message has |
142 | * been transmitted (or if the transport is ready | 149 | * been transmitted (or if the transport is ready |
143 | * for the next transmission call; or if the | 150 | * for the next transmission call; or if the |
144 | * peer disconnected...) | 151 | * peer disconnected...) |
145 | * @param cont_cls closure for cont | 152 | * @param cont_cls closure for cont |
153 | * @return number of bytes used (on the physical network, with overheads); | ||
154 | * -1 on hard errors (i.e. address invalid); 0 is a legal value | ||
155 | * and does NOT mean that the message was not transmitted (DV) | ||
146 | */ | 156 | */ |
147 | static ssize_t | 157 | static ssize_t |
148 | template_plugin_send (void *cls, | 158 | template_plugin_send (void *cls, |
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 94222bd6d..be8e2848c 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -75,8 +75,6 @@ struct UDPMessage | |||
75 | 75 | ||
76 | }; | 76 | }; |
77 | 77 | ||
78 | /* Forward definition */ | ||
79 | struct Plugin; | ||
80 | 78 | ||
81 | struct PrettyPrinterContext | 79 | struct PrettyPrinterContext |
82 | { | 80 | { |
@@ -111,6 +109,11 @@ struct Plugin | |||
111 | struct GNUNET_RESOLVER_RequestHandle *hostname_dns; | 109 | struct GNUNET_RESOLVER_RequestHandle *hostname_dns; |
112 | 110 | ||
113 | /** | 111 | /** |
112 | * FD Read set | ||
113 | */ | ||
114 | struct GNUNET_NETWORK_FDSet *rs; | ||
115 | |||
116 | /** | ||
114 | * ID of task used to update our addresses when one expires. | 117 | * ID of task used to update our addresses when one expires. |
115 | */ | 118 | */ |
116 | GNUNET_SCHEDULER_TaskIdentifier address_update_task; | 119 | GNUNET_SCHEDULER_TaskIdentifier address_update_task; |
@@ -131,11 +134,6 @@ struct Plugin | |||
131 | */ | 134 | */ |
132 | uint16_t adv_port; | 135 | uint16_t adv_port; |
133 | 136 | ||
134 | /* | ||
135 | * FD Read set | ||
136 | */ | ||
137 | struct GNUNET_NETWORK_FDSet *rs; | ||
138 | |||
139 | }; | 137 | }; |
140 | 138 | ||
141 | /* *********** globals ************* */ | 139 | /* *********** globals ************* */ |
@@ -148,13 +146,14 @@ static struct GNUNET_NETWORK_Handle *udp_sock; | |||
148 | /** | 146 | /** |
149 | * Disconnect from a remote node. | 147 | * Disconnect from a remote node. |
150 | * | 148 | * |
151 | * @param tsession the session that is closed | 149 | * @param cls closure ('struct Plugin'), unused |
150 | * @param target peer do disconnect | ||
152 | * @return GNUNET_OK on success, GNUNET_SYSERR if the operation failed | 151 | * @return GNUNET_OK on success, GNUNET_SYSERR if the operation failed |
153 | */ | 152 | */ |
154 | void | 153 | void |
155 | udp_disconnect (void *cls, const struct GNUNET_PeerIdentity *target) | 154 | udp_disconnect (void *cls, const struct GNUNET_PeerIdentity *target) |
156 | { | 155 | { |
157 | return; | 156 | /* nothing to do, UDP is stateless */ |
158 | } | 157 | } |
159 | 158 | ||
160 | /** | 159 | /** |
@@ -187,7 +186,7 @@ udp_transport_server_stop (void *cls) | |||
187 | * @param cls closure | 186 | * @param cls closure |
188 | * @param target who should receive this message (ignored by UDP) | 187 | * @param target who should receive this message (ignored by UDP) |
189 | * @param msgbuf one or more GNUNET_MessageHeader(s) strung together | 188 | * @param msgbuf one or more GNUNET_MessageHeader(s) strung together |
190 | * @param msgbufsize the size of the msgbuf to send | 189 | * @param msgbuf_size the size of the msgbuf to send |
191 | * @param priority how important is the message (ignored by UDP) | 190 | * @param priority how important is the message (ignored by UDP) |
192 | * @param timeout when should we time out (give up) if we can not transmit? | 191 | * @param timeout when should we time out (give up) if we can not transmit? |
193 | * @param addr the addr to send the message to, needs to be a sockaddr for us | 192 | * @param addr the addr to send the message to, needs to be a sockaddr for us |
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 9e326c9aa..b98cabf0b 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -897,7 +897,6 @@ GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle, | |||
897 | * Obtain the HELLO message for this peer. | 897 | * Obtain the HELLO message for this peer. |
898 | * | 898 | * |
899 | * @param handle connection to transport service | 899 | * @param handle connection to transport service |
900 | * @param timeout how long to wait for the HELLO | ||
901 | * @param rec function to call with the HELLO, sender will be our peer | 900 | * @param rec function to call with the HELLO, sender will be our peer |
902 | * identity; message and sender will be NULL on timeout | 901 | * identity; message and sender will be NULL on timeout |
903 | * (handshake with transport service pending/failed). | 902 | * (handshake with transport service pending/failed). |
@@ -1059,7 +1058,6 @@ send_start (void *cls, size_t size, void *buf) | |||
1059 | /** | 1058 | /** |
1060 | * Free neighbour. | 1059 | * Free neighbour. |
1061 | * | 1060 | * |
1062 | * @param h our state | ||
1063 | * @param n the entry to free | 1061 | * @param n the entry to free |
1064 | */ | 1062 | */ |
1065 | static void | 1063 | static void |