summaryrefslogtreecommitdiffstats
path: root/src/resolve.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-05-22 05:10:59 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-05-22 05:10:59 +0200
commit789495e5a2df4000fe027b5df4ba52060d907796 (patch)
tree988fb04636df9721f9fad99983b37625a0ac807f /src/resolve.c
parentf885449c5b4b6fec1b2fbe1e78a86918eca3d4f0 (diff)
downloadfastd-789495e5a2df4000fe027b5df4ba52060d907796.tar
fastd-789495e5a2df4000fe027b5df4ba52060d907796.zip
More documentation
Diffstat (limited to 'src/resolve.c')
-rw-r--r--src/resolve.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/resolve.c b/src/resolve.c
index 52729cc..d539e56 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -23,6 +23,11 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ \file resolve.c
+
+ DNS resolver functions
+ */
#include "fastd.h"
#include "peer.h"
@@ -32,14 +37,16 @@
#include <pthread.h>
+/** The argument given to the resolver thread */
typedef struct resolv_arg {
- uint64_t peer_id;
- size_t remote;
- char *hostname;
- fastd_peer_address_t constraints;
+ uint64_t peer_id; /**< The ID of the peer the remote being resolved belongs to */
+ size_t remote; /**< The number of the remote to resolve */
+ char *hostname; /**< The hostname to resolve */
+ fastd_peer_address_t constraints; /**< Contains address family and port of the remote entry to resolve */
} resolv_arg_t;
+/** The resolver thread main routine */
static void* resolve_peer(void *varg) {
resolv_arg_t *arg = varg;
@@ -105,6 +112,7 @@ static void* resolve_peer(void *varg) {
return NULL;
}
+/** Starts to resolve a given dynamic remote of a peer to an IP address asynchronously */
void fastd_resolve_peer(fastd_peer_t *peer, fastd_remote_t *remote) {
if (!peer->config)
exit_bug("trying to resolve temporary peer");