sresolv  1.12.11devel
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sres_record.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Sofia-SIP package
3  *
4  * Copyright (C) 2005 Nokia Corporation.
5  *
6  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24 
25 #ifndef SOFIA_RESOLV_SRES_RECORD_H
26 
27 #define SOFIA_RESOLV_SRES_RECORD_H
28 
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
50 typedef struct sres_common
51 {
52  int r_refcount;
53  char *r_name;
62 
65  SRES_OK = 0,
72  /* Errors generated by sresolv */
78  _SRES_LAST_ERR
79 };
80 
82 typedef struct sres_soa_record
83 {
85  char *soa_mname;
86  char *soa_rname;
93 
95 typedef struct sres_generic
96 {
98  uint8_t g_data[128];
100 
102 typedef struct sres_a_record
103 {
105  struct in_addr a_addr;
107 
112 typedef struct
113 {
114  uint8_t u6_addr[16];
115 } sres_in6_t;
116 
118 typedef struct sres_a6_record
119 {
122  uint8_t a6_pad[3];
124  char *a6_prename;
126 
128 typedef struct sres_aaaa_record
129 {
133 
135 typedef struct sres_cname_record
136 {
138  char *cn_cname;
140 
142 typedef struct sres_ptr_record
143 {
145  char *ptr_domain;
147 
149 typedef struct sres_srv_record
150 {
155  uint16_t srv_pad;
156  char *srv_target;
158 
160 typedef struct sres_naptr_record
161 {
165  char *na_flags;
166  char *na_services;
167  char *na_regexp;
168  char *na_replace;
170 
171 
172 #ifndef SRES_RECORD_T
173 #define SRES_RECORD_T
174 
176 #endif
177 
180 {
191 };
192 
197 };
198 
250 };
251 
253 SRESPUBFUN char const *sres_record_type(int type, char buffer[8]);
254 
256 SRESPUBFUN char const *sres_record_status(int status, char buffer[8]);
257 
260  sres_record_t const *);
261 
262 #ifdef __cplusplus
263 }
264 #endif
265 
266 #endif /* SOFIA_RESOLV_SRES_CACHE_H */
Name has no given record type.
Definition: sres_record.h:74
uint32_t soa_refresh
Refresh intercal.
Definition: sres_record.h:88
ATM Address.
Definition: sres_record.h:234
char * a6_prename
Prefix name.
Definition: sres_record.h:124
Pointer record (RFC 1035).
Definition: sres_record.h:142
Transfer zone of authority.
Definition: sres_record.h:246
Authoritative server.
Definition: sres_record.h:202
int r_refcount
Number of references to this record.
Definition: sres_record.h:52
Any class.
Definition: sres_record.h:196
sres_soa_record_t sr_soa[1]
SOA (start-of-authority) record.
Definition: sres_record.h:183
sres_a6_record_t sr_a6[1]
A6 (IP6 address) record.
Definition: sres_record.h:187
SRESPUBFUN int sres_record_compare(sres_record_t const *, sres_record_t const *)
Compare two records.
Definition: sres.c:1607
Server error.
Definition: sres_record.h:67
ISDN calling address.
Definition: sres_record.h:219
char * na_services
Services available.
Definition: sres_record.h:166
X.400 mail mapping.
Definition: sres_record.h:225
char * soa_rname
Person responsible for domain.
Definition: sres_record.h:86
struct sres_aaaa_record sres_aaaa_record_t
Address record for IPv6 (RFC 1886).
Security key.
Definition: sres_record.h:224
Nimrod Locator.
Definition: sres_record.h:231
No domain name.
Definition: sres_record.h:68
sres_common_t soa_record[1]
Common part of DNS records.
Definition: sres_record.h:84
Start of a zone of authority record (RFC 1035).
Definition: sres_record.h:82
IPv6 Address (sres_aaaa_record).
Definition: sres_record.h:227
Mail routing information.
Definition: sres_record.h:214
Mail forwarder.
Definition: sres_record.h:203
char * na_regexp
Substitution expression.
Definition: sres_record.h:167
Key Exchange.
Definition: sres_record.h:237
uint32_t soa_expire
Upper limit on zone expiration time.
Definition: sres_record.h:90
struct sres_common sres_common_t
Common part of all DNS records.
uint16_t r_status
Status of query (nonzero upon an error)
Definition: sres_record.h:54
uint16_t r_parsed
Nonzero if parsed.
Definition: sres_record.h:60
sres_common_t cn_record[1]
Common part of DNS records.
Definition: sres_record.h:137
SU_U16_T uint16_t
Transfer mailbox records.
Definition: sres_record.h:247
uint16_t srv_priority
Priority.
Definition: sres_record.h:152
IPv6 address used by sresolv library.
Definition: sres_record.h:112
sres_class
Protocol family classes.
Definition: sres_record.h:194
EDNS 0 option (RFC 2671)
Definition: sres_record.h:242
sres_common_t na_record[1]
Common part of DNS records.
Definition: sres_record.h:162
Non-terminal DNAME (for IPv6)
Definition: sres_record.h:240
Text strings.
Definition: sres_record.h:215
uint16_t r_rdlen
Length of record data.
Definition: sres_record.h:59
uint16_t r_type
Record type (A, CNAME, A6, etc)
Definition: sres_record.h:56
uint32_t r_ttl
Time-to-live.
Definition: sres_record.h:58
#define SRESPUBFUN
SRESPUBFUN declares an exported function.
Definition: sres_config.h:41
Address record for IPv6 (RFC 1886).
Definition: sres_record.h:128
Naming Authority PoinTeR (RFC 2915, sres_naptr_record)
Definition: sres_record.h:235
Naming authority pointer record (RFC 2915).
Definition: sres_record.h:160
sres_srv_record_t sr_srv[1]
SRV record.
Definition: sres_record.h:189
Address record (RFC 1035).
Definition: sres_record.h:102
IPv6 address (deprecates AAAA)
Definition: sres_record.h:239
Generic DNS record.
Definition: sres_record.h:95
struct sres_a6_record sres_a6_record_t
Aggregated address record for IPv6 (RFC 2874, deprecated).
sres_a_record_t sr_a[1]
A (address) record.
Definition: sres_record.h:184
char * na_replace
Replacement.
Definition: sres_record.h:168
Router.
Definition: sres_record.h:220
struct sres_soa_record sres_soa_record_t
Start of a zone of authority record (RFC 1035).
Aggregated address record for IPv6 (RFC 2874, deprecated).
Definition: sres_record.h:118
uint16_t na_order
Processing order for NAPTR records.
Definition: sres_record.h:163
IPv4 address (sres_a_record).
Definition: sres_record.h:201
sres_in6_t a6_suffix
Address suffix.
Definition: sres_record.h:123
Mail rename name.
Definition: sres_record.h:208
Canonic name record (RFC 1035).
Definition: sres_record.h:135
X_25 calling address.
Definition: sres_record.h:218
Incremental zone transfer.
Definition: sres_record.h:245
sres_cname_record_t sr_cname[1]
CNAME (canonic name) record.
Definition: sres_record.h:185
Common part of all DNS records.
Definition: sres_record.h:50
uint8_t g_data[128]
Record data.
Definition: sres_record.h:98
sres_ptr_record_t sr_ptr[1]
PTR (pointer) record.
Definition: sres_record.h:186
uint16_t r_size
Size of this record.
Definition: sres_record.h:55
uint8_t a6_prelen
Prefix length.
Definition: sres_record.h:121
Internal error.
Definition: sres_record.h:75
Refused.
Definition: sres_record.h:70
SRESPUBFUN char const * sres_record_type(int type, char buffer[8])
Convert type to its name.
Definition: sres.c:1504
Mailbox information.
Definition: sres_record.h:213
sres_common_t a6_record[1]
Common part of DNS records.
Definition: sres_record.h:120
AFS cell database.
Definition: sres_record.h:217
Domain name pointer (sres_ptr_record).
Definition: sres_record.h:211
sres_generic_t sr_generic[1]
Generic (unparsed) DNS record.
Definition: sres_record.h:182
sres_aaaa_record_t sr_aaaa[1]
AAAA (IP6 address) record.
Definition: sres_record.h:188
Null resource record.
Definition: sres_record.h:209
sres_common_t g_record[1]
Common part of DNS records.
Definition: sres_record.h:97
struct sres_srv_record sres_srv_record_t
Service location record (RFC 2782).
struct in_addr a_addr
IP4 address.
Definition: sres_record.h:105
Mailbox domain name.
Definition: sres_record.h:206
uint32_t soa_retry
Interval between refres retries.
Definition: sres_record.h:89
Network or DNS configuration error.
Definition: sres_record.h:76
struct sres_naptr_record sres_naptr_record_t
Naming authority pointer record (RFC 2915).
sres_common_t aaaa_record[1]
Common part of DNS records.
Definition: sres_record.h:130
SU_U32_T uint32_t
Service location record (RFC 2782).
Definition: sres_record.h:149
struct sres_generic sres_generic_t
Generic DNS record.
Canonical name (sres_cname_record).
Definition: sres_record.h:204
char * na_flags
Flags for interpretation and rewriting.
Definition: sres_record.h:165
Kitchen sink (experimental)
Definition: sres_record.h:241
Timeout occurred.
Definition: sres_record.h:73
uint32_t soa_serial
Version number.
Definition: sres_record.h:87
Not implemented.
Definition: sres_record.h:69
uint16_t srv_weight
Weight.
Definition: sres_record.h:153
uint32_t soa_minimum
Minimum TTL for any record in zone.
Definition: sres_record.h:91
Responsible person.
Definition: sres_record.h:216
Wildcard match.
Definition: sres_record.h:249
Server could not interpret query.
Definition: sres_record.h:66
NSAP address.
Definition: sres_record.h:221
struct sres_a_record sres_a_record_t
Address record (RFC 1035).
struct sres_cname_record sres_cname_record_t
Canonic name record (RFC 1035).
Endpoint identifier.
Definition: sres_record.h:230
uint16_t na_prefer
Preference.
Definition: sres_record.h:164
Start of authority zone (sres_soa_record).
Definition: sres_record.h:205
ICBM record.
Definition: sres_record.h:226
Transaction signature.
Definition: sres_record.h:244
char * srv_target
Domain name of the target host.
Definition: sres_record.h:156
Internet (IN)
Definition: sres_record.h:195
Reverse NSAP lookup.
Definition: sres_record.h:222
char * soa_mname
Primary name server.
Definition: sres_record.h:85
char * r_name
Domain name.
Definition: sres_record.h:53
No error condition.
Definition: sres_record.h:65
Well known service.
Definition: sres_record.h:210
uint16_t r_class
Record class (IN)
Definition: sres_record.h:57
uint16_t srv_port
Service port on the target host.
Definition: sres_record.h:154
sres_common_t sr_record[1]
Common part of all DNS records.
Definition: sres_record.h:181
char * ptr_domain
Domain.
Definition: sres_record.h:145
struct sres_ptr_record sres_ptr_record_t
Pointer record (RFC 1035).
SU_U8_T uint8_t
sres_common_t a_record[1]
Common part of DNS records.
Definition: sres_record.h:104
Security signature.
Definition: sres_record.h:223
Configuration for Sofia DNS Resolver.
sres_naptr_record_t sr_naptr[1]
NAPTR record.
Definition: sres_record.h:190
sres_in6_t aaaa_addr
IP6 address.
Definition: sres_record.h:131
Mail group member.
Definition: sres_record.h:207
sres_qtypes
Query types.
Definition: sres_record.h:200
Server Selection (RFC 2782, sres_srv_record).
Definition: sres_record.h:232
SRESPUBFUN char const * sres_record_status(int status, char buffer[8])
Convert status to its name.
Definition: sres.c:1563
sres_common_t srv_record[1]
Common part of DNS records.
Definition: sres_record.h:151
Next domain.
Definition: sres_record.h:229
sres_status
Possible values for r_status (RCODE) in sres_common.
Definition: sres_record.h:64
Location Information.
Definition: sres_record.h:228
sres_common_t ptr_record[1]
Common part of DNS records.
Definition: sres_record.h:144
Host information.
Definition: sres_record.h:212
Certification record.
Definition: sres_record.h:238
Transfer mail agent records.
Definition: sres_record.h:248
Union of different DNS records.
Definition: sres_record.h:179

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.