summaryrefslogtreecommitdiffstats
path: root/src/peer.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-08 01:47:34 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-08 01:47:34 +0100
commit5268f248c91fb03f2de2a942a1eb1f171be96123 (patch)
treebc6690ef31132800dda4594559b952bc52dc4379 /src/peer.h
parent4b707f3076d0208a860e8c4fa5e05a85e09a2102 (diff)
downloadfastd-5268f248c91fb03f2de2a942a1eb1f171be96123.tar
fastd-5268f248c91fb03f2de2a942a1eb1f171be96123.zip
New and improved handshake
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/peer.h b/src/peer.h
index 8a1ca7e..4668243 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -81,15 +81,15 @@ static inline bool fastd_peer_config_is_floating(const fastd_peer_config *config
return (config->address.sa.sa_family == AF_UNSPEC);
}
-static inline bool fastd_peer_is_floating(fastd_peer *peer) {
+static inline bool fastd_peer_is_floating(const fastd_peer *peer) {
return (peer->config && fastd_peer_config_is_floating(peer->config));
}
-static inline bool fastd_peer_is_temporary(fastd_peer *peer) {
+static inline bool fastd_peer_is_temporary(const fastd_peer *peer) {
return (peer->state == STATE_TEMP || peer->state == STATE_TEMP_ESTABLISHED);
}
-static inline bool fastd_peer_is_established(fastd_peer *peer) {
+static inline bool fastd_peer_is_established(const fastd_peer *peer) {
return (peer->state == STATE_ESTABLISHED || peer->state == STATE_TEMP_ESTABLISHED);
}
@@ -105,7 +105,10 @@ static inline void fastd_peer_set_established(fastd_context *ctx, fastd_peer *pe
default:
pr_warn(ctx, "tried to set an already established connection to established");
+ return;
}
+
+ pr_info(ctx, "Connection with %P established.", peer);
}
static inline bool fastd_eth_addr_is_unicast(const fastd_eth_addr *addr) {