diff src/protocols/rendezvous/mdns.h @ 8594:f3b928825a72

[gaim-migrate @ 9345] Some minor rendezvous changes. You still shouldn't use this yet, it has a long way to go. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 06 Apr 2004 05:16:02 +0000
parents 9aa6017da568
children 219e9638e8f3
line wrap: on
line diff
--- a/src/protocols/rendezvous/mdns.h	Tue Apr 06 02:52:58 2004 +0000
+++ b/src/protocols/rendezvous/mdns.h	Tue Apr 06 05:16:02 2004 +0000
@@ -60,6 +60,7 @@
 #define RENDEZVOUS_RRTYPE_NULL	10
 #define RENDEZVOUS_RRTYPE_PTR	12
 #define RENDEZVOUS_RRTYPE_TXT	16
+#define RENDEZVOUS_RRTYPE_SRV	33
 
 /*
  * Express for Men's
@@ -79,7 +80,7 @@
 	unsigned short class;
 } Question;
 
-typedef struct ResourceRecord {
+typedef struct _ResourceRecord {
 	gchar *name;
 	unsigned short type;
 	unsigned short class;
@@ -88,6 +89,15 @@
 	void *rdata;
 } ResourceRecord;
 
+typedef GHashTable ResourceRecordTXT;
+
+typedef struct _ResourceRecordSRV {
+	unsigned int priority;
+	unsigned int weight;
+	unsigned int port;
+	gchar *target;
+} ResourceRecordSRV;
+
 typedef struct _DNSPacket {
 	Header header;
 	Question *questions;
@@ -123,8 +133,12 @@
 int mdns_query(int fd, const char *domain);
 
 /**
+ * Read a UDP packet from the given file descriptor and parse it
+ * into a DNSPacket.
  *
- *
+ * @param fd A UDP listening socket to read from.
+ * @return A newly allocated DNSPacket.  This should be freed with
+ *         mdns_free() when no longer needed.
  */
 DNSPacket *mdns_read(int fd);