summaryrefslogtreecommitdiffstats
path: root/src/peer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/peer.h b/src/peer.h
index 7521799..f8b0f84 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -67,6 +67,8 @@ struct _fastd_peer_eth_addr {
};
+bool fastd_peer_addr_equal(const fastd_peer_address *addr1, const fastd_peer_address *addr2);
+
fastd_peer_config* fastd_peer_config_new(fastd_context *ctx, fastd_config *conf);
void fastd_peer_config_free(fastd_peer_config *peer);
void fastd_peer_config_delete(fastd_context *ctx, fastd_config *conf);
@@ -87,10 +89,16 @@ static inline bool fastd_peer_config_is_floating(const fastd_peer_config *config
return (config->hostname == NULL && config->address.sa.sa_family == AF_UNSPEC);
}
+bool fastd_peer_config_matches_dynamic(const fastd_peer_config *config, const fastd_peer_address *addr);
+
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_dynamic(const fastd_peer *peer) {
+ return (peer->config && peer->config->hostname);
+}
+
static inline bool fastd_peer_is_waiting(const fastd_peer *peer) {
return (peer->state == STATE_WAIT);
}