diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-05 05:21:58 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-05 05:21:58 +0200 |
commit | 329d15d50c54a69ce8e2be0865124744c0bf3428 (patch) | |
tree | 34734e0ed120a83069738a0a51df9bdd1a664640 /src/peer.h | |
parent | cbf0166a7f12f71747c495b5ea68ff676c1a7868 (diff) | |
download | fastd-329d15d50c54a69ce8e2be0865124744c0bf3428.tar fastd-329d15d50c54a69ce8e2be0865124744c0bf3428.zip |
Implement reconfiguration on SIGHUP
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -54,7 +54,7 @@ struct _fastd_peer { struct _fastd_peer_config { fastd_peer_config *next; - char *config_source_dir; + const char *config_source_dir; bool enabled; char *name; @@ -73,7 +73,10 @@ struct _fastd_peer_eth_addr { 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); +void fastd_peer_config_purge(fastd_context *ctx, fastd_peer_config *conf); +bool fastd_peer_config_equal(const fastd_peer_config *peer1, const fastd_peer_config *peer2); void fastd_peer_reset(fastd_context *ctx, fastd_peer *peer); fastd_peer* fastd_peer_add(fastd_context *ctx, fastd_peer_config *conf); @@ -92,6 +95,10 @@ 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_waiting(const fastd_peer *peer) { + return (peer->state == STATE_WAIT); +} + static inline bool fastd_peer_is_temporary(const fastd_peer *peer) { return (peer->state == STATE_TEMP); } |