Skip to content
Snippets Groups Projects
Commit ba0f8a2d authored by Marek Vavruša's avatar Marek Vavruša
Browse files

rosedb: cleanup

parent 6f410e5a
No related branches found
No related tags found
No related merge requests found
......@@ -140,17 +140,20 @@ static inline void pack_str(char **stream, const char *str) {
memcpy(*stream, str, len);
*stream += len;
}
static inline char *unpack_str(char **stream) {
char *ret = *stream;
*stream += PACKED_LEN(ret);
return ret;
}
static inline void pack_bin(char **stream, const void *data, uint32_t len) {
wire_write_u32((uint8_t *)*stream, len);
*stream += sizeof(uint32_t);
memcpy(*stream, data, len);
*stream += len;
}
static inline void *unpack_bin(char **stream, uint32_t *len) {
*len = wire_read_u32((uint8_t *)*stream);
*stream += sizeof(uint32_t);
......@@ -158,6 +161,7 @@ static inline void *unpack_bin(char **stream, uint32_t *len) {
*stream += *len;
return ret;
}
static MDB_val pack_key(const knot_dname_t *name)
{
MDB_val key = { knot_dname_size(name), (void *)name };
......
/*!
* \file synth_record.h
* \file rosedb.h
*
* \author Marek Vavrusa <marek.vavrusa@nic.cz>
*
* \brief Synthetic records module
* \brief Static resource records
*
* Accepted configurations:
* * "forward <prefix> <ttl> <address>/<netblock>"
* * "reverse <prefix> <zone> <ttl> <address>/<netblock>"
* * "<path_to_database>"
*
* Module synthetises forward/reverse records based on a template when
* the queried record can't be found in the zone contents.
* The module provides a mean to override responses for certain queries before
* the record is searched in the available zones.
*
* \addtogroup query_processing
* @{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment