unbound 0.1
Functions
edns.c File Reference

This file contains functions for base EDNS options. More...

#include "config.h"
#include "util/edns.h"
#include "util/config_file.h"
#include "util/netevent.h"
#include "util/net_help.h"
#include "util/regional.h"
#include "util/data/msgparse.h"
#include "util/data/msgreply.h"

Functions

struct edns_stringsedns_strings_create (void)
 Create structure to hold EDNS strings.
 
void edns_strings_delete (struct edns_strings *edns_strings)
 Delete EDNS strings structure.
 
static int edns_strings_client_insert (struct edns_strings *edns_strings, struct sockaddr_storage *addr, socklen_t addrlen, int net, const char *string)
 
int edns_strings_apply_cfg (struct edns_strings *edns_strings, struct config_file *config)
 Add configured EDNS strings.
 
struct edns_string_addredns_string_addr_lookup (rbtree_type *tree, struct sockaddr_storage *addr, socklen_t addrlen)
 Find string for address.
 

Detailed Description

This file contains functions for base EDNS options.

Function Documentation

◆ edns_strings_create()

struct edns_strings * edns_strings_create ( void  )

Create structure to hold EDNS strings.

Returns
: newly created edns_strings, NULL on alloc failure.

References edns_strings_delete(), edns_strings::region, and regional_create().

Referenced by daemon_init(), and ub_ctx_create_nopipe().

◆ edns_strings_delete()

void edns_strings_delete ( struct edns_strings edns_strings)

Delete EDNS strings structure.

Parameters
edns_stringsstruct to delete

References edns_strings::region, and regional_destroy().

Referenced by daemon_delete(), edns_strings_create(), ub_ctx_create(), and ub_ctx_delete().

◆ edns_strings_apply_cfg()

int edns_strings_apply_cfg ( struct edns_strings edns_strings,
struct config_file config 
)

◆ edns_string_addr_lookup()

struct edns_string_addr * edns_string_addr_lookup ( rbtree_type tree,
struct sockaddr_storage *  addr,
socklen_t  addrlen 
)

Find string for address.

Parameters
treetree containing EDNS strings per address prefix.
addraddress to use for tree lookup
addrlenlength of address
Returns
: matching tree node, NULL otherwise

References addr_tree_lookup().

Referenced by outnet_serviced_query().