outbound_list.h File Reference

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

Data Structures

struct  outbound_list
 The outbound list. More...
 
struct  outbound_entry
 Outbound list entry. More...
 

Functions

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

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
listthe 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
listthe 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().

◆ 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
listthe list to add to.
eentry 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.

◆ 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
listthe list to remove from.
ethe 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().