unbound: services/outbound_list.c File Reference

unbound 0.1

Functions
outbound_list.c File Reference

This file contains functions to help a module keep track of the queries it has outstanding to authoritative servers. More...

`#include "config.h"`
`#include <sys/time.h>`
`#include "services/outbound_list.h"`
`#include "services/outside_network.h"`

## Functions
void | outbound_list_init (struct outbound_list *list)
| Init the user allocated outbound list structure.
void | outbound_list_clear (struct outbound_list *list)
| Clear the user owner outbound list structure.
void | outbound_list_insert (struct outbound_list *list, struct outbound_entry *e)
| Insert new entry into the list.
void | outbound_list_remove (struct outbound_list *list, struct outbound_entry *e)
| Remove an entry from the list, and deletes it.

## Detailed Description

This file contains functions to help a module keep track of the queries it has outstanding to authoritative servers.

## Function Documentation

## ◆ outbound_list_init()

void outbound_list_init | ( | struct outbound_list * | list | ) |

Init the user allocated outbound list structure.

Parameters

  list | the list structure.

References outbound_list::first.

Referenced by generate_sub_request(), iter_new(), and outbound_list_clear().

## ◆ outbound_list_clear()

void outbound_list_clear | ( | struct outbound_list * | list | ) |

Clear the user owner outbound list structure.

Deletes serviced queries.

Parameters

  list | the list structure. It is cleared, but the list struct itself is callers responsibility to delete.

References outbound_list::first, outbound_entry::next, outbound_list_init(), outnet_serviced_query_stop(), and outbound_entry::qsent.

Referenced by iter_clear(), and processQueryResponse().

## ◆ outbound_list_insert()

void outbound_list_insert | ( | struct outbound_list * | list,
|  | struct outbound_entry * | e
| ) |  |

Insert new entry into the list.

Caller must allocate the entry with malloc. qstate and qsent are set by caller.

Parameters

  list | the list to add to.
  e | entry to add, it is only half initialised at call start, fully initialised at call end.

References outbound_list::first, outbound_entry::next, and outbound_entry::prev.

Referenced by processQueryTargets().

## ◆ outbound_list_remove()

void outbound_list_remove | ( | struct outbound_list * | list,
|  | struct outbound_entry * | e
| ) |  |

Remove an entry from the list, and deletes it.

Deletes serviced query in the entry.

Parameters

  list | the list to remove from.
  e | the entry to remove.

References outbound_list::first, outbound_entry::next, outnet_serviced_query_stop(), outbound_entry::prev, and outbound_entry::qsent.

Referenced by process_response().