2
2
all rr types known to pdnsd
4
4
Copyright (C) 2000, 2001 Thomas Moestl
5
Copyright (C) 2003, 2004 Paul A. Rombouts
7
This file is part of the pdnsd package.
9
pdnsd is free software; you can redistribute it and/or modify
10
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation; either version 2, or (at your option)
14
pdnsd is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
19
You should have received a copy of the GNU General Public License
20
along with pdsnd; see the file COPYING. If not, write to
21
the Free Software Foundation, 59 Temple Place - Suite 330,
22
Boston, MA 02111-1307, USA. */
5
Copyright (C) 2003, 2004, 2007 Paul A. Rombouts
7
This file is part of the pdnsd package.
9
pdnsd is free software; you can redistribute it and/or modify
10
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation; either version 3 of the License, or
12
(at your option) any later version.
14
pdnsd is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
19
You should have received a copy of the GNU General Public License
20
along with pdnsd; see the file COPYING. If not, see
21
<http://www.gnu.org/licenses/>.
24
25
#include <string.h>
26
27
#include "helpers.h"
83
* OK, this is ineffective. But it is used _really_ seldom (only in some cases while parsing the
84
* OK, this is inefficient. But it is used _really_ seldom (only in some cases while parsing the
84
85
* config file or by pdnsd-ctl), so it is much more effective to sort by id.
86
87
int rr_tp_byname(char *name)
94
95
return -1; /* invalid */
98
/* The following is not needed by pdnsd-ctl. */
98
101
static const unsigned int poweroften[8] = {1, 10, 100, 1000, 10000, 100000,
99
102
1000000,10000000};
122
125
This is an adapted version of the loc_ntoa function that
123
126
can be found in the BIND 9 source.
125
const char *loc2str(const void *binary, char *ascii, int asclen)
128
const char *loc2str(const void *binary, char *ascii, size_t asclen)
127
130
const unsigned char *cp = binary;