diff options
author | Magnus Ahltorp <map@kth.se> | 2016-02-12 16:03:05 +0100 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2016-02-12 16:03:05 +0100 |
commit | 367887ca3769c8ab4c7e64b88a42995d5cdbbdca (patch) | |
tree | 9eae7f86a8d874a5a7efe1baf46afe74dd63005b /c_src/util.h | |
parent | 82afb3099174783939c72d9ba5388ef0429df37c (diff) |
Move code to util.c and filebuffer.c
Diffstat (limited to 'c_src/util.h')
-rw-r--r-- | c_src/util.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/c_src/util.h b/c_src/util.h new file mode 100644 index 0000000..976ee8e --- /dev/null +++ b/c_src/util.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2015, NORDUnet A/S. + * See LICENSE for licensing information. + */ + +#ifndef UTIL_H +#define UTIL_H + +#define DEBUG_CACHE 0 +#define DEBUG_WRITE 0 +#define DEBUG_READ 0 +#define DEBUG_PORT 0 + +void +set_error(char **error, const char * __restrict, ...) __attribute__ ((__format__ (__printf__, 2, 3))); + +int +calc_padding(int offset, int alignment); + +void +print_entry(node_object node); + +void +print_hex(const void *data, int length); + +uint64_t +read_host64(void *ptr); + +uint32_t +read_be32(void *ptr); + +uint16_t +read_be16(void *ptr); + +#endif |