summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap_dyndns.h
blob: 7aaff5d2c69fbda55fff5208c97b953b970c55cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
    SSSD

    sdap_dyndns.h: LDAP specific dynamic DNS update

    Authors:
        Jakub Hrozek <jhrozek@redhat.com>

    Copyright (C) 2013 Red Hat

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef SDAP_DYNDNS_H_
#define SDAP_DYNDNS_H_

#include "util/util.h"
#include "providers/dp_backend.h"
#include "providers/dp_dyndns.h"
#include "providers/ldap/ldap_common.h"

struct tevent_req *
sdap_dyndns_update_send(TALLOC_CTX *mem_ctx,
                        struct tevent_context *ev,
                        struct be_ctx *be_ctx,
                        struct dp_option *opts,
                        struct sdap_id_ctx *sdap_ctx,
                        enum be_nsupdate_auth auth_type,
                        const char *ifname,
                        const char *hostname,
                        const char *dns_zone,
                        const char *realm,
                        const char *servername,
                        const int ttl,
                        bool check_diff);

errno_t sdap_dyndns_update_recv(struct tevent_req *req);

/* Connects to the LDAP server in order to read the address from the
 * socket and be able to perform dynamic DNS updates. Reschedules the
 * task automatically on errors and sets/resets the timer_in_progress
 * guard in be_nsupdate_ctx.
 */
struct tevent_req *
sdap_dyndns_timer_conn_send(TALLOC_CTX *mem_ctx,
                            struct tevent_context *ev,
                            struct sdap_id_ctx *sdap_ctx,
                            struct be_nsupdate_ctx *dyndns_ctx);

errno_t sdap_dyndns_timer_conn_recv(struct tevent_req *req);

#endif /* SDAP_DYNDNS_H_ */