File nut/pro/resolv.c


Included Files


Typedef DNSCONFIG

typedef struct {...} DNSCONFIG
struct  
   {  
      u_char* doc_hostname;  
      u_char* doc_domain;  
      u_long doc_ip1;  
      u_long doc_ip2;  
   }  

Typedef DNSHEADER

typedef struct {...} DNSHEADER
struct  
   {  
      u_short doh_id;  
      u_short doh_flags;  
      u_short doh_quests;  
      u_short doh_answers;  
      u_short doh_authrr;  
      u_short doh_addrr;  
   }  

Typedef DNSQUESTION

typedef struct {...} DNSQUESTION
struct  
   {  
      u_char* doq_name;  
      u_short doq_type;  
      u_short doq_class;  
   }  

Typedef DNSRESOURCE

typedef struct {...} DNSRESOURCE
struct  
   {  
      u_char* dor_name;  
      u_short dor_type;  
      u_short dor_class;  
      u_long dor_ttl;  
      u_short dor_len;  
      u_char* dor_data;  
   }  

Local Variables

doc
static DNSCONFIG doc
Used in: NutDnsConfig2()  
  NutDnsGetResource()  

Global Function NutDnsConfig()

void NutDnsConfig ( u_char* hostname, u_char* domain, u_long dnsip )
Calls: NutDnsConfig2() nut/pro/resolv.c

Global Function NutDnsConfig2()

void NutDnsConfig2 ( u_char* hostname, u_char* domain, u_long pdnsip, u_long sdnsip )
Calls: NutHeapAlloc() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  strcpy(), strlen()
Called by: NutDhcpIfConfig() nut/pro/dhcpc.c
  NutDnsConfig() nut/pro/resolv.c
References Variables: doc nut/pro/resolv.c

Global Function NutDnsGetHostByName()

u_long NutDnsGetHostByName ( const u_char* hostname )
Calls: NutDnsGetResource() nut/pro/resolv.c

Global Function NutDnsGetMxByDomain()

u_long NutDnsGetMxByDomain ( const u_char* hostname )
Calls: NutDnsGetResource() nut/pro/resolv.c

Global Function NutDnsGetResource()

u_long NutDnsGetResource ( const u_char* hostname, const u_short type )
Prototyped in: nut/pro/resolv.c
Calls: CreateDnsHeader() nut/pro/resolv.c
  CreateDnsQuestion() nut/pro/resolv.c
  CreateDnsResource() nut/pro/resolv.c
  DecodeDnsHeader() nut/pro/resolv.c
  DecodeDnsQuestion() nut/pro/resolv.c
  DecodeDnsResource() nut/pro/resolv.c
  EncodeDnsHeader() nut/pro/resolv.c
  EncodeDnsQuestion() nut/pro/resolv.c
  NutHeapAlloc() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  NutUdpCreateSocket() nut/net/udpsock.c
  NutUdpDestroySocket() nut/net/udpsock.c
  NutUdpReceiveFrom() nut/net/udpsock.c
  NutUdpSendTo() nut/net/udpsock.c
  ReleaseDnsHeader() nut/pro/resolv.c
  ReleaseDnsQuestion() nut/pro/resolv.c
  ReleaseDnsResource() nut/pro/resolv.c
Called by: NutDnsGetHostByName() nut/pro/resolv.c
  NutDnsGetMxByDomain() nut/pro/resolv.c
References Variables: doc nut/pro/resolv.c

Local Function AddName()

static u_short AddName ( u_char* cp, const u_char* name )
Calls: strlen()
Called by: EncodeDnsQuestion() nut/pro/resolv.c

Local Function AddShort()

static u_short AddShort ( u_char* cp, u_short val )
Called by: EncodeDnsHeader() nut/pro/resolv.c
  EncodeDnsQuestion() nut/pro/resolv.c

Local Function CreateDnsHeader()

static DNSHEADER* CreateDnsHeader ( DNSHEADER* doh, u_short id )
Calls: NutHeapAllocClear() nut/os/heap.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function CreateDnsQuestion()

static DNSQUESTION* CreateDnsQuestion ( DNSQUESTION* doq, const u_char* name, u_short type )
Calls: NutHeapAlloc() nut/os/heap.c
  NutHeapAllocClear() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  strcpy(), strlen()
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function CreateDnsResource()

static DNSRESOURCE* CreateDnsResource ( DNSRESOURCE* dor )
Calls: NutHeapAllocClear() nut/os/heap.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function DecodeDnsHeader()

static u_short DecodeDnsHeader ( DNSHEADER* doh, u_char* buf )
Calls: ScanShort() nut/pro/resolv.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function DecodeDnsQuestion()

static u_short DecodeDnsQuestion ( DNSQUESTION* doq, u_char* buf )
Calls: ScanName() nut/pro/resolv.c
  ScanShort() nut/pro/resolv.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function DecodeDnsResource()

static u_short DecodeDnsResource ( DNSRESOURCE* dor, u_char* buf )
Calls: ScanBinary() nut/pro/resolv.c
  ScanLong() nut/pro/resolv.c
  ScanName() nut/pro/resolv.c
  ScanShort() nut/pro/resolv.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function EncodeDnsHeader()

static u_short EncodeDnsHeader ( u_char* buf, DNSHEADER* doh )
Calls: AddShort() nut/pro/resolv.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function EncodeDnsQuestion()

static u_short EncodeDnsQuestion ( u_char* buf, DNSQUESTION* doq )
Calls: AddName() nut/pro/resolv.c
  AddShort() nut/pro/resolv.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function ReleaseDnsHeader()

static void ReleaseDnsHeader ( DNSHEADER* doh )
Calls: NutHeapFree() nut/os/heap.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function ReleaseDnsQuestion()

static void ReleaseDnsQuestion ( DNSQUESTION* doq )
Calls: NutHeapFree() nut/os/heap.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function ReleaseDnsResource()

static void ReleaseDnsResource ( DNSRESOURCE* dor )
Calls: NutHeapFree() nut/os/heap.c
Called by: NutDnsGetResource() nut/pro/resolv.c

Local Function ScanBinary()

static u_short ScanBinary ( u_char* cp, u_char** npp, u_short len )
Calls: NutHeapAlloc() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  memcpy()
Called by: DecodeDnsResource() nut/pro/resolv.c

Local Function ScanLong()

static u_short ScanLong ( u_char* cp, u_long* val )
Called by: DecodeDnsResource() nut/pro/resolv.c

Local Function ScanName()

static u_short ScanName ( u_char* cp, u_char** npp )
Calls: NutHeapAlloc() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  strlen()
Called by: DecodeDnsQuestion() nut/pro/resolv.c
  DecodeDnsResource() nut/pro/resolv.c

Local Function ScanShort()

static u_short ScanShort ( u_char* cp, u_short* val )
Called by: DecodeDnsHeader() nut/pro/resolv.c
  DecodeDnsQuestion() nut/pro/resolv.c
  DecodeDnsResource() nut/pro/resolv.c