#include <isc/lang.h>
#include <isc/net.h>
#include <isc/types.h>
#include <dns/types.h>
Go to the source code of this file.
Functions | |
ISC_LANG_BEGINDECLS isc_result_t | dns_portlist_create (isc_mem_t *mctx, dns_portlist_t **portlistp) |
Create a port list. | |
isc_result_t | dns_portlist_add (dns_portlist_t *portlist, int af, in_port_t port) |
Add the given <port,af> tuple to the portlist. | |
void | dns_portlist_remove (dns_portlist_t *portlist, int af, in_port_t port) |
Remove the given <port,af> tuple to the portlist. | |
isc_boolean_t | dns_portlist_match (dns_portlist_t *portlist, int af, in_port_t port) |
Find the given <port,af> tuple to the portlist. | |
void | dns_portlist_attach (dns_portlist_t *portlist, dns_portlist_t **portlistp) |
Attach to a port list. | |
void | dns_portlist_detach (dns_portlist_t **portlistp) |
Detach from a port list. |
Definition in file portlist.h.
ISC_LANG_BEGINDECLS isc_result_t dns_portlist_create | ( | isc_mem_t * | mctx, | |
dns_portlist_t ** | portlistp | |||
) |
Create a port list.
Requires:
Definition at line 74 of file portlist.c.
References dns_portlist::active, dns_portlist::allocated, DESTROYLOCK, DNS_PORTLIST_MAGIC, isc_mem_attach(), isc_mem_get, isc_mem_put, isc_mutex_init, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_refcount_init(), dns_portlist::list, dns_portlist::lock, dns_portlist::magic, dns_portlist::mctx, dns_portlist::refcount, and REQUIRE.
isc_result_t dns_portlist_add | ( | dns_portlist_t * | portlist, | |
int | af, | |||
in_port_t | port | |||
) |
Add the given <port,af> tuple to the portlist.
Requires:
Definition at line 138 of file portlist.c.
References dns_portlist::active, AF_INET6, dns_portlist::allocated, compare(), DNS_PL_ALLOCATE, DNS_PL_INET, DNS_PL_INET6, DNS_VALID_PORTLIST, find_port(), dns_element::flags, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, dns_portlist::list, dns_portlist::lock, LOCK, dns_portlist::mctx, dns_element::port, REQUIRE, and UNLOCK.
void dns_portlist_remove | ( | dns_portlist_t * | portlist, | |
int | af, | |||
in_port_t | port | |||
) |
Remove the given <port,af> tuple to the portlist.
Requires:
Definition at line 189 of file portlist.c.
References dns_portlist::active, AF_INET6, compare(), DNS_PL_INET, DNS_PL_INET6, DNS_VALID_PORTLIST, find_port(), dns_element::flags, dns_portlist::list, dns_portlist::lock, LOCK, REQUIRE, and UNLOCK.
isc_boolean_t dns_portlist_match | ( | dns_portlist_t * | portlist, | |
int | af, | |||
in_port_t | port | |||
) |
Find the given <port,af> tuple to the portlist.
Requires:
Definition at line 215 of file portlist.c.
References dns_portlist::active, AF_INET6, DNS_PL_INET, DNS_PL_INET6, DNS_VALID_PORTLIST, find_port(), dns_element::flags, ISC_FALSE, ISC_TRUE, dns_portlist::list, dns_portlist::lock, LOCK, REQUIRE, and UNLOCK.
void dns_portlist_attach | ( | dns_portlist_t * | portlist, | |
dns_portlist_t ** | portlistp | |||
) |
Attach to a port list.
Requires:
Definition at line 236 of file portlist.c.
References DNS_VALID_PORTLIST, isc_refcount_increment, dns_portlist::refcount, and REQUIRE.
void dns_portlist_detach | ( | dns_portlist_t ** | portlistp | ) |
Detach from a port list.
Requires:
Definition at line 246 of file portlist.c.
References dns_portlist::allocated, DESTROYLOCK, DNS_VALID_PORTLIST, isc_mem_put, isc_mem_putanddetach, isc_refcount_decrement, isc_refcount_destroy, dns_portlist::list, dns_portlist::lock, dns_portlist::magic, dns_portlist::mctx, dns_portlist::refcount, and REQUIRE.