unbound: edns-subnet/subnetmod.h File Reference

unbound 0.1

Data Structures | Functions
subnetmod.h File Reference

subnet module for unbound. More...

`#include "util/module.h"`
`#include "services/outbound_list.h"`
`#include "util/alloc.h"`
`#include "util/net_help.h"`
`#include "util/storage/slabhash.h"`
`#include "util/data/dname.h"`
`#include "edns-subnet/addrtree.h"`
`#include "edns-subnet/edns-subnet.h"`

## Data Structures
struct | subnet_env
| Global state for the subnet module. More...
struct | subnet_msg_cache_data
struct | subnet_qstate

## Functions
void | subnet_data_delete (void *d, void *ATTR_UNUSED(arg))
size_t | msg_cache_sizefunc (void *k, void *d)
struct module_func_block * | subnetmod_get_funcblock (void)
| Get the module function block.
int | subnetmod_init (struct module_env *env, int id)
| subnet module init
void | subnetmod_deinit (struct module_env *env, int id)
| subnet module deinit
void | subnetmod_operate (struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
| subnet module operate on a query
void | subnetmod_inform_super (struct module_qstate *qstate, int id, struct module_qstate *super)
| subnet module
void | subnetmod_clear (struct module_qstate *qstate, int id)
| subnet module cleanup query state
size_t | subnetmod_get_mem (struct module_env *env, int id)
| subnet module alloc size routine
size_t | unittest_wrapper_subnetmod_sizefunc (void *elemptr)
| Wrappers for static functions to unit test.
int | ecs_whitelist_check (struct query_info *qinfo, uint16_t flags, struct module_qstate *qstate, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, struct regional *region, int id, void *cbargs)
| Whitelist check, called just before query is sent upstream.
int | ecs_edns_back_parsed (struct module_qstate *qstate, int id, void *cbargs)
| Check whether response from server contains ECS record, if so, skip cache store.
int | ecs_query_response (struct module_qstate *qstate, struct dns_msg *response, int id, void *cbargs)
| Remove ECS record from back_out when query resulted in REFUSED response.
void | subnet_markdel (void *key)
| mark subnet msg to be deleted
void | subnet_ecs_opt_list_append (struct ecs_data *ecs, struct edns_option **list, struct module_qstate *qstate, struct regional *region)
| Add ecs struct to edns list, after parsing it to wire format.
void | subnet_option_from_ss (struct sockaddr_storage *ss, struct ecs_data *ecs, struct config_file *cfg)
| Create ecs_data from the sockaddr_storage information.

## Detailed Description

subnet module for unbound.

## Function Documentation

## ◆ subnetmod_get_funcblock()

struct module_func_block * subnetmod_get_funcblock | ( | void |  | ) |

Get the module function block.

Returns
  : function block with function pointers to module methods.

Referenced by module_funcs_avail().

## ◆ ecs_edns_back_parsed()

int ecs_edns_back_parsed | ( | struct module_qstate * | qstate,
|  | int | id,
|  | void * | cbargs )

Check whether response from server contains ECS record, if so, skip cache store.

Called just after parsing EDNS data from server.

Referenced by fptr_whitelist_inplace_cb_edns_back_parsed().