X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=blobdiff_plain;f=util.h;h=efee5dc3589e3b42abc9cacd592c89b9bf7c32b9;hp=947f851ef233f4c53fe638b326fa4c834f7eebff;hb=1fa9077d63b7a1083f71ec058c338b4fb8afebe9;hpb=f13f07d145515b80b6f7cc3e1b06dc262ded174d diff --git a/util.h b/util.h index 947f851..efee5dc 100644 --- a/util.h +++ b/util.h @@ -14,17 +14,24 @@ #ifndef _UTIL_H__ #define _UTIL_H__ +#include +#include + #define DBG(level, fmt, ...) do { \ if (debug >= level) \ fprintf(stderr, "mdnsd: %s (%d): " fmt, __func__, __LINE__, ## __VA_ARGS__); \ } while (0) -extern int debug; +#define MDNS_BUF_LEN (8 * 1024) +#define HOSTNAME_LEN 256 -void *memdup(const void *d, int l); +extern int debug; +extern uint8_t mdns_buf[MDNS_BUF_LEN]; +extern char mdns_hostname[HOSTNAME_LEN]; +extern char mdns_hostname_local[HOSTNAME_LEN + 6]; -extern void signal_setup(void); -extern char* get_hostname(void); +extern void get_hostname(void); extern uint32_t rand_time_delta(uint32_t t); +extern time_t monotonic_time(void); #endif