listenlist.c File Reference

#include <config.h>
#include <isc/mem.h>
#include <isc/util.h>
#include <dns/acl.h>
#include <named/listenlist.h>

Go to the source code of this file.

Functions

static void destroy (ns_listenlist_t *list)
isc_result_t ns_listenelt_create (isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, dns_acl_t *acl, ns_listenelt_t **target)
void ns_listenelt_destroy (ns_listenelt_t *elt)
 Create a listen-on list element.
isc_result_t ns_listenlist_create (isc_mem_t *mctx, ns_listenlist_t **target)
 Destroy a listen-on list element.
void ns_listenlist_attach (ns_listenlist_t *source, ns_listenlist_t **target)
 Create a new, empty listen-on list.
void ns_listenlist_detach (ns_listenlist_t **listp)
 Attach '*target' to '*source'.
isc_result_t ns_listenlist_default (isc_mem_t *mctx, in_port_t port, isc_dscp_t dscp, isc_boolean_t enabled, ns_listenlist_t **target)
 Detach 'listp'.


Detailed Description

Definition in file listenlist.c.


Function Documentation

static void destroy ( ns_listenlist_t list  )  [static]

Definition at line 74 of file listenlist.c.

References ISC_LIST_HEAD, ISC_LIST_NEXT, isc_mem_put, ns_listenlist::mctx, and ns_listenelt_destroy().

isc_result_t ns_listenelt_create ( isc_mem_t mctx,
in_port_t  port,
isc_dscp_t  dscp,
dns_acl_t acl,
ns_listenelt_t **  target 
)

Definition at line 35 of file listenlist.c.

References ns_listenelt::acl, ns_listenelt::dscp, ISC_LINK_INIT, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ns_listenelt::mctx, ns_listenelt::port, and REQUIRE.

Referenced by add_listenelt(), ns_listenelt_fromconfig(), and ns_listenlist_default().

void ns_listenelt_destroy ( ns_listenelt_t elt  ) 

Create a listen-on list element.

Definition at line 53 of file listenlist.c.

References ns_listenelt::acl, dns_acl_detach(), isc_mem_put, and ns_listenelt::mctx.

Referenced by destroy(), ns_listenelt_fromconfig(), and ns_listenlist_default().

isc_result_t ns_listenlist_create ( isc_mem_t mctx,
ns_listenlist_t **  target 
)

Destroy a listen-on list element.

Definition at line 60 of file listenlist.c.

References ISC_LIST_INIT, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ns_listenlist::mctx, ns_listenlist::refcount, and REQUIRE.

Referenced by adjust_interfaces(), ns_interfacemgr_create(), ns_listenlist_default(), and ns_listenlist_fromconfig().

void ns_listenlist_attach ( ns_listenlist_t source,
ns_listenlist_t **  target 
)

Create a new, empty listen-on list.

Definition at line 87 of file listenlist.c.

References INSIST, and ns_listenlist::refcount.

Referenced by ns_interfacemgr_create(), ns_interfacemgr_setlistenon4(), and ns_interfacemgr_setlistenon6().

void ns_listenlist_detach ( ns_listenlist_t **  listp  ) 

Attach '*target' to '*source'.

Definition at line 94 of file listenlist.c.

References destroy(), INSIST, and ns_listenlist::refcount.

Referenced by adjust_interfaces(), load_configuration(), ns_interfacemgr_create(), ns_interfacemgr_destroy(), ns_interfacemgr_setlistenon4(), ns_interfacemgr_setlistenon6(), and ns_listenlist_fromconfig().

isc_result_t ns_listenlist_default ( isc_mem_t mctx,
in_port_t  port,
isc_dscp_t  dscp,
isc_boolean_t  enabled,
ns_listenlist_t **  target 
)

Detach 'listp'.

Definition at line 104 of file listenlist.c.

References cleanup(), dns_acl_any(), dns_acl_detach(), dns_acl_none(), ISC_LIST_APPEND, ISC_R_SUCCESS, ns_listenelt_create(), ns_listenelt_destroy(), ns_listenlist_create(), and REQUIRE.

Referenced by load_configuration().


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