fehQlibs 26
Qlibs
Loading...
Searching...
No Matches
Macros | Functions | Variables
dns_transmit.c File Reference

DNS query function. More...

#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include "socket_if.h"
#include "alloc.h"
#include "error.h"
#include "byte.h"
#include "uint_t.h"
#include "ip.h"
#include "dnsresolv.h"
Include dependency graph for dns_transmit.c:

Go to the source code of this file.

Macros

#define DNSPORT   53
 

Functions

int getscopeid (const struct dns_transmit *d, const char *ip)
 
int serverwantstcp (const char *buf, unsigned int len)
 
int serverfailed (const char *buf, unsigned int len)
 
void packetfree (struct dns_transmit *d)
 
void queryfree (struct dns_transmit *d)
 
void socketfree (struct dns_transmit *d)
 
void dns_transmit_free (struct dns_transmit *d)
 
int randombind6 (struct dns_transmit *d)
 
int randombind4 (struct dns_transmit *d)
 
int firstudp (struct dns_transmit *d)
 
int nextudp (struct dns_transmit *d)
 
int firsttcp (struct dns_transmit *d)
 
int nexttcp (struct dns_transmit *d)
 
int dns_transmit_start (struct dns_transmit *d, const char servers[QUERY_MAXIPLEN], int flagrecursive, const char *q, const char qtype[2], const char localip[16])
 
int dns_transmit_start6 (struct dns_transmit *d, const char servers[QUERY_MAXIPLEN], int flagrecursive, const char *q, const char qtype[2], const char localip[16], const uint32 scopes[QUERY_MAXNS])
 
void dns_transmit_io (struct dns_transmit *d, iopause_fd *x, struct taia *deadline)
 
int dns_transmit_get (struct dns_transmit *d, const iopause_fd *x, const struct taia *when)
 

Variables

uint32 scope_ids [QUERY_MAXNS]
 

Detailed Description

DNS query function.

Authors
djb, fefe, feh qlibs

scope_ids[32] -> 32 LLU root servers supported

Definition in file dns_transmit.c.

Macro Definition Documentation

◆ DNSPORT

#define DNSPORT   53

Definition at line 20 of file dns_transmit.c.

Function Documentation

◆ dns_transmit_free()

void dns_transmit_free ( struct dns_transmit d)

Definition at line 105 of file dns_transmit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dns_transmit_get()

int dns_transmit_get ( struct dns_transmit d,
const iopause_fd x,
const struct taia when 
)

Definition at line 311 of file dns_transmit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dns_transmit_io()

void dns_transmit_io ( struct dns_transmit d,
iopause_fd x,
struct taia deadline 
)

Definition at line 294 of file dns_transmit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dns_transmit_start()

int dns_transmit_start ( struct dns_transmit d,
const char  servers[QUERY_MAXIPLEN],
int  flagrecursive,
const char *  q,
const char  qtype[2],
const char  localip[16] 
)

Definition at line 255 of file dns_transmit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dns_transmit_start6()

int dns_transmit_start6 ( struct dns_transmit d,
const char  servers[QUERY_MAXIPLEN],
int  flagrecursive,
const char *  q,
const char  qtype[2],
const char  localip[16],
const uint32  scopes[QUERY_MAXNS] 
)

Definition at line 285 of file dns_transmit.c.

Here is the call graph for this function:

◆ firsttcp()

int firsttcp ( struct dns_transmit d)

Definition at line 243 of file dns_transmit.c.

Here is the caller graph for this function:

◆ firstudp()

int firstudp ( struct dns_transmit d)

Definition at line 184 of file dns_transmit.c.

Here is the caller graph for this function:

◆ getscopeid()

int getscopeid ( const struct dns_transmit d,
const char *  ip 
)

Definition at line 26 of file dns_transmit.c.

Here is the call graph for this function:

◆ nexttcp()

int nexttcp ( struct dns_transmit d)

Definition at line 249 of file dns_transmit.c.

Here is the caller graph for this function:

◆ nextudp()

int nextudp ( struct dns_transmit d)

Definition at line 190 of file dns_transmit.c.

Here is the caller graph for this function:

◆ packetfree()

void packetfree ( struct dns_transmit d)

Definition at line 84 of file dns_transmit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ queryfree()

void queryfree ( struct dns_transmit d)

Definition at line 91 of file dns_transmit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ randombind4()

int randombind4 ( struct dns_transmit d)

Definition at line 126 of file dns_transmit.c.

Here is the call graph for this function:

◆ randombind6()

int randombind6 ( struct dns_transmit d)

Definition at line 112 of file dns_transmit.c.

Here is the call graph for this function:

◆ serverfailed()

int serverfailed ( const char *  buf,
unsigned int  len 
)

Definition at line 48 of file dns_transmit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ serverwantstcp()

int serverwantstcp ( const char *  buf,
unsigned int  len 
)

Definition at line 38 of file dns_transmit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ socketfree()

void socketfree ( struct dns_transmit d)

Definition at line 98 of file dns_transmit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ scope_ids

uint32 scope_ids[QUERY_MAXNS]

Definition at line 22 of file dns_transmit.c.