Commit 289d2117 authored by Daniel Salzman's avatar Daniel Salzman

Remove _t suffix from struct names

parent 7e1bf96b
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
#include <stddef.h> #include <stddef.h>
struct ref_t; struct ref;
/*! \brief Prototype for object destructor callback. */ /*! \brief Prototype for object destructor callback. */
typedef void (*ref_destructor_t)(struct ref_t * p); typedef void (*ref_destructor_t)(struct ref * p);
/*! /*!
* \brief Structure for reference counting. * \brief Structure for reference counting.
...@@ -51,7 +51,7 @@ typedef void (*ref_destructor_t)(struct ref_t * p); ...@@ -51,7 +51,7 @@ typedef void (*ref_destructor_t)(struct ref_t * p);
* } * }
* \endcode * \endcode
*/ */
typedef struct ref_t { typedef struct ref {
size_t count; /*! \brief Reference counter. */ size_t count; /*! \brief Reference counter. */
ref_destructor_t dtor; /*! \brief Object destructor function. */ ref_destructor_t dtor; /*! \brief Object destructor function. */
} ref_t; } ref_t;
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
* used in the configuration. Same interface could be used for * used in the configuration. Same interface could be used for
* listening and outgoing function. * listening and outgoing function.
*/ */
typedef struct conf_iface_t { typedef struct conf_iface {
node_t n; node_t n;
char *name; /*!< Internal name for the interface. */ char *name; /*!< Internal name for the interface. */
knot_tsig_key_t *key; /*!< TSIG key (only applic for remotes). */ knot_tsig_key_t *key; /*!< TSIG key (only applic for remotes). */
...@@ -79,7 +79,7 @@ typedef struct conf_iface_t { ...@@ -79,7 +79,7 @@ typedef struct conf_iface_t {
* *
* Used for zone ACL lists to prevent node duplication. * Used for zone ACL lists to prevent node duplication.
*/ */
typedef struct conf_remote_t { typedef struct conf_remote {
node_t n; /*!< List node. */ node_t n; /*!< List node. */
conf_iface_t *remote; /*!< Pointer to interface descriptor. */ conf_iface_t *remote; /*!< Pointer to interface descriptor. */
} conf_remote_t; } conf_remote_t;
...@@ -89,7 +89,7 @@ typedef struct conf_remote_t { ...@@ -89,7 +89,7 @@ typedef struct conf_remote_t {
* *
* Holds the name of a remote in the list. * Holds the name of a remote in the list.
*/ */
typedef struct conf_group_remote_t { typedef struct conf_group_remote {
node_t n; node_t n;
char *name; char *name;
} conf_group_remote_t; } conf_group_remote_t;
...@@ -97,7 +97,7 @@ typedef struct conf_group_remote_t { ...@@ -97,7 +97,7 @@ typedef struct conf_group_remote_t {
/*! /*!
* \brief Group of remotes. * \brief Group of remotes.
*/ */
typedef struct conf_group_t { typedef struct conf_group {
node_t n; /*!< List node. */ node_t n; /*!< List node. */
char *name; /*!< Unique name of the group. */ char *name; /*!< Unique name of the group. */
list_t remotes; /*!< List of remote names. */ list_t remotes; /*!< List of remote names. */
...@@ -112,7 +112,7 @@ typedef struct conf_group_t { ...@@ -112,7 +112,7 @@ typedef struct conf_group_t {
* as a source for the zone transfer and multiple DNS servers to allow * as a source for the zone transfer and multiple DNS servers to allow
* zone transfers. Same logic applies for the NOTIFY. * zone transfers. Same logic applies for the NOTIFY.
*/ */
typedef struct conf_zone_t { typedef struct conf_zone {
char *name; /*!< Zone name. */ char *name; /*!< Zone name. */
char *file; /*!< Path to a zone file. */ char *file; /*!< Path to a zone file. */
char *storage; /*!< Path to a storage dir. */ char *storage; /*!< Path to a storage dir. */
...@@ -162,7 +162,7 @@ typedef enum conf_section_t { ...@@ -162,7 +162,7 @@ typedef enum conf_section_t {
/*! /*!
* \brief TSIG key list item. * \brief TSIG key list item.
*/ */
typedef struct conf_key_t { typedef struct conf_key {
node_t n; node_t n;
knot_tsig_key_t k; knot_tsig_key_t k;
} conf_key_t; } conf_key_t;
...@@ -170,7 +170,7 @@ typedef struct conf_key_t { ...@@ -170,7 +170,7 @@ typedef struct conf_key_t {
/*! /*!
* \brief Remote control interface. * \brief Remote control interface.
*/ */
typedef struct conf_control_t { typedef struct conf_control {
conf_iface_t *iface; /*!< Remote control interface. */ conf_iface_t *iface; /*!< Remote control interface. */
list_t allow; /*!< List of allowed remotes. */ list_t allow; /*!< List of allowed remotes. */
bool have; /*!< Set if configured. */ bool have; /*!< Set if configured. */
...@@ -181,7 +181,7 @@ typedef struct conf_control_t { ...@@ -181,7 +181,7 @@ typedef struct conf_control_t {
* *
* Configuration structure. * Configuration structure.
*/ */
typedef struct conf_t { typedef struct conf {
/* /*
* System * System
*/ */
...@@ -265,7 +265,7 @@ typedef struct conf_t { ...@@ -265,7 +265,7 @@ typedef struct conf_t {
/*! /*!
* \brief Config hook prototype. * \brief Config hook prototype.
*/ */
typedef struct conf_hook_t { typedef struct conf_hook {
node_t n; node_t n;
int sections; /*!< Bitmask of watched sections. */ int sections; /*!< Bitmask of watched sections. */
int (*update)(const conf_t*, void*); /*!< Function executed on config load. */ int (*update)(const conf_t*, void*); /*!< Function executed on config load. */
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#define KNOT_CTL_SOCKET_UMASK 0007 #define KNOT_CTL_SOCKET_UMASK 0007
/*! \brief Remote command structure. */ /*! \brief Remote command structure. */
typedef struct remote_cmdargs_t { typedef struct remote_cmdargs {
const knot_rrset_t *arg; const knot_rrset_t *arg;
unsigned argc; unsigned argc;
knot_rcode_t rc; knot_rcode_t rc;
...@@ -106,7 +106,7 @@ typedef int (*remote_cmdf_t)(server_t*, remote_cmdargs_t*); ...@@ -106,7 +106,7 @@ typedef int (*remote_cmdf_t)(server_t*, remote_cmdargs_t*);
typedef int (remote_zonef_t)(zone_t *); typedef int (remote_zonef_t)(zone_t *);
/*! \brief Remote command table item. */ /*! \brief Remote command table item. */
typedef struct remote_cmd_t { typedef struct remote_cmd {
const char *name; const char *name;
remote_cmdf_t f; remote_cmdf_t f;
} remote_cmd_t; } remote_cmd_t;
...@@ -122,7 +122,7 @@ static int remote_c_flush(server_t *s, remote_cmdargs_t* a); ...@@ -122,7 +122,7 @@ static int remote_c_flush(server_t *s, remote_cmdargs_t* a);
static int remote_c_signzone(server_t *s, remote_cmdargs_t* a); static int remote_c_signzone(server_t *s, remote_cmdargs_t* a);
/*! \brief Table of remote commands. */ /*! \brief Table of remote commands. */
struct remote_cmd_t remote_cmd_tbl[] = { struct remote_cmd remote_cmd_tbl[] = {
{ "stop", &remote_c_stop }, { "stop", &remote_c_stop },
{ "reload", &remote_c_reload }, { "reload", &remote_c_reload },
{ "refresh", &remote_c_refresh }, { "refresh", &remote_c_refresh },
......
...@@ -81,7 +81,7 @@ int query_plan_step(struct query_plan *plan, int stage, qmodule_process_t proces ...@@ -81,7 +81,7 @@ int query_plan_step(struct query_plan *plan, int stage, qmodule_process_t proces
return KNOT_EOK; return KNOT_EOK;
} }
struct query_module *query_module_open(struct conf_t *config, const char *name, struct query_module *query_module_open(struct conf *config, const char *name,
const char *param, mm_ctx_t *mm) const char *param, mm_ctx_t *mm)
{ {
/* Locate compiled-in modules. */ /* Locate compiled-in modules. */
......
...@@ -61,7 +61,7 @@ enum query_stage { ...@@ -61,7 +61,7 @@ enum query_stage {
struct query_data; struct query_data;
struct query_module; struct query_module;
struct query_plan; struct query_plan;
struct conf_t; struct conf;
/* Module callback required API. */ /* Module callback required API. */
typedef int (*qmodule_load_t)(struct query_plan *plan, struct query_module *self); typedef int (*qmodule_load_t)(struct query_plan *plan, struct query_module *self);
...@@ -78,7 +78,7 @@ struct query_module { ...@@ -78,7 +78,7 @@ struct query_module {
void *ctx; void *ctx;
char *param; char *param;
mm_ctx_t *mm; mm_ctx_t *mm;
struct conf_t *config; struct conf *config;
qmodule_load_t load; qmodule_load_t load;
qmodule_unload_t unload; qmodule_unload_t unload;
}; };
...@@ -112,7 +112,7 @@ int query_plan_step(struct query_plan *plan, int stage, qmodule_process_t proces ...@@ -112,7 +112,7 @@ int query_plan_step(struct query_plan *plan, int stage, qmodule_process_t proces
* \brief Open query module identified by name. * \brief Open query module identified by name.
* \note Module 'load' hook is NOT called and left upon a caller to decide. * \note Module 'load' hook is NOT called and left upon a caller to decide.
*/ */
struct query_module *query_module_open(struct conf_t *config, const char *name, struct query_module *query_module_open(struct conf *config, const char *name,
const char *param, mm_ctx_t *mm); const char *param, mm_ctx_t *mm);
/*! /*!
......
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
#include <pthread.h> #include <pthread.h>
/* Forward decls */ /* Forward decls */
struct dthread_t; struct dthread;
struct dt_unit_t; struct dt_unit;
/*! /*!
* \brief Thread state enumeration. * \brief Thread state enumeration.
...@@ -69,21 +69,21 @@ typedef enum { ...@@ -69,21 +69,21 @@ typedef enum {
* Implement this by checking dt_is_cancelled() and return * Implement this by checking dt_is_cancelled() and return
* as soon as possible. * as soon as possible.
*/ */
typedef int (*runnable_t)(struct dthread_t *); typedef int (*runnable_t)(struct dthread *);
/*! /*!
* \brief Single thread descriptor public API. * \brief Single thread descriptor public API.
*/ */
typedef struct dthread_t { typedef struct dthread {
volatile unsigned state; /*!< Bitfield of dt_flag flags. */ volatile unsigned state; /*!< Bitfield of dt_flag flags. */
runnable_t run; /*!< Runnable function or 0. */ runnable_t run; /*!< Runnable function or 0. */
runnable_t destruct; /*!< Destructor function or 0. */ runnable_t destruct; /*!< Destructor function or 0. */
void *data; /*!< Currently active data */ void *data; /*!< Currently active data */
struct dt_unit_t *unit; /*!< Reference to assigned unit. */ struct dt_unit *unit; /*!< Reference to assigned unit. */
void *_adata; /* Thread-specific data. */ void *_adata; /*!< Thread-specific data. */
pthread_t _thr; /* Thread */ pthread_t _thr; /*!< Thread */
pthread_attr_t _attr; /* Thread attributes */ pthread_attr_t _attr; /*!< Thread attributes */
pthread_mutex_t _mx; /* Thread state change lock. */ pthread_mutex_t _mx; /*!< Thread state change lock. */
} dthread_t; } dthread_t;
/*! /*!
...@@ -93,14 +93,14 @@ typedef struct dthread_t { ...@@ -93,14 +93,14 @@ typedef struct dthread_t {
* Unit is coherent if all threads execute * Unit is coherent if all threads execute
* the same runnable. * the same runnable.
*/ */
typedef struct dt_unit_t { typedef struct dt_unit {
int size; /*!< Unit width (number of threads) */ int size; /*!< Unit width (number of threads) */
struct dthread_t **threads; /*!< Array of threads */ struct dthread **threads; /*!< Array of threads */
pthread_cond_t _notify; /* Notify thread */ pthread_cond_t _notify; /*!< Notify thread */
pthread_mutex_t _notify_mx; /* Condition mutex */ pthread_mutex_t _notify_mx; /*!< Condition mutex */
pthread_cond_t _report; /* Report thread state */ pthread_cond_t _report; /*!< Report thread state */
pthread_mutex_t _report_mx; /* Condition mutex */ pthread_mutex_t _report_mx; /*!< Condition mutex */
pthread_mutex_t _mx; /* Unit lock */ pthread_mutex_t _mx; /*!< Unit lock */
} dt_unit_t; } dt_unit_t;
/*! /*!
......
...@@ -63,7 +63,7 @@ typedef enum journal_flag_t { ...@@ -63,7 +63,7 @@ typedef enum journal_flag_t {
* Each node represents journal entry and points * Each node represents journal entry and points
* to position of the data in the permanent storage. * to position of the data in the permanent storage.
*/ */
typedef struct journal_node_t typedef struct journal_node
{ {
uint64_t id; /*!< Node ID. */ uint64_t id; /*!< Node ID. */
uint16_t flags; /*!< Node flags. */ uint16_t flags; /*!< Node flags. */
...@@ -81,7 +81,7 @@ typedef struct journal_node_t ...@@ -81,7 +81,7 @@ typedef struct journal_node_t
* Each journal has a fixed number of nodes. * Each journal has a fixed number of nodes.
* *
*/ */
typedef struct journal_t typedef struct journal
{ {
int fd; int fd;
char *path; /*!< Path to journal file. */ char *path; /*!< Path to journal file. */
...@@ -177,7 +177,7 @@ bool journal_exists(const char *path); ...@@ -177,7 +177,7 @@ bool journal_exists(const char *path);
* \retval KNOT_ERANGE if given entry was not found. * \retval KNOT_ERANGE if given entry was not found.
* \return < KNOT_EOK on error. * \return < KNOT_EOK on error.
*/ */
int journal_load_changesets(const struct zone_t *zone, list_t *dst, int journal_load_changesets(const struct zone *zone, list_t *dst,
uint32_t from, uint32_t to); uint32_t from, uint32_t to);
/*! /*!
......
...@@ -41,7 +41,7 @@ enum { ...@@ -41,7 +41,7 @@ enum {
RRL_WILDCARD = 1 << 1 /*!< Query to wildcard name. */ RRL_WILDCARD = 1 << 1 /*!< Query to wildcard name. */
}; };
struct zone_t; struct zone;
/*! /*!
* \brief RRL hash bucket. * \brief RRL hash bucket.
...@@ -134,7 +134,7 @@ int rrl_setlocks(rrl_table_t *rrl, unsigned granularity); ...@@ -134,7 +134,7 @@ int rrl_setlocks(rrl_table_t *rrl, unsigned granularity);
* \return assigned bucket * \return assigned bucket
*/ */
rrl_item_t* rrl_hash(rrl_table_t *t, const struct sockaddr_storage *a, rrl_req_t *p, rrl_item_t* rrl_hash(rrl_table_t *t, const struct sockaddr_storage *a, rrl_req_t *p,
const struct zone_t *zone, uint32_t stamp, int* lock); const struct zone *zone, uint32_t stamp, int* lock);
/*! /*!
* \brief Query the RRL table for accept or deny, when the rate limit is reached. * \brief Query the RRL table for accept or deny, when the rate limit is reached.
...@@ -147,7 +147,7 @@ rrl_item_t* rrl_hash(rrl_table_t *t, const struct sockaddr_storage *a, rrl_req_t ...@@ -147,7 +147,7 @@ rrl_item_t* rrl_hash(rrl_table_t *t, const struct sockaddr_storage *a, rrl_req_t
* \retval KNOT_ELIMIT when the limit is reached. * \retval KNOT_ELIMIT when the limit is reached.
*/ */
int rrl_query(rrl_table_t *rrl, const struct sockaddr_storage *a, rrl_req_t *req, int rrl_query(rrl_table_t *rrl, const struct sockaddr_storage *a, rrl_req_t *req,
const struct zone_t *zone); const struct zone *zone);
/*! /*!
* \brief Roll a dice whether answer slips or not. * \brief Roll a dice whether answer slips or not.
......
...@@ -154,7 +154,7 @@ static int server_init_iface(iface_t *new_if, conf_iface_t *cfg_if) ...@@ -154,7 +154,7 @@ static int server_init_iface(iface_t *new_if, conf_iface_t *cfg_if)
return KNOT_EOK; return KNOT_EOK;
} }
static void remove_ifacelist(struct ref_t *p) static void remove_ifacelist(struct ref *p)
{ {
ifacelist_t *ifaces = (ifacelist_t *)p; ifacelist_t *ifaces = (ifacelist_t *)p;
...@@ -179,7 +179,7 @@ static void remove_ifacelist(struct ref_t *p) ...@@ -179,7 +179,7 @@ static void remove_ifacelist(struct ref_t *p)
* \param server Server instance. * \param server Server instance.
* \return number of added sockets. * \return number of added sockets.
*/ */
static int reconfigure_sockets(const struct conf_t *conf, server_t *s) static int reconfigure_sockets(const struct conf *conf, server_t *s)
{ {
/* Prepare helper lists. */ /* Prepare helper lists. */
char addr_str[SOCKADDR_STRLEN] = {0}; char addr_str[SOCKADDR_STRLEN] = {0};
...@@ -475,7 +475,7 @@ void server_stop(server_t *server) ...@@ -475,7 +475,7 @@ void server_stop(server_t *server)
} }
/*! \brief Reconfigure UDP and TCP query processing threads. */ /*! \brief Reconfigure UDP and TCP query processing threads. */
static int reconfigure_threads(const struct conf_t *conf, server_t *server) static int reconfigure_threads(const struct conf *conf, server_t *server)
{ {
/* Estimate number of threads/manager. */ /* Estimate number of threads/manager. */
int ret = KNOT_EOK; int ret = KNOT_EOK;
...@@ -519,7 +519,7 @@ static int reconfigure_threads(const struct conf_t *conf, server_t *server) ...@@ -519,7 +519,7 @@ static int reconfigure_threads(const struct conf_t *conf, server_t *server)
return ret; return ret;
} }
static int reconfigure_rate_limits(const struct conf_t *conf, server_t *server) static int reconfigure_rate_limits(const struct conf *conf, server_t *server)
{ {
/* Rate limiting. */ /* Rate limiting. */
if (!server->rrl && conf->rrl > 0) { if (!server->rrl && conf->rrl > 0) {
...@@ -548,7 +548,7 @@ static int reconfigure_rate_limits(const struct conf_t *conf, server_t *server) ...@@ -548,7 +548,7 @@ static int reconfigure_rate_limits(const struct conf_t *conf, server_t *server)
return KNOT_EOK; return KNOT_EOK;
} }
int server_reconfigure(const struct conf_t *conf, void *data) int server_reconfigure(const struct conf *conf, void *data)
{ {
server_t *server = (server_t *)data; server_t *server = (server_t *)data;
dbg_server("%s(%p, %p)\n", __func__, conf, server); dbg_server("%s(%p, %p)\n", __func__, conf, server);
......
...@@ -40,15 +40,15 @@ ...@@ -40,15 +40,15 @@
#include "knot/zone/zonedb.h" #include "knot/zone/zonedb.h"
/* Forwad declarations. */ /* Forwad declarations. */
struct iface_t; struct iface;
struct server_t; struct server;
struct conf_t; struct conf;
/*! \brief I/O handler structure. /*! \brief I/O handler structure.
*/ */
typedef struct iohandler { typedef struct iohandler {
struct node n; struct node n;
struct server_t *server; /*!< Reference to server */ struct server *server; /*!< Reference to server */
dt_unit_t *unit; /*!< Threading unit */ dt_unit_t *unit; /*!< Threading unit */
unsigned *thread_state; /*!< Thread state */ unsigned *thread_state; /*!< Thread state */
unsigned *thread_id; /*!< Thread identifier. */ unsigned *thread_id; /*!< Thread identifier. */
...@@ -65,7 +65,7 @@ typedef enum { ...@@ -65,7 +65,7 @@ typedef enum {
/*! /*!
* \brief Server interface structure. * \brief Server interface structure.
*/ */
typedef struct iface_t { typedef struct iface {
struct node n; struct node n;
int fd[2]; int fd[2];
struct sockaddr_storage addr; struct sockaddr_storage addr;
...@@ -89,7 +89,7 @@ typedef struct ifacelist { ...@@ -89,7 +89,7 @@ typedef struct ifacelist {
* *
* Keeps references to all important structures needed for operation. * Keeps references to all important structures needed for operation.
*/ */
typedef struct server_t { typedef struct server {
/*! \brief Server state tracking. */ /*! \brief Server state tracking. */
volatile unsigned state; volatile unsigned state;
...@@ -178,7 +178,7 @@ void server_stop(server_t *server); ...@@ -178,7 +178,7 @@ void server_stop(server_t *server);
* \retval KNOT_EINVAL on invalid parameters. * \retval KNOT_EINVAL on invalid parameters.
* \retval KNOT_ERROR unspecified error. * \retval KNOT_ERROR unspecified error.
*/ */
int server_reconfigure(const struct conf_t *conf, void *data); int server_reconfigure(const struct conf *conf, void *data);
/*! /*!
* \brief Reconfigure zone database. * \brief Reconfigure zone database.
...@@ -187,7 +187,7 @@ int server_reconfigure(const struct conf_t *conf, void *data); ...@@ -187,7 +187,7 @@ int server_reconfigure(const struct conf_t *conf, void *data);
* *
* \return KNOT_EOK on success or KNOT_ error * \return KNOT_EOK on success or KNOT_ error
*/ */
int server_update_zones(const struct conf_t *conf, void *data); int server_update_zones(const struct conf *conf, void *data);
/*! /*!
* \brief Update fdsets from current interfaces list. * \brief Update fdsets from current interfaces list.
......
...@@ -83,7 +83,7 @@ static uint32_t acl_fill_mask32(short nbits) ...@@ -83,7 +83,7 @@ static uint32_t acl_fill_mask32(short nbits)
return htonl(r); return htonl(r);
} }
int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2) int netblock_match(struct conf_iface *a1, const struct sockaddr_storage *a2)
{ {
int ret = 0; int ret = 0;
uint32_t mask = 0xffffffff; uint32_t mask = 0xffffffff;
...@@ -120,7 +120,7 @@ int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2) ...@@ -120,7 +120,7 @@ int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2)
return ret; return ret;
} }
struct conf_iface_t* acl_find(list_t *acl, const struct sockaddr_storage *addr, struct conf_iface* acl_find(list_t *acl, const struct sockaddr_storage *addr,
const knot_dname_t *key_name) const knot_dname_t *key_name)
{ {
if (acl == NULL || addr == NULL) { if (acl == NULL || addr == NULL) {
......
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
#include "libknot/internal/mempattern.h" #include "libknot/internal/mempattern.h"
#include "libknot/rrtype/tsig.h" #include "libknot/rrtype/tsig.h"
struct conf_iface_t; struct conf_iface;
/*! \brief Match address against netblock. */ /*! \brief Match address against netblock. */
int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2); int netblock_match(struct conf_iface *a1, const struct sockaddr_storage *a2);
/*! /*!
* \brief Match address against ACL. * \brief Match address against ACL.
...@@ -49,7 +49,7 @@ int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2); ...@@ -49,7 +49,7 @@ int netblock_match(struct conf_iface_t *a1, const struct sockaddr_storage *a2);
* \retval Matching rule instance if found. * \retval Matching rule instance if found.
* \retval NULL if it didn't find a match. * \retval NULL if it didn't find a match.
*/ */
struct conf_iface_t* acl_find(list_t *acl, const struct sockaddr_storage *addr, struct conf_iface* acl_find(list_t *acl, const struct sockaddr_storage *addr,
const knot_dname_t *key_name); const knot_dname_t *key_name);
/*! @} */ /*! @} */
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "knot/zone/node.h" #include "knot/zone/node.h"
#include "knot/zone/zone-tree.h" #include "knot/zone/zone-tree.h"
struct zone_t; struct zone;
enum zone_contents_find_dname_result { enum zone_contents_find_dname_result {
ZONE_NAME_FOUND = 1, ZONE_NAME_FOUND = 1,
...@@ -40,7 +40,7 @@ enum zone_contents_find_dname_result { ...@@ -40,7 +40,7 @@ enum zone_contents_find_dname_result {
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
typedef struct zone_contents_t { typedef struct zone_contents {
zone_node_t *apex; /*!< Apex node of the zone (holding SOA) */ zone_node_t *apex; /*!< Apex node of the zone (holding SOA) */
zone_tree_t *nodes; zone_tree_t *nodes;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
typedef int (*zone_event_cb)(zone_t *zone); typedef int (*zone_event_cb)(zone_t *zone);
typedef struct event_info_t { typedef struct event_info {
zone_event_type_t type; zone_event_type_t type;
const zone_event_cb callback; const zone_event_cb callback;
const char *name; const char *name;
...@@ -234,7 +234,7 @@ int zone_events_init(zone_t *zone) ...@@ -234,7 +234,7 @@ int zone_events_init(zone_t *zone)
return KNOT_EOK; return KNOT_EOK;
} }
int zone_events_setup(struct zone_t *zone, worker_pool_t *workers, int zone_events_setup(struct zone *zone, worker_pool_t *workers,
evsched_t *scheduler, namedb_t *timers_db) evsched_t *scheduler, namedb_t *timers_db)
{ {
if (!zone || !workers || !scheduler) { if (!zone || !workers || !scheduler) {
...@@ -351,7 +351,7 @@ void zone_events_start(zone_t *zone) ...@@ -351,7 +351,7 @@ void zone_events_start(zone_t *zone)
pthread_mutex_unlock(&zone->events.mx); pthread_mutex_unlock(&zone->events.mx);
} }
time_t zone_events_get_time(const struct zone_t *zone, zone_event_type_t type) time_t zone_events_get_time(const struct zone *zone, zone_event_type_t type)
{ {
if (zone == NULL) { if (zone == NULL) {
return KNOT_EINVAL; return KNOT_EINVAL;
...@@ -383,7 +383,7 @@ const char *zone_events_get_name(zone_event_type_t type) ...@@ -383,7 +383,7 @@ const char *zone_events_get_name(zone_event_type_t type)
return info->name; return info->name;
} }
time_t zone_events_get_next(const struct zone_t *zone, zone_event_type_t *type) time_t zone_events_get_next(const struct zone *zone, zone_event_type_t *type)
{ {
if (zone == NULL || type == NULL) { if (zone == NULL || type == NULL) {
return KNOT_EINVAL; return KNOT_EINVAL;
...@@ -412,7 +412,7 @@ void zone_events_update(zone_t *zone, zone_t *old_zone) ...@@ -412,7 +412,7 @@ void zone_events_update(zone_t *zone, zone_t *old_zone)
replan_events(zone, old_zone); replan_events(zone, old_zone);
} }
void zone_events_replan_ddns(struct zone_t *zone, const struct zone_t *old_zone) void zone_events_replan_ddns(struct zone *zone, const struct zone *old_zone)
{ {
if (old_zone) { if (old_zone) {
replan_update(zone, (zone_t *)old_zone); replan_update(zone, (zone_t *)old_zone);
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
/* Timer special values. */ /* Timer special values. */
#define ZONE_EVENT_NOW 0 #define ZONE_EVENT_NOW 0
struct zone_t; struct zone;
struct server_t; struct server;
typedef enum zone_event_type { typedef enum zone_event_type {
ZONE_EVENT_INVALID = -1, ZONE_EVENT_INVALID = -1,
...@@ -68,7 +68,7 @@ typedef struct zone_events { ...@@ -68,7 +68,7 @@ typedef struct zone_events {
* *
* \return KNOT_E* * \return KNOT_E*
*/ */
int zone_events_init(struct zone_t *zone); int zone_events_init(struct zone *zone);
/*! /*!
* \brief Set up zone events execution. * \brief Set up zone events execution.
...@@ -80,7 +80,7 @@ int zone_events_init(struct zone_t *zone); ...@@ -80,7 +80,7 @@ int zone_events_init(struct zone_t *zone);
* *
* \return KNOT_E* * \return KNOT_E*
*/ */
int zone_events_setup(struct zone_t *zone, worker_pool_t *workers, int zone_events_setup(struct zone *zone, worker_pool_t *workers,
evsched_t *scheduler, namedb_t *timers_db); evsched_t *scheduler, namedb_t *timers_db);
/*!