Electroneum
Loading...
Searching...
No Matches
respip.h
Go to the documentation of this file.
1/*
2 * respip/respip.h - IP-based response modification module
3 */
4
11
12#ifndef RESPIP_RESPIP_H
13#define RESPIP_RESPIP_H
14
15#include "util/module.h"
16#include "services/localzone.h"
17
23struct respip_set;
24
29struct resp_addr;
30
34struct views;
35
36struct respip_addr_info;
37
55
63 struct respip_addr_info* addrinfo; /* set only for inform variants */
64};
65
70struct resp_addr;
71
76struct respip_set* respip_set_create(void);
77
82void respip_set_delete(struct respip_set* set);
83
91int respip_global_apply_cfg(struct respip_set* set, struct config_file* cfg);
92
101int respip_views_apply_cfg(struct views* vs, struct config_file* cfg,
102 int* have_view_respip_cfg);
103
129int respip_merge_cname(struct reply_info* base_rep,
130 const struct query_info* qinfo, const struct reply_info* tgt_rep,
131 const struct respip_client_info* cinfo, int must_validate,
132 struct reply_info** new_repp, struct regional* region);
133
154int respip_rewrite_reply(const struct query_info* qinfo,
155 const struct respip_client_info* cinfo,
156 const struct reply_info *rep, struct reply_info** new_repp,
157 struct respip_action_info* actinfo,
158 struct ub_packed_rrset_key** alias_rrset,
159 int search_only, struct regional* region);
160
166
168int respip_init(struct module_env* env, int id);
169
171void respip_deinit(struct module_env* env, int id);
172
174void respip_operate(struct module_qstate* qstate, enum module_ev event, int id,
175 struct outbound_entry* outbound);
176
178void respip_inform_super(struct module_qstate* qstate, int id,
179 struct module_qstate* super);
180
182void respip_clear(struct module_qstate* qstate, int id);
183
188struct rbtree_type* respip_set_get_tree(struct respip_set* set);
189
194enum respip_action resp_addr_get_action(const struct resp_addr* addr);
195
200struct ub_packed_rrset_key* resp_addr_get_rrset(struct resp_addr* addr);
201
203size_t respip_get_mem(struct module_env* env, int id);
204
211int respip_set_is_empty(const struct respip_set* set);
212
226void respip_inform_print(struct respip_addr_info* respip_addr, uint8_t* qname,
227 uint16_t qtype, uint16_t qclass, struct local_rrset* local_alias,
228 struct comm_reply* repinfo);
229
230#endif /* RESPIP_RESPIP_H */
respip_action
Definition localzone.h:483
module_ev
Definition module.h:536
void respip_clear(struct module_qstate *qstate, int id)
size_t respip_get_mem(struct module_env *env, int id)
void respip_set_delete(struct respip_set *set)
int respip_views_apply_cfg(struct views *vs, struct config_file *cfg, int *have_view_respip_cfg)
void respip_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
struct rbtree_type * respip_set_get_tree(struct respip_set *set)
void respip_deinit(struct module_env *env, int id)
int respip_set_is_empty(const struct respip_set *set)
void respip_inform_print(struct respip_addr_info *respip_addr, uint8_t *qname, uint16_t qtype, uint16_t qclass, struct local_rrset *local_alias, struct comm_reply *repinfo)
struct ub_packed_rrset_key * resp_addr_get_rrset(struct resp_addr *addr)
int respip_rewrite_reply(const struct query_info *qinfo, const struct respip_client_info *cinfo, const struct reply_info *rep, struct reply_info **new_repp, struct respip_action_info *actinfo, struct ub_packed_rrset_key **alias_rrset, int search_only, struct regional *region)
void respip_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
int respip_merge_cname(struct reply_info *base_rep, const struct query_info *qinfo, const struct reply_info *tgt_rep, const struct respip_client_info *cinfo, int must_validate, struct reply_info **new_repp, struct regional *region)
enum respip_action resp_addr_get_action(const struct resp_addr *addr)
int respip_init(struct module_env *env, int id)
struct module_func_block * respip_get_funcblock(void)
struct respip_set * respip_set_create(void)
int respip_global_apply_cfg(struct respip_set *set, struct config_file *cfg)
unsigned short uint16_t
Definition stdint.h:125
unsigned char uint8_t
Definition stdint.h:124
struct respip_addr_info * addrinfo
Definition respip.h:63
enum respip_action action
Definition respip.h:62
struct respip_set * respip_set
Definition respip.h:53
size_t tag_datas_size
Definition respip.h:51
uint8_t * tag_actions
Definition respip.h:48
struct view * view
Definition respip.h:52
struct config_strlist ** tag_datas
Definition respip.h:50
size_t tag_actions_size
Definition respip.h:49
uint8_t * taglist
Definition respip.h:46
Definition view.h:56