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

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

Macro Definition Documentation

◆ RFC1035_TYPE_AAAA

#define RFC1035_TYPE_AAAA   28

Definition at line 53 of file rfc3596.h.

Function Documentation

◆ rfc3596BuildAAAAQuery()

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

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 110 of file rfc3596.cc.

References RFC1035_TYPE_AAAA, and rfc3596BuildHostQuery().

Referenced by idnsSendSlaveAAAAQuery().

◆ rfc3596BuildAQuery()

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

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 96 of file rfc3596.cc.

References RFC1035_TYPE_A, and rfc3596BuildHostQuery().

Referenced by idnsALookup(), and idnsGrokReply().

◆ rfc3596BuildHostQuery()

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

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 57 of file rfc3596.cc.

References _rfc1035_message::arcount, assert, _rfc1035_message::id, int, _rfc1035_query::name, _rfc1035_message::opcode, _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()

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

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 124 of file rfc3596.cc.

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

Referenced by idnsPTRLookup().

◆ rfc3596BuildPTRQuery6()

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

Definition at line 140 of file rfc3596.cc.

References RFC1035_MAXHOSTNAMESZ, RFC1035_TYPE_PTR, and rfc3596BuildHostQuery().

Referenced by idnsPTRLookup().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors