summaryrefslogtreecommitdiffstats
path: root/src/peer.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-04-16 07:29:55 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-04-16 07:29:55 +0200
commit872e0dfa86417e89022f84ac78b2d90236cb97d4 (patch)
tree640c04570466a9cf2d06eece32fdb5c07afde6cb /src/peer.h
parent3a87d747a015b2ff2150ed163ad56b1bc677e6b0 (diff)
downloadfastd-872e0dfa86417e89022f84ac78b2d90236cb97d4.tar
fastd-872e0dfa86417e89022f84ac78b2d90236cb97d4.zip
Lots of fixes and improvements on the resolver code
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);
}