aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-01-21 15:09:09 +0000
committerNathan S. Evans <evans@in.tum.de>2010-01-21 15:09:09 +0000
commit2597898339070c7f5d65dda8a46eaedd495abf50 (patch)
tree929252c641aa8605833849d54d0f5ca7ba7ade82 /src/transport
parent6b61acedd63ec9d3ec8fb1589b6baf2cbdf254a4 (diff)
downloadgnunet-2597898339070c7f5d65dda8a46eaedd495abf50.tar.gz
gnunet-2597898339070c7f5d65dda8a46eaedd495abf50.zip
start of ping pong changes
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-service-transport.c73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 65af6ffdb..e08a5cb60 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -393,6 +393,79 @@ struct NeighborList
393 393
394}; 394};
395 395
396/**
397 * Message used to ask a peer to validate receipt (to check an address
398 * from a HELLO). Followed by the address used. Note that the
399 * recipients response does not affirm that he has this address,
400 * only that he got the challenge message.
401 */
402struct TransportPingMessage
403{
404
405 /**
406 * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_PING
407 */
408 struct GNUNET_MessageHeader header;
409
410 /**
411 * Random challenge number (in network byte order).
412 */
413 uint32_t challenge GNUNET_PACKED;
414
415 /**
416 * Who is the intended recipient?
417 */
418 struct GNUNET_PeerIdentity target;
419
420};
421
422
423/**
424 * Message used to validate a HELLO. The challenge is included in the
425 * confirmation to make matching of replies to requests possible. The
426 * signature signs the original challenge number, our public key, the
427 * sender's address (so that the sender can check that the address we
428 * saw is plausible for him and possibly detect a MiM attack) and a
429 * timestamp (to limit replay).<p>
430 *
431 * This message is followed by the address of the
432 * client that we are observing (which is part of what
433 * is being signed).
434 */
435struct TransportPongMessage
436{
437
438 /**
439 * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_PONG
440 */
441 struct GNUNET_MessageHeader header;
442
443 /**
444 * For padding, always zero.
445 */
446 uint32_t reserved GNUNET_PACKED;
447
448 /**
449 * Signature.
450 */
451 struct GNUNET_CRYPTO_RsaSignature signature;
452
453 /**
454 * What are we signing and why?
455 */
456 struct GNUNET_CRYPTO_RsaSignaturePurpose purpose;
457
458 /**
459 * Random challenge number (in network byte order).
460 */
461 uint32_t challenge GNUNET_PACKED;
462
463 /**
464 * Who signed this message?
465 */
466 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded signer;
467
468};
396 469
397/** 470/**
398 * Linked list of messages to be transmitted to 471 * Linked list of messages to be transmitted to