~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to lib/bind/resolv/res_comp.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
 
71
71
#if defined(LIBC_SCCS) && !defined(lint)
72
72
static const char sccsid[] = "@(#)res_comp.c    8.1 (Berkeley) 6/4/93";
73
 
static const char rcsid[] = "$Id: res_comp.c,v 1.1.2.1.4.2 2005/07/28 07:43:22 marka Exp $";
 
73
static const char rcsid[] = "$Id: res_comp.c,v 1.5 2005/07/28 06:51:50 marka Exp $";
74
74
#endif /* LIBC_SCCS and not lint */
75
75
 
76
76
#include "port_before.h"
85
85
#include <unistd.h>
86
86
#include "port_after.h"
87
87
 
88
 
/*
 
88
/*%
89
89
 * Expand compressed domain name 'src' to full domain name.
90
 
 * 'msg' is a pointer to the begining of the message,
91
 
 * 'eom' points to the first location after the message,
92
 
 * 'dst' is a pointer to a buffer of size 'dstsiz' for the result.
93
 
 * Return size of compressed name or -1 if there was an error.
 
90
 *
 
91
 * \li 'msg' is a pointer to the begining of the message,
 
92
 * \li 'eom' points to the first location after the message,
 
93
 * \li 'dst' is a pointer to a buffer of size 'dstsiz' for the result.
 
94
 * \li Return size of compressed name or -1 if there was an error.
94
95
 */
95
96
int
96
97
dn_expand(const u_char *msg, const u_char *eom, const u_char *src,
103
104
        return (n);
104
105
}
105
106
 
106
 
/*
 
107
/*%
107
108
 * Pack domain name 'exp_dn' in presentation form into 'comp_dn'.
108
 
 * Return the size of the compressed name or -1.
109
 
 * 'length' is the size of the array pointed to by 'comp_dn'.
 
109
 *
 
110
 * \li Return the size of the compressed name or -1.
 
111
 * \li 'length' is the size of the array pointed to by 'comp_dn'.
110
112
 */
111
113
int
112
114
dn_comp(const char *src, u_char *dst, int dstsiz,
117
119
                                 (const u_char **)lastdnptr));
118
120
}
119
121
 
120
 
/*
 
122
/*%
121
123
 * Skip over a compressed domain name. Return the size or -1.
122
124
 */
123
125
int
129
131
        return (ptr - saveptr);
130
132
}
131
133
 
132
 
/*
 
134
/*%
133
135
 * Verify that a domain name uses an acceptable character set.
134
 
 */
135
 
 
136
 
/*
 
136
 *
137
137
 * Note the conspicuous absence of ctype macros in these definitions.  On
138
138
 * non-ASCII hosts, we can't depend on string literals or ctype macros to
139
139
 * tell us anything about network-format data.  The rest of the BIND system
176
176
        return (1);
177
177
}
178
178
 
179
 
/*
 
179
/*%
180
180
 * hostname-like (A, MX, WKS) owners can have "*" as their first label
181
181
 * but must otherwise be as a host name.
182
182
 */
191
191
        return (res_hnok(dn));
192
192
}
193
193
 
194
 
/*
 
194
/*%
195
195
 * SOA RNAMEs and RP RNAMEs can have any printable character in their first
196
196
 * label, but the rest of the name has to look like a host name.
197
197
 */
219
219
        return (0);
220
220
}
221
221
 
222
 
/*
223
 
 * This function is quite liberal, since RFC 1034's character sets are only
 
222
/*%
 
223
 * This function is quite liberal, since RFC1034's character sets are only
224
224
 * recommendations.
225
225
 */
226
226
int
234
234
}
235
235
 
236
236
#ifdef BIND_4_COMPAT
237
 
/*
 
237
/*%
238
238
 * This module must export the following externally-visible symbols:
239
239
 *      ___putlong
240
240
 *      ___putshort
261
261
u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); }
262
262
#endif /*__ultrix__*/
263
263
#endif /*BIND_4_COMPAT*/
 
264
 
 
265
/*! \file */