diff options
author | ng0 <ng0@n0.is> | 2019-09-08 12:33:09 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-09-08 12:33:09 +0000 |
commit | d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb (patch) | |
tree | 9efd18ea7d425652085ed0bd5e8e45604bc5f6b9 /src/transport/plugin_transport_http.h | |
parent | a0fce305c565c0937d917a92712f15e9c5736260 (diff) | |
download | gnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.tar.gz gnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.zip |
uncrustify as demanded.
Diffstat (limited to 'src/transport/plugin_transport_http.h')
-rw-r--r-- | src/transport/plugin_transport_http.h | 88 |
1 files changed, 40 insertions, 48 deletions
diff --git a/src/transport/plugin_transport_http.h b/src/transport/plugin_transport_http.h index b6ada8f86..4ad8f6e58 100644 --- a/src/transport/plugin_transport_http.h +++ b/src/transport/plugin_transport_http.h | |||
@@ -11,12 +11,12 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file transport/plugin_transport_http.h | 22 | * @file transport/plugin_transport_http.h |
@@ -62,13 +62,12 @@ | |||
62 | #define OUTBOUND GNUNET_NO | 62 | #define OUTBOUND GNUNET_NO |
63 | 63 | ||
64 | 64 | ||
65 | #define HTTP_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) | 65 | #define HTTP_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 15) |
66 | 66 | ||
67 | /** | 67 | /** |
68 | * Encapsulation of all of the state of the plugin. | 68 | * Encapsulation of all of the state of the plugin. |
69 | */ | 69 | */ |
70 | struct Plugin | 70 | struct Plugin { |
71 | { | ||
72 | /** | 71 | /** |
73 | * Our environment. | 72 | * Our environment. |
74 | */ | 73 | */ |
@@ -262,7 +261,6 @@ struct Plugin | |||
262 | * curl perform task | 261 | * curl perform task |
263 | */ | 262 | */ |
264 | struct GNUNET_SCHEDULER_Task * client_perform_task; | 263 | struct GNUNET_SCHEDULER_Task * client_perform_task; |
265 | |||
266 | }; | 264 | }; |
267 | 265 | ||
268 | GNUNET_NETWORK_STRUCT_BEGIN | 266 | GNUNET_NETWORK_STRUCT_BEGIN |
@@ -270,8 +268,7 @@ GNUNET_NETWORK_STRUCT_BEGIN | |||
270 | /** | 268 | /** |
271 | * HTTP addresses including a full URI | 269 | * HTTP addresses including a full URI |
272 | */ | 270 | */ |
273 | struct HttpAddress | 271 | struct HttpAddress { |
274 | { | ||
275 | /** | 272 | /** |
276 | * Length of the address following in NBO | 273 | * Length of the address following in NBO |
277 | */ | 274 | */ |
@@ -286,8 +283,7 @@ struct HttpAddress | |||
286 | /** | 283 | /** |
287 | * IPv4 addresses | 284 | * IPv4 addresses |
288 | */ | 285 | */ |
289 | struct IPv4HttpAddress | 286 | struct IPv4HttpAddress { |
290 | { | ||
291 | /** | 287 | /** |
292 | * IPv4 address, in network byte order. | 288 | * IPv4 address, in network byte order. |
293 | */ | 289 | */ |
@@ -302,8 +298,7 @@ struct IPv4HttpAddress | |||
302 | /** | 298 | /** |
303 | * IPv4 addresses | 299 | * IPv4 addresses |
304 | */ | 300 | */ |
305 | struct IPv6HttpAddress | 301 | struct IPv6HttpAddress { |
306 | { | ||
307 | /** | 302 | /** |
308 | * IPv6 address. | 303 | * IPv6 address. |
309 | */ | 304 | */ |
@@ -317,8 +312,7 @@ struct IPv6HttpAddress | |||
317 | GNUNET_NETWORK_STRUCT_END | 312 | GNUNET_NETWORK_STRUCT_END |
318 | 313 | ||
319 | 314 | ||
320 | struct ServerRequest | 315 | struct ServerRequest { |
321 | { | ||
322 | /** | 316 | /** |
323 | * _RECV or _SEND | 317 | * _RECV or _SEND |
324 | */ | 318 | */ |
@@ -344,8 +338,7 @@ struct ServerRequest | |||
344 | /** | 338 | /** |
345 | * Session handle for connections. | 339 | * Session handle for connections. |
346 | */ | 340 | */ |
347 | struct GNUNET_ATS_Session | 341 | struct GNUNET_ATS_Session { |
348 | { | ||
349 | /** | 342 | /** |
350 | * To whom are we talking to | 343 | * To whom are we talking to |
351 | */ | 344 | */ |
@@ -455,8 +448,7 @@ struct GNUNET_ATS_Session | |||
455 | /** | 448 | /** |
456 | * Message to send using http | 449 | * Message to send using http |
457 | */ | 450 | */ |
458 | struct HTTP_Message | 451 | struct HTTP_Message { |
459 | { | ||
460 | /** | 452 | /** |
461 | * next pointer for double linked list | 453 | * next pointer for double linked list |
462 | */ | 454 | */ |
@@ -497,81 +489,81 @@ struct HTTP_Message | |||
497 | 489 | ||
498 | 490 | ||
499 | struct GNUNET_ATS_Session * | 491 | struct GNUNET_ATS_Session * |
500 | create_session (struct Plugin *plugin, | 492 | create_session(struct Plugin *plugin, |
501 | const struct GNUNET_PeerIdentity *target, | 493 | const struct GNUNET_PeerIdentity *target, |
502 | const void *addr, | 494 | const void *addr, |
503 | size_t addrlen); | 495 | size_t addrlen); |
504 | 496 | ||
505 | 497 | ||
506 | int | 498 | int |
507 | exist_session (struct Plugin *plugin, | 499 | exist_session(struct Plugin *plugin, |
508 | struct GNUNET_ATS_Session *s); | 500 | struct GNUNET_ATS_Session *s); |
509 | 501 | ||
510 | 502 | ||
511 | void | 503 | void |
512 | delete_session (struct GNUNET_ATS_Session *s); | 504 | delete_session(struct GNUNET_ATS_Session *s); |
513 | 505 | ||
514 | 506 | ||
515 | int | 507 | int |
516 | exist_session (struct Plugin *plugin, | 508 | exist_session(struct Plugin *plugin, |
517 | struct GNUNET_ATS_Session *s); | 509 | struct GNUNET_ATS_Session *s); |
518 | 510 | ||
519 | 511 | ||
520 | struct GNUNET_TIME_Relative | 512 | struct GNUNET_TIME_Relative |
521 | http_plugin_receive (void *cls, | 513 | http_plugin_receive(void *cls, |
522 | const struct GNUNET_PeerIdentity *peer, | 514 | const struct GNUNET_PeerIdentity *peer, |
523 | const struct GNUNET_MessageHeader *message, | 515 | const struct GNUNET_MessageHeader *message, |
524 | struct GNUNET_ATS_Session *session, | 516 | struct GNUNET_ATS_Session *session, |
525 | const char *sender_address, | 517 | const char *sender_address, |
526 | uint16_t sender_address_len); | 518 | uint16_t sender_address_len); |
527 | 519 | ||
528 | 520 | ||
529 | const char * | 521 | const char * |
530 | http_plugin_address_to_string (void *cls, | 522 | http_plugin_address_to_string(void *cls, |
531 | const void *addr, | 523 | const void *addr, |
532 | size_t addrlen); | 524 | size_t addrlen); |
533 | 525 | ||
534 | 526 | ||
535 | int | 527 | int |
536 | client_disconnect (struct GNUNET_ATS_Session *s); | 528 | client_disconnect(struct GNUNET_ATS_Session *s); |
537 | 529 | ||
538 | 530 | ||
539 | int | 531 | int |
540 | client_connect (struct GNUNET_ATS_Session *s); | 532 | client_connect(struct GNUNET_ATS_Session *s); |
541 | 533 | ||
542 | 534 | ||
543 | int | 535 | int |
544 | client_send (struct GNUNET_ATS_Session *s, struct HTTP_Message *msg); | 536 | client_send(struct GNUNET_ATS_Session *s, struct HTTP_Message *msg); |
545 | 537 | ||
546 | 538 | ||
547 | int | 539 | int |
548 | client_start (struct Plugin *plugin); | 540 | client_start(struct Plugin *plugin); |
549 | 541 | ||
550 | 542 | ||
551 | void | 543 | void |
552 | client_stop (struct Plugin *plugin); | 544 | client_stop(struct Plugin *plugin); |
553 | 545 | ||
554 | 546 | ||
555 | int | 547 | int |
556 | server_disconnect (struct GNUNET_ATS_Session *s); | 548 | server_disconnect(struct GNUNET_ATS_Session *s); |
557 | 549 | ||
558 | 550 | ||
559 | int | 551 | int |
560 | server_send (struct GNUNET_ATS_Session *s, struct HTTP_Message *msg); | 552 | server_send(struct GNUNET_ATS_Session *s, struct HTTP_Message *msg); |
561 | 553 | ||
562 | 554 | ||
563 | int | 555 | int |
564 | server_start (struct Plugin *plugin); | 556 | server_start(struct Plugin *plugin); |
565 | 557 | ||
566 | 558 | ||
567 | void | 559 | void |
568 | server_stop (struct Plugin *plugin); | 560 | server_stop(struct Plugin *plugin); |
569 | 561 | ||
570 | 562 | ||
571 | void | 563 | void |
572 | notify_session_end (void *cls, | 564 | notify_session_end(void *cls, |
573 | const struct GNUNET_PeerIdentity *peer, | 565 | const struct GNUNET_PeerIdentity *peer, |
574 | struct GNUNET_ATS_Session *s); | 566 | struct GNUNET_ATS_Session *s); |
575 | 567 | ||
576 | 568 | ||
577 | /*#ifndef PLUGIN_TRANSPORT_HTTP_H*/ | 569 | /*#ifndef PLUGIN_TRANSPORT_HTTP_H*/ |