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

Go to the source code of this file.

Classes

class  rfc1035_rr
 
struct  _rfc1035_query
 
struct  _rfc1035_message
 

Macros

#define RFC1035_MAXHOSTNAMESZ   RFC2181_MAXHOSTNAMELEN
 
#define RFC1035_DEFAULT_PACKET_SZ   512
 
#define RFC1035_TYPE_A   1
 
#define RFC1035_TYPE_CNAME   5
 
#define RFC1035_TYPE_PTR   12
 
#define RFC1035_CLASS_IN   1
 

Typedefs

typedef struct _rfc1035_query rfc1035_query
 
typedef struct _rfc1035_message rfc1035_message
 

Functions

SQUIDCEXTERN ssize_t rfc1035BuildAQuery (const char *hostname, char *buf, size_t sz, unsigned short qid, rfc1035_query *query, ssize_t edns_sz)
 
SQUIDCEXTERN ssize_t rfc1035BuildPTRQuery (const struct in_addr, char *buf, size_t sz, unsigned short qid, rfc1035_query *query, ssize_t edns_sz)
 
SQUIDCEXTERN void rfc1035SetQueryID (char *, unsigned short qid)
 
SQUIDCEXTERN int rfc1035MessageUnpack (const char *buf, size_t sz, rfc1035_message **answer)
 
SQUIDCEXTERN int rfc1035QueryCompare (const rfc1035_query *, const rfc1035_query *)
 
SQUIDCEXTERN void rfc1035RRDestroy (rfc1035_rr **rr, int n)
 
SQUIDCEXTERN void rfc1035MessageDestroy (rfc1035_message **message)
 
SQUIDCEXTERN const char * rfc1035ErrorMessage (int n)
 
SQUIDCEXTERN int rfc1035HeaderPack (char *buf, size_t sz, rfc1035_message *hdr)
 
SQUIDCEXTERN int rfc1035HeaderUnpack (const char *buf, size_t sz, unsigned int *off, rfc1035_message *h)
 
SQUIDCEXTERN int rfc1035QuestionPack (char *buf, size_t sz, const char *name, const unsigned short type, const unsigned short _class)
 
SQUIDCEXTERN int rfc1035RRPack (char *buf, size_t sz, const rfc1035_rr *RR)
 

Macro Definition Documentation

#define RFC1035_CLASS_IN   1
#define RFC1035_DEFAULT_PACKET_SZ   512

Definition at line 34 of file rfc1035.h.

Referenced by idnsAddNameserver(), and idnsGrokReply().

#define RFC1035_MAXHOSTNAMESZ   RFC2181_MAXHOSTNAMELEN
RFC 1035 Section 3.1:
To simplify implementations, the total length of a domain name (i.e., label octets and label length octets) is restricted to 255 octets or less.
Clarified by RFC 2181 Section 11. (RFC2181_MAXHOSTNAMELEN)

Definition at line 32 of file rfc1035.h.

Referenced by rfc1035QueryUnpack(), rfc1035RRUnpack(), rfc2671RROptPack(), rfc3596BuildPTRQuery4(), and rfc3596BuildPTRQuery6().

#define RFC1035_TYPE_A   1

Definition at line 93 of file rfc1035.h.

Referenced by ipcacheParse(), rfc1035BuildAQuery(), rfc1035RRUnpack(), and rfc3596BuildAQuery().

#define RFC1035_TYPE_CNAME   5

Definition at line 94 of file rfc1035.h.

Referenced by fqdncacheParse(), ipcacheParse(), and rfc1035RRUnpack().

#define RFC1035_TYPE_PTR   12

Typedef Documentation

Definition at line 54 of file rfc1035.h.

typedef struct _rfc1035_query rfc1035_query

Definition at line 47 of file rfc1035.h.

Function Documentation

SQUIDCEXTERN const char* rfc1035ErrorMessage ( int  n)
SQUIDCEXTERN int rfc1035QueryCompare ( const rfc1035_query ,
const rfc1035_query  
)

Definition at line 557 of file rfc1035.cc.

References _rfc1035_query::name, _rfc1035_query::qclass, and _rfc1035_query::qtype.

Referenced by idnsGrokReply().

SQUIDCEXTERN int rfc1035QuestionPack ( char *  buf,
size_t  sz,
const char *  name,
const unsigned short  type,
const unsigned short  _class 
)

Definition at line 153 of file rfc1035.cc.

References assert, and rfc1035NamePack().

Referenced by rfc1035BuildAQuery(), rfc1035BuildPTRQuery(), and rfc3596BuildHostQuery().

SQUIDCEXTERN void rfc1035RRDestroy ( rfc1035_rr **  rr,
int  n 
)

Definition at line 490 of file rfc1035.cc.

References NULL, and xfree.

Referenced by rfc1035MessageDestroy().

SQUIDCEXTERN int rfc1035RRPack ( char *  buf,
size_t  sz,
const rfc1035_rr RR 
)
SQUIDCEXTERN void rfc1035SetQueryID ( char *  ,
unsigned short  qid 
)

Definition at line 746 of file rfc1035.cc.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors