aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_peer.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2020-06-05 16:48:29 +0200
committert3sserakt <t3ss@posteo.de>2020-06-05 16:48:29 +0200
commit11dbdc79aeb05e82913ac70cf2ac8d4f45b02c28 (patch)
tree27626cd1ad6e5e0fd2654657b925a1be8508008d /src/cadet/gnunet-service-cadet_peer.c
parentd22eacb13eb676b5c096b47c72a3fdbdb332d5a5 (diff)
downloadgnunet-11dbdc79aeb05e82913ac70cf2ac8d4f45b02c28.tar.gz
gnunet-11dbdc79aeb05e82913ac70cf2ac8d4f45b02c28.zip
- forgot to actually add a file and some method documentations.
Diffstat (limited to 'src/cadet/gnunet-service-cadet_peer.c')
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index 0ff4d1fb8..55800b88c 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -1552,17 +1552,12 @@ GCP_send_ooo (struct CadetPeer *cp,
1552 env); 1552 env);
1553} 1553}
1554 1554
1555/* 1555/**
1556 * FIXME: comment 1556 * Checking if a monotime value is newer than the last monotime value received from a peer. If the time value is newer it will be stored at the peer.
1557 */ 1557 *
1558void 1558 * @param peer The peer we received a new time value from.
1559GCP_update_monotime (struct CadetPeer *peer) 1559 * @param monotime Time value we check against the last time value we received from a peer.
1560{ 1560 * @return GNUNET_YES if monotime is newer than the last received time value, GNUNET_NO if monotime is not newer.
1561 peer->last_connection_create = GNUNET_TIME_absolute_get_monotonic (cfg);
1562}
1563
1564/*
1565 * FIXME: comment
1566 */ 1561 */
1567int 1562int
1568GCP_check_and_update_monotime (struct CadetPeer *peer, 1563GCP_check_and_update_monotime (struct CadetPeer *peer,
@@ -1579,16 +1574,17 @@ GCP_check_and_update_monotime (struct CadetPeer *peer,
1579 return GNUNET_NO; 1574 return GNUNET_NO;
1580} 1575}
1581 1576
1582/* 1577/**
1583 * FIXME: documentation here 1578 * Checking the signature for a monotime of a GNUNET_CADET_ConnectionCreateMessage.
1579 *
1580 * @param peer The peer that signed the monotime value.
1581 * @param msg The GNUNET_CADET_ConnectionCreateMessage with the monotime value.
1582 * @return GNUNET_OK if the signature is good, GNUNET_SYSERR if not.
1584 */ 1583 */
1585int 1584int
1586GCP_check_monotime_sig (struct CadetPeer *peer, const struct 1585GCP_check_monotime_sig (struct CadetPeer *peer,
1587 GNUNET_CADET_ConnectionCreateMessage *msg) 1586 const struct GNUNET_CADET_ConnectionCreateMessage *msg)
1588{ 1587{
1589 // struct CadetPeer *peer;
1590 // const struct GNUNET_CADET_ConnectionCreateMessage *msg;
1591
1592 struct CadetConnectionCreatePS cp = { .purpose.purpose = htonl ( 1588 struct CadetConnectionCreatePS cp = { .purpose.purpose = htonl (
1593 GNUNET_SIGNATURE_PURPOSE_CADET_CONNECTION_INITIATOR), 1589 GNUNET_SIGNATURE_PURPOSE_CADET_CONNECTION_INITIATOR),
1594 .purpose.size = htonl (sizeof(cp)), 1590 .purpose.size = htonl (sizeof(cp)),