aboutsummaryrefslogtreecommitdiff
path: root/src/zonefile.h
blob: 4dcd6efce788887f1dd56608a8c1c4a5acfeef95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * src/zonefile.h
 * (c) 2021 Jonas Gunz <himself@jonasgunz.de>
 * License: MIT
 */

#pragma once

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "database.h"
#include "log.h"

/**
 * NOT COMPATIBLE WITH STANDARD ZONEFILES!
 * use FIXED format
 * <name> <ttl> <class> <type> <value>
 */
int zonefile_to_database (database_t *_database, char* _file);

int zonefile_parse_line(database_t *_database, char *_line);

/* Chnages the original string! */
int zonefile_string_split(char* _parts[], ssize_t _max, char* _str, char _delim);