clientinfo.h File Reference

The DNS clientinfo interface allows libdns to retrieve information about the client from the caller. More...

#include <isc/sockaddr.h>
#include <isc/types.h>

Go to the source code of this file.

Data Structures

struct  dns_clientinfo
struct  dns_clientinfomethods

Defines

#define DNS_CLIENTINFO_H   1
#define DNS_CLIENTINFO_VERSION   2
#define DNS_CLIENTINFOMETHODS_VERSION   1
#define DNS_CLIENTINFOMETHODS_AGE   0

Typedefs

typedef struct dns_clientinfo dns_clientinfo_t
typedef isc_result_t(* dns_clientinfo_sourceip_t )(dns_clientinfo_t *client, isc_sockaddr_t **addrp)
typedef struct
dns_clientinfomethods 
dns_clientinfomethods_t

Functions

void dns_clientinfomethods_init (dns_clientinfomethods_t *methods, dns_clientinfo_sourceip_t sourceip)
void dns_clientinfo_init (dns_clientinfo_t *ci, void *data, void *versionp)


Detailed Description

The DNS clientinfo interface allows libdns to retrieve information about the client from the caller.

The clientinfo interface is used by the DNS DB and DLZ interfaces; it allows databases to modify their answers on the basis of information about the client, such as source IP address.

dns_clientinfo_t contains a pointer to an opaque structure containing client information in some form. dns_clientinfomethods_t contains a list of methods which operate on that opaque structure to return potentially useful data. Both structures also contain versioning information.

Definition in file clientinfo.h.


Define Documentation

#define DNS_CLIENTINFO_H   1

Definition at line 20 of file clientinfo.h.

#define DNS_CLIENTINFO_VERSION   2

Definition at line 55 of file clientinfo.h.

Referenced by dns_clientinfo_init().

#define DNS_CLIENTINFOMETHODS_VERSION   1

Definition at line 65 of file clientinfo.h.

Referenced by dns_clientinfomethods_init().

#define DNS_CLIENTINFOMETHODS_AGE   0

Definition at line 66 of file clientinfo.h.

Referenced by dns_clientinfomethods_init().


Typedef Documentation

typedef struct dns_clientinfo dns_clientinfo_t

typedef isc_result_t(* dns_clientinfo_sourceip_t)(dns_clientinfo_t *client, isc_sockaddr_t **addrp)

Definition at line 62 of file clientinfo.h.

typedef struct dns_clientinfomethods dns_clientinfomethods_t


Function Documentation

void dns_clientinfomethods_init ( dns_clientinfomethods_t methods,
dns_clientinfo_sourceip_t  sourceip 
)

Definition at line 24 of file clientinfo.c.

References dns_clientinfomethods::age, DNS_CLIENTINFOMETHODS_AGE, DNS_CLIENTINFOMETHODS_VERSION, dns_clientinfomethods::sourceip, and dns_clientinfomethods::version.

Referenced by foreach_rr(), foreach_rrset(), get_key(), mark_secure(), query_addadditional(), query_addadditional2(), query_addbestns(), query_addns(), query_addsoa(), query_addwildcardproof(), query_find(), query_findclosestnsec3(), query_getdb(), redirect(), redirect2(), rpz_find_p(), and rpz_rrset_find().

void dns_clientinfo_init ( dns_clientinfo_t ci,
void *  data,
void *  versionp 
)

Definition at line 33 of file clientinfo.c.

References dns_clientinfo::data, dns_clientinfo::dbversion, DNS_CLIENTINFO_VERSION, and dns_clientinfo::version.

Referenced by foreach_rr(), foreach_rrset(), get_key(), mark_secure(), query_addadditional(), query_addadditional2(), query_addbestns(), query_addns(), query_addsoa(), query_addwildcardproof(), query_find(), query_findclosestnsec3(), query_getdb(), redirect(), redirect2(), rpz_find_p(), and rpz_rrset_find().


Generated on Tue Apr 28 17:41:09 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha