8#include "mdnsd_config.h"
10#if !defined(__bool_true_false_are_defined) && defined(_MSC_VER) && _MSC_VER < 1600
22#if MDNSD_LOGLEVEL <= 100
23#define MDNSD_LOG_TRACE(...) do { \
24 printf("mdnsd: TRACE - "); printf(__VA_ARGS__); printf("\n"); } while(0)
26#define MDNSD_LOG_TRACE(...) do {} while(0)
29#if MDNSD_LOGLEVEL <= 200
30#define MDNSD_LOG_DEBUG(...) do { \
31 printf("mdnsd: DEBUG - "); printf(__VA_ARGS__); printf("\n"); } while(0)
33#define MDNSD_LOG_DEBUG(...) do {} while(0)
36#if MDNSD_LOGLEVEL <= 300
37#define MDNSD_LOG_INFO(...) do { \
38 printf("mdnsd: INFO - "); printf(__VA_ARGS__); printf("\n"); } while(0)
40#define MDNSD_LOG_INFO(...) do {} while(0)
43#if MDNSD_LOGLEVEL <= 400
44#define MDNSD_LOG_WARNING(...) do { \
45 printf("mdnsd: WARN - "); printf(__VA_ARGS__); printf("\n"); } while(0)
47#define MDNSD_LOG_WARNING(...) do {} while(0)
50#if MDNSD_LOGLEVEL <= 500
51#define MDNSD_LOG_ERROR(...) do { \
52 printf("mdnsd: ERROR - "); printf(__VA_ARGS__); printf("\n"); } while(0)
54#define MDNSD_LOG_ERROR(...) do {} while(0)
57#if MDNSD_LOGLEVEL <= 600
58#define MDNSD_LOG_FATAL(...) do { \
59 printf("mdnsd: FATAL - "); printf(__VA_ARGS__); printf("\n"); } while(0)
61#define MDNSD_LOG_FATAL(...) do {} while(0)
84 unsigned short int priority, weight,
port;
155unsigned short int MDNSD_EXPORT
mdnsd_step(
mdns_daemon_t *d,
int mdns_socket,
bool processIn,
bool processOut,
struct timeval *nextSleep);
158#ifdef MDNSD_DEBUG_DUMP_PKGS_FILE
159void mdnsd_debug_dumpCompleteChunk(
mdns_daemon_t *d,
const char* data,
size_t len);
unsigned short int MDNSD_EXPORT mdnsd_step(mdns_daemon_t *d, int mdns_socket, bool processIn, bool processOut, struct timeval *nextSleep)
void MDNSD_EXPORT mdnsd_set_host(mdns_daemon_t *d, mdns_record_t *r, const char *name)
mdns_record_t MDNSD_EXPORT * mdnsd_get_published(const mdns_daemon_t *d, const char *host)
void MDNSD_EXPORT mdnsd_register_receive_callback(mdns_daemon_t *d, mdnsd_record_received_callback cb, void *data)
struct timeval MDNSD_EXPORT * mdnsd_sleep(mdns_daemon_t *d)
void MDNSD_EXPORT mdnsd_free(mdns_daemon_t *d)
mdns_record_t MDNSD_EXPORT * mdnsd_unique(mdns_daemon_t *d, const char *host, unsigned short int type, unsigned long int ttl, void(*conflict)(char *host, int type, void *arg), void *arg)
void MDNSD_EXPORT mdnsd_done(mdns_daemon_t *d, mdns_record_t *r)
struct mdns_record mdns_record_t
Record entry.
void MDNSD_EXPORT mdnsd_query(mdns_daemon_t *d, const char *host, int type, int(*answer)(mdns_answer_t *a, void *arg), void *arg)
struct mdns_daemon mdns_daemon_t
Main daemon data.
const mdns_answer_t MDNSD_EXPORT * mdnsd_record_data(const mdns_record_t *r)
void MDNSD_EXPORT mdnsd_flush(mdns_daemon_t *d)
mdns_record_t MDNSD_EXPORT * mdnsd_shared(mdns_daemon_t *d, const char *host, unsigned short int type, unsigned long int ttl)
mdns_record_t MDNSD_EXPORT * mdnsd_record_next(const mdns_record_t *r)
int MDNSD_EXPORT mdnsd_in(mdns_daemon_t *d, struct message *m, in_addr_t ip, unsigned short int port)
void MDNSD_EXPORT mdnsd_shutdown(mdns_daemon_t *d)
int MDNSD_EXPORT mdnsd_has_query(const mdns_daemon_t *d, const char *host)
void MDNSD_EXPORT mdnsd_set_ip(mdns_daemon_t *d, mdns_record_t *r, struct in_addr ip)
void MDNSD_EXPORT mdnsd_set_raw(mdns_daemon_t *d, mdns_record_t *r, const char *data, unsigned short int len)
void(* mdnsd_record_received_callback)(const struct resource *r, void *data)
Callback for received record.
int MDNSD_EXPORT mdnsd_out(mdns_daemon_t *d, struct message *m, struct in_addr *ip, unsigned short int *port)
struct mdns_answer mdns_answer_t
Answer data.
mdns_daemon_t MDNSD_EXPORT * mdnsd_new(int clazz, int frame)
void MDNSD_EXPORT mdnsd_set_srv(mdns_daemon_t *d, mdns_record_t *r, unsigned short int priority, unsigned short int weight, unsigned short int port, char *name)
mdns_answer_t MDNSD_EXPORT * mdnsd_list(mdns_daemon_t *d, const char *host, int type, mdns_answer_t *last)
struct mdns_answer::@7 srv