From 329d15d50c54a69ce8e2be0865124744c0bf3428 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 5 Apr 2012 05:21:58 +0200 Subject: Implement reconfiguration on SIGHUP --- src/peer.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/peer.h') diff --git a/src/peer.h b/src/peer.h index d3b9cfe..94b9026 100644 --- a/src/peer.h +++ b/src/peer.h @@ -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); } -- cgit v1.2.3