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 */

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