ipv6 cleanup
[project/mdnsd.git] / dns.h
diff --git a/dns.h b/dns.h
index 59ba6361d0d6cc6be1dc012f047bea6e8b9b4877..92f4c08a05815a82f2552cc4bc77b49f86c9b8dd 100644 (file)
--- a/dns.h
+++ b/dns.h
 #define IS_COMPRESSED(x)       ((x & 0xc0) == 0xc0)
 
 #define MCAST_ADDR             "224.0.0.251"
+#define MCAST_ADDR6            "ff02::fb"
 #define MCAST_PORT             5353
 
-#define CLASS_FLUSH            0x8000
+#define CLASS_UNICAST          0x8000
 #define CLASS_IN               0x0001
 
 #define MAX_NAME_LEN           8096
@@ -67,14 +68,13 @@ struct dns_question {
 } __attribute__((packed, aligned(2)));
 
 struct interface;
+extern int cfg_proto;
 
-extern char rdata_buffer[MAX_DATA_LEN + 1];
-
-void dns_send_question(struct interface *iface, const char *question, int type);
+void dns_send_question(struct interface *iface, const char *question, int type, int unicast);
 void dns_init_answer(void);
-void dns_add_answer(int type, const uint8_t *rdata, uint16_t rdlength);
+void dns_add_answer(int type, const uint8_t *rdata, uint16_t rdlength, int ttl);
 void dns_send_answer(struct interface *iface, const char *answer);
 const char* dns_type_string(uint16_t type);
-void dns_handle_packet(struct interface *iface, uint8_t *buf, int len);
+void dns_handle_packet(struct interface *iface, uint8_t *buf, int len, int unicast);
 
 #endif