summaryrefslogtreecommitdiffstats
path: root/src/peer.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-10-16 18:33:51 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-10-16 18:33:51 +0200
commit118ebb9d65b44fb734aee3ebd31ecdaffd38c615 (patch)
treecfb4e9f8ad1364dbfe411e6c6dc6c5139b08016c /src/peer.h
parent4c188ac86175422bc44e88e037b01acaba781cb7 (diff)
downloadfastd-118ebb9d65b44fb734aee3ebd31ecdaffd38c615.tar
fastd-118ebb9d65b44fb734aee3ebd31ecdaffd38c615.zip
Initiate handshake when a packet can't be sent because the local address is invalid
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/peer.h b/src/peer.h
index 4d87e3a..12f591d 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -148,6 +148,10 @@ static inline void fastd_peer_unschedule_handshake(fastd_context_t *ctx UNUSED,
fastd_dlist_remove(&peer->handshake_entry);
}
+static inline bool fastd_peer_handshake_scheduled(fastd_context_t *ctx UNUSED, fastd_peer_t *peer) {
+ return fastd_dlist_linked(&peer->handshake_entry);
+}
+
const fastd_eth_addr_t* fastd_get_source_address(const fastd_context_t *ctx, fastd_buffer_t buffer);
const fastd_eth_addr_t* fastd_get_dest_address(const fastd_context_t *ctx, fastd_buffer_t buffer);