bglibs
Data Fields
dns_transmit Struct Reference

#include <dns.h>

Data Fields

char * query
 
unsigned int querylen
 
char * packet
 
unsigned int packetlen
 
int s1
 
int tcpstate
 
unsigned int udploop
 
unsigned int curserver
 
struct timeval deadline
 
unsigned int pos
 
const ipv4addr * servers
 
ipv4addr localip
 
uint16 qtype
 

Detailed Description

DNS transmission record

Field Documentation

◆ curserver

unsigned int dns_transmit::curserver

Index of the server we are currently sending to.

Referenced by dns_transmit_free().

◆ deadline

struct timeval dns_transmit::deadline

Deadline for considering a request timed out.

Referenced by dns_transmit_free(), dns_transmit_get(), and dns_transmit_io().

◆ localip

ipv4addr dns_transmit::localip

The local IP address to transmit with.

Referenced by dns_transmit_free(), and dns_transmit_start().

◆ packet

char* dns_transmit::packet

The received response packet. This will either be NULL or dynamically allocated.

Referenced by dns_ip4_r(), dns_ip6_r(), dns_mx_r(), dns_name4_r(), dns_name6_r(), dns_transmit_get(), and dns_txt_r().

◆ packetlen

unsigned int dns_transmit::packetlen

The length of the received response packet.

Referenced by dns_ip4_r(), dns_ip6_r(), dns_mx_r(), dns_name4_r(), dns_name6_r(), dns_transmit_get(), and dns_txt_r().

◆ pos

unsigned int dns_transmit::pos

Current sending/receiving position within the buffer, for TCP transmissions.

Referenced by dns_transmit_get().

◆ qtype

uint16 dns_transmit::qtype

The requested query type.

Referenced by dns_transmit_start().

◆ query

char* dns_transmit::query

The transmitted query packet. This will either be NULL or dynamically allocated.

Referenced by dns_transmit_free(), dns_transmit_get(), and dns_transmit_start().

◆ querylen

unsigned int dns_transmit::querylen

The length of the transmitted query packet.

Referenced by dns_transmit_free(), dns_transmit_get(), and dns_transmit_start().

◆ s1

int dns_transmit::s1

The socket file descriptor used for data transmission. This will either be 0 or 1 + an open file descriptor. The addition is done to allow the uninitialized state to be all zeros.

Referenced by dns_transmit_free(), dns_transmit_get(), and dns_transmit_io().

◆ servers

const ipv4addr* dns_transmit::servers

The list of servers to try.

Referenced by dns_transmit_free(), and dns_transmit_start().

◆ tcpstate

int dns_transmit::tcpstate

Current state of the TCP connection. Valid values are:

  • 0 is uninitialized (ie using UDP)
  • 1 is connecting
  • 2 is connected, sending query
  • 3 is query sent, waiting for start of response
  • 4 is reading response length
  • 5 is read packet length, reading response

Referenced by dns_transmit_free(), dns_transmit_get(), and dns_transmit_io().

◆ udploop

unsigned int dns_transmit::udploop

Count of number of times the UDP query was sent to each server.

Referenced by dns_transmit_free(), dns_transmit_get(), and dns_transmit_start().


The documentation for this struct was generated from the following file: