rfc3596.h File Reference
#include "dns/rfc1035.h"
Include dependency graph for rfc3596.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RFC1035_TYPE_AAAA   28
 

Functions

ssize_t rfc3596BuildAQuery (const char *hostname, char *buf, size_t sz, unsigned short qid, rfc1035_query *)
 
ssize_t rfc3596BuildAAAAQuery (const char *hostname, char *buf, size_t sz, unsigned short qid, rfc1035_query *)
 
ssize_t rfc3596BuildPTRQuery4 (const struct in_addr, char *buf, size_t sz, unsigned short qid, rfc1035_query *)
 
ssize_t rfc3596BuildPTRQuery6 (const struct in6_addr, char *buf, size_t sz, unsigned short qid, rfc1035_query *)
 
ssize_t rfc3596BuildHostQuery (const char *hostname, char *buf, size_t sz, unsigned short qid, rfc1035_query *query, int qtype)
 

Macro Definition Documentation

◆ RFC1035_TYPE_AAAA

#define RFC1035_TYPE_AAAA   28

Definition at line 48 of file rfc3596.h.

Function Documentation

◆ rfc3596BuildAAAAQuery()

ssize_t rfc3596BuildAAAAQuery ( const char *  hostname,
char *  buf,
size_t  sz,
unsigned short  qid,
rfc1035_query query 
)

Builds a message buffer with a QUESTION to lookup AAAA records for a hostname. Caller must allocate 'buf' which should probably be at least 512 octets. The 'szp' initially specifies the size of the buffer, on return it contains the size of the message (i.e. how much to write).

Returns
the size of the query

Definition at line 114 of file rfc3596.cc.

References RFC1035_TYPE_AAAA, and rfc3596BuildHostQuery().

Referenced by idnsSendSlaveAAAAQuery().

◆ rfc3596BuildAQuery()

ssize_t rfc3596BuildAQuery ( const char *  hostname,
char *  buf,
size_t  sz,
unsigned short  qid,
rfc1035_query query 
)

Builds a message buffer with a QUESTION to lookup A records for a hostname. Caller must allocate 'buf' which should probably be at least 512 octets. The 'szp' initially specifies the size of the buffer, on return it contains the size of the message (i.e. how much to write).

Returns
the size of the query

Definition at line 100 of file rfc3596.cc.

References RFC1035_TYPE_A, and rfc3596BuildHostQuery().

Referenced by idnsALookup(), and idnsGrokReply().

◆ rfc3596BuildHostQuery()

ssize_t rfc3596BuildHostQuery ( const char *  hostname,
char *  buf,
size_t  sz,
unsigned short  qid,
rfc1035_query query,
int  qtype 
)

Builds a message buffer with a QUESTION to lookup records for a hostname. Caller must allocate 'buf' which should probably be at least 512 octets. The 'szp' initially specifies the size of the buffer, on return it contains the size of the message (i.e. how much to write). Returns the size of the query

Definition at line 58 of file rfc3596.cc.

References _rfc1035_message::arcount, assert, Config, SquidConfig::dns, _rfc1035_message::id, int, _rfc1035_query::name, _rfc1035_message::opcode, SquidConfig::packet_max, _rfc1035_query::qclass, _rfc1035_message::qdcount, _rfc1035_message::qr, _rfc1035_query::qtype, _rfc1035_message::rd, RFC1035_CLASS_IN, rfc1035HeaderPack(), rfc1035QuestionPack(), rfc2671RROptPack(), and xstrncpy().

Referenced by rfc3596BuildAAAAQuery(), rfc3596BuildAQuery(), rfc3596BuildPTRQuery4(), and rfc3596BuildPTRQuery6().

◆ rfc3596BuildPTRQuery4()

ssize_t rfc3596BuildPTRQuery4 ( const struct in_addr  addr,
char *  buf,
size_t  sz,
unsigned short  qid,
rfc1035_query query 
)

Builds a message buffer with a QUESTION to lookup PTR records for an address. Caller must allocate 'buf' which should probably be at least 512 octets. The 'szp' initially specifies the size of the buffer, on return it contains the size of the message (i.e. how much to write).

Returns
the size of the query

Definition at line 128 of file rfc3596.cc.

References int, RFC1035_MAXHOSTNAMESZ, RFC1035_TYPE_PTR, and rfc3596BuildHostQuery().

Referenced by idnsPTRLookup().

◆ rfc3596BuildPTRQuery6()

ssize_t rfc3596BuildPTRQuery6 ( const struct in6_addr  ,
char *  buf,
size_t  sz,
unsigned short  qid,
rfc1035_query  
)

Definition at line 144 of file rfc3596.cc.

References RFC1035_MAXHOSTNAMESZ, RFC1035_TYPE_PTR, and rfc3596BuildHostQuery().

Referenced by idnsPTRLookup().

 

Introduction

Documentation

Support

Miscellaneous