OpenDNSSEC-signer  1.3.16
toolutil.h
Go to the documentation of this file.
1 /*
2  * $Id: toolutil.h 3695 2010-08-10 09:00:55Z jakob $
3  *
4  * Copyright (c) 2009 NLNet Labs. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  */
28 
29 #define MAX_LINE_LEN 65535
30 #define TIMEVAL_SUB(a,b) ((((a).tv_sec - (b).tv_sec)) + ((a).tv_usec - (b).tv_usec) / 1000000)
31 
32 #ifdef HAVE_SYS_TYPES_H
33 # include <sys/types.h>
34 #endif
35 #ifdef HAVE_UNISTD_H
36 # include <unistd.h>
37 #endif
38 
39 #include <ldns/ldns.h>
40 
41 int read_line(FILE *input, char *line, int multiline, int skip_comments);
42 void rr_list_clear(ldns_rr_list *rr_list);
43 uint32_t lookup_class(FILE* fd);
44 uint32_t lookup_serial(FILE* fd);
45 uint32_t lookup_minimum(FILE* fd);
46 
47 
uint32_t lookup_minimum(FILE *fd)
Definition: toolutil.c:171
ldns_rr_class lookup_class(FILE *fd)
Definition: toolutil.c:177
void rr_list_clear(ldns_rr_list *rr_list)
Definition: toolutil.c:118
int read_line(FILE *input, char *line, int multiline, int skip_comments)
Definition: toolutil.c:37
uint32_t lookup_serial(FILE *fd)
Definition: toolutil.c:165