dnshandler.c File Reference
`#include "config.h"`
`#include "daemon/dnshandler.h"`
`#include "daemon/engine.h"`
`#include "status.h"`
`#include "wire/buffer.h"`
`#include <errno.h>`
`#include <string.h>`

Go to the source code of this file.

## Functions

dnshandler_type * | dnshandler_create (listener_type *interfaces)
ods_status | dnshandler_listen (dnshandler_type *dnshandler)
void | dnshandler_start (dnshandler_type *dnshandler)
void | dnshandler_signal (dnshandler_type *dnshandler)
void | dnshandler_fwd_notify (dnshandler_type *dnshandler, uint8_t *pkt, size_t len)
void | dnshandler_cleanup (dnshandler_type *dnshandler)

## Function Documentation

## dnshandler_cleanup()

void dnshandler_cleanup | ( | dnshandler_type * | dnshandler | ) |

Cleanup dns handler.

Definition at line 277 of file dnshandler.c.

References sock_struct::addr, listener_struct::count, dnshandler_struct::interfaces, dnshandler_struct::netio, netio_cleanup(), dnshandler_struct::query, query_cleanup(), sock_struct::s, dnshandler_struct::socklist, socklist_struct::tcp, dnshandler_struct::tcp_accept_handlers, socklist_struct::udp, and netio_handler_struct::user_data.

Referenced by engine_cleanup().

## dnshandler_create()

dnshandler_type* dnshandler_create | ( | listener_type * | interfaces | ) |

Create dns handler.

Definition at line 51 of file dnshandler.c.

References listener_struct::count.

## dnshandler_fwd_notify()

void dnshandler_fwd_notify | ( | dnshandler_type * | dnshandler,
|  | uint8_t * | pkt,
|  | size_t | len
| ) |  |

Forward notify to zone transfer handler.

Definition at line 231 of file dnshandler.c.

References netio_handler_struct::fd, and dnshandler_struct::xfrhandler.

## dnshandler_listen()

ods_status dnshandler_listen | ( | dnshandler_type * | dnshandler | ) |

Start dns handler listener.

Definition at line 106 of file dnshandler.c.

References dnshandler_struct::interfaces, sock_listen(), and dnshandler_struct::socklist.

## dnshandler_signal()

void dnshandler_signal | ( | dnshandler_type * | dnshandler | ) |

Signal dns handler.

Definition at line 218 of file dnshandler.c.

References dnshandler_struct::thread_id.

## dnshandler_start()

void dnshandler_start | ( | dnshandler_type * | dnshandler | ) |

Start dns handler.

Definition at line 125 of file dnshandler.c.