diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-09 17:40:40 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-03 20:25:46 +0200 |
commit | 5a4239490c7fb7d732180a9d40f27f0247c56631 (patch) | |
tree | 5d118934b4a922a1c549f1cc96b31c09ee60be64 /src/providers/dp_dyndns.h | |
parent | 04868f1573f4b26ef34610b6d7069172f93bd8ab (diff) | |
download | sssd-5a4239490c7fb7d732180a9d40f27f0247c56631.tar.gz sssd-5a4239490c7fb7d732180a9d40f27f0247c56631.tar.xz sssd-5a4239490c7fb7d732180a9d40f27f0247c56631.zip |
dyndns: new option dyndns_refresh_interval
This new options adds the possibility of updating the DNS entries
periodically regardless if they have changed or not. This feature
will be useful mainly in AD environments where the Windows clients
periodically update their DNS records.
Diffstat (limited to 'src/providers/dp_dyndns.h')
-rw-r--r-- | src/providers/dp_dyndns.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/providers/dp_dyndns.h b/src/providers/dp_dyndns.h index 95403a3ae..e49ab8f03 100644 --- a/src/providers/dp_dyndns.h +++ b/src/providers/dp_dyndns.h @@ -29,12 +29,21 @@ /* dynamic dns helpers */ struct sss_iface_addr; +typedef void (*nsupdate_timer_fn_t)(void *pvt); + struct be_nsupdate_ctx { struct dp_option *opts; + + time_t last_refresh; + bool timer_in_progress; + struct tevent_timer *refresh_timer; + nsupdate_timer_fn_t timer_callback; + void *timer_pvt; }; enum dp_dyndns_opts { DP_OPT_DYNDNS_UPDATE, + DP_OPT_DYNDNS_REFRESH_INTERVAL, DP_OPT_DYNDNS_IFACE, DP_OPT_DYNDNS_TTL, @@ -48,7 +57,13 @@ errno_t be_nsupdate_check(void); errno_t be_nsupdate_init(TALLOC_CTX *mem_ctx, struct be_ctx *be_ctx, - struct dp_option *defopts, struct be_nsupdate_ctx **ctx); + struct dp_option *defopts, + nsupdate_timer_fn_t timer_callback, + void *timer_pvt, + struct be_nsupdate_ctx **_ctx); + +void be_nsupdate_timer_schedule(struct tevent_context *ev, + struct be_nsupdate_ctx *ctx); errno_t sss_iface_addr_list_get(TALLOC_CTX *mem_ctx, const char *ifname, |