aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http.h
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-09-08 12:33:09 +0000
committerng0 <ng0@n0.is>2019-09-08 12:33:09 +0000
commitd41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb (patch)
tree9efd18ea7d425652085ed0bd5e8e45604bc5f6b9 /src/transport/plugin_transport_http.h
parenta0fce305c565c0937d917a92712f15e9c5736260 (diff)
downloadgnunet-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.h88
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 */
70struct Plugin 70struct 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
268GNUNET_NETWORK_STRUCT_BEGIN 266GNUNET_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 */
273struct HttpAddress 271struct 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 */
289struct IPv4HttpAddress 286struct 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 */
305struct IPv6HttpAddress 301struct IPv6HttpAddress {
306{
307 /** 302 /**
308 * IPv6 address. 303 * IPv6 address.
309 */ 304 */
@@ -317,8 +312,7 @@ struct IPv6HttpAddress
317GNUNET_NETWORK_STRUCT_END 312GNUNET_NETWORK_STRUCT_END
318 313
319 314
320struct ServerRequest 315struct 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 */
347struct GNUNET_ATS_Session 341struct 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 */
458struct HTTP_Message 451struct 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
499struct GNUNET_ATS_Session * 491struct GNUNET_ATS_Session *
500create_session (struct Plugin *plugin, 492create_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
506int 498int
507exist_session (struct Plugin *plugin, 499exist_session(struct Plugin *plugin,
508 struct GNUNET_ATS_Session *s); 500 struct GNUNET_ATS_Session *s);
509 501
510 502
511void 503void
512delete_session (struct GNUNET_ATS_Session *s); 504delete_session(struct GNUNET_ATS_Session *s);
513 505
514 506
515int 507int
516exist_session (struct Plugin *plugin, 508exist_session(struct Plugin *plugin,
517 struct GNUNET_ATS_Session *s); 509 struct GNUNET_ATS_Session *s);
518 510
519 511
520struct GNUNET_TIME_Relative 512struct GNUNET_TIME_Relative
521http_plugin_receive (void *cls, 513http_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
529const char * 521const char *
530http_plugin_address_to_string (void *cls, 522http_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
535int 527int
536client_disconnect (struct GNUNET_ATS_Session *s); 528client_disconnect(struct GNUNET_ATS_Session *s);
537 529
538 530
539int 531int
540client_connect (struct GNUNET_ATS_Session *s); 532client_connect(struct GNUNET_ATS_Session *s);
541 533
542 534
543int 535int
544client_send (struct GNUNET_ATS_Session *s, struct HTTP_Message *msg); 536client_send(struct GNUNET_ATS_Session *s, struct HTTP_Message *msg);
545 537
546 538
547int 539int
548client_start (struct Plugin *plugin); 540client_start(struct Plugin *plugin);
549 541
550 542
551void 543void
552client_stop (struct Plugin *plugin); 544client_stop(struct Plugin *plugin);
553 545
554 546
555int 547int
556server_disconnect (struct GNUNET_ATS_Session *s); 548server_disconnect(struct GNUNET_ATS_Session *s);
557 549
558 550
559int 551int
560server_send (struct GNUNET_ATS_Session *s, struct HTTP_Message *msg); 552server_send(struct GNUNET_ATS_Session *s, struct HTTP_Message *msg);
561 553
562 554
563int 555int
564server_start (struct Plugin *plugin); 556server_start(struct Plugin *plugin);
565 557
566 558
567void 559void
568server_stop (struct Plugin *plugin); 560server_stop(struct Plugin *plugin);
569 561
570 562
571void 563void
572notify_session_end (void *cls, 564notify_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*/