src/protocols/rendezvous/mdns.h

changeset 8631
f45bad880ec2
parent 8629
0c35c1e5a316
child 8634
2781838b4e10
equal deleted inserted replaced
8630:70cf27cc1765 8631:f45bad880ec2
87 int ttl; 87 int ttl;
88 unsigned short rdlength; 88 unsigned short rdlength;
89 void *rdata; 89 void *rdata;
90 } ResourceRecord; 90 } ResourceRecord;
91 91
92 typedef struct _ResourceRecordTXTRDataNode { 92 typedef struct _ResourceRecordRDataTXTNode {
93 char *name; 93 char *name;
94 char *value; 94 char *value;
95 } ResourceRecordTXTRDataNode; 95 } ResourceRecordRDataTXTNode;
96 96
97 typedef GSList ResourceRecordTXTRData; 97 typedef GSList ResourceRecordRDataTXT;
98 98
99 typedef GHashTable ResourceRecordTXT; 99 typedef struct _ResourceRecordRDataSRV {
100 unsigned short port;
101 const char *target;
102 } ResourceRecordRDataSRV;
100 103
101 typedef struct _ResourceRecordSRV { 104 typedef struct _ResourceRecordSRV {
102 unsigned int priority; 105 unsigned int priority;
103 unsigned int weight; 106 unsigned int weight;
104 unsigned int port; 107 unsigned int port;
152 */ 155 */
153 int mdns_query(int fd, const char *domain); 156 int mdns_query(int fd, const char *domain);
154 157
155 int mdns_advertise_ptr(int fd, const char *name, const char *domain); 158 int mdns_advertise_ptr(int fd, const char *name, const char *domain);
156 int mdns_advertise_txt(int fd, const char *name, const GSList *txt); 159 int mdns_advertise_txt(int fd, const char *name, const GSList *txt);
160 int mdns_advertise_srv(int fd, const char *name, unsigned short port, const char *target);
157 161
158 /** 162 /**
159 * Read a UDP packet from the given file descriptor and parse it 163 * Read a UDP packet from the given file descriptor and parse it
160 * into a DNSPacket. 164 * into a DNSPacket.
161 * 165 *

mercurial