diff src/protocols/rendezvous/mdns.h @ 8834:beb7be215db3

[gaim-migrate @ 9598] I removed account->ip because it isn't used anywhere and I think it's dumb. Also added handling for a and aaaa records to rendezvous. Gaim peeps show up in iChat rendezvous lists now. There are still problems. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 28 Apr 2004 00:48:21 +0000
parents 8212661dc3cc
children 518455386538
line wrap: on
line diff
--- a/src/protocols/rendezvous/mdns.h	Tue Apr 27 23:17:12 2004 +0000
+++ b/src/protocols/rendezvous/mdns.h	Wed Apr 28 00:48:21 2004 +0000
@@ -60,6 +60,7 @@
 #define RENDEZVOUS_RRTYPE_NULL	10
 #define RENDEZVOUS_RRTYPE_PTR	12
 #define RENDEZVOUS_RRTYPE_TXT	16
+#define RENDEZVOUS_RRTYPE_AAAA	28
 #define RENDEZVOUS_RRTYPE_SRV	33
 #define RENDEZVOUS_RRTYPE_ALL	255
 
@@ -90,6 +91,8 @@
 	void *rdata;
 } ResourceRecord;
 
+typedef unsigned char ResourceRecordRDataA;
+
 typedef struct _ResourceRecordRDataTXTNode {
 	char *name;
 	char *value;
@@ -97,6 +100,8 @@
 
 typedef GSList ResourceRecordRDataTXT;
 
+typedef unsigned char ResourceRecordRDataAAAA;
+
 typedef struct _ResourceRecordRDataSRV {
 	unsigned int priority;
 	unsigned int weight;
@@ -124,7 +129,16 @@
  * @return The file descriptor of the new socket, or -1 if
  *         there was an error establishing the socket.
  */
-int mdns_establish_socket();
+int mdns_socket_establish();
+
+
+/**
+ * Close a multicast socket.  This also clears the MDNS
+ * cache.
+ *
+ * @param The file descriptor of the multicast socket.
+ */
+void mdns_socket_close(int fd);
 
 
 /**
@@ -152,9 +166,11 @@
 int mdns_query(int fd, const char *domain, unsigned short type);
 
 int mdns_send_rr(int fd, ResourceRecord *rr);
+int mdns_advertise_a(int fd, const char *name, unsigned char *ip);
 int mdns_advertise_null(int fd, const char *name, const char *data, unsigned short rdlength);
 int mdns_advertise_ptr(int fd, const char *name, const char *domain);
 int mdns_advertise_txt(int fd, const char *name, const GSList *txt);
+int mdns_advertise_aaaa(int fd, const char *name, unsigned char *ip);
 int mdns_advertise_srv(int fd, const char *name, unsigned short port, const char *target);
 
 /**