comparison src/protocols/rendezvous/mdns.h @ 10596:913ec44675c3

[gaim-migrate @ 12011] Get some rendezvous stuff out of my tree. No, you still can't get or send IMs. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 14 Feb 2005 03:08:43 +0000
parents 518455386538
children
comparison
equal deleted inserted replaced
10595:de34037a02c7 10596:913ec44675c3
19 * 19 *
20 * You should have received a copy of the GNU General Public License 20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software 21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * 23 *
24 */
25
26 /*
27 * TODO: Need to document a lot of these.
24 */ 28 */
25 29
26 #ifndef _MDNS_H_ 30 #ifndef _MDNS_H_
27 #define _MDNS_H_ 31 #define _MDNS_H_
28 32
129 * @return The file descriptor of the new socket, or -1 if 133 * @return The file descriptor of the new socket, or -1 if
130 * there was an error establishing the socket. 134 * there was an error establishing the socket.
131 */ 135 */
132 int mdns_socket_establish(); 136 int mdns_socket_establish();
133 137
134
135 /** 138 /**
136 * Close a multicast socket. This also clears the MDNS 139 * Close a multicast socket. This also clears the MDNS
137 * cache. 140 * cache.
138 * 141 *
139 * @param The file descriptor of the multicast socket. 142 * @param The file descriptor of the multicast socket.
140 */ 143 */
141 void mdns_socket_close(int fd); 144 void mdns_socket_close(int fd);
142
143 145
144 /** 146 /**
145 * Sends a multicast DNS datagram. Generally this is called 147 * Sends a multicast DNS datagram. Generally this is called
146 * by other convenience functions such as mdns_query(), however 148 * by other convenience functions such as mdns_query(), however
147 * a client CAN construct its own DNSPacket if it wishes. 149 * a client CAN construct its own DNSPacket if it wishes.
167 169
168 int mdns_send_rr(int fd, ResourceRecord *rr); 170 int mdns_send_rr(int fd, ResourceRecord *rr);
169 int mdns_advertise_a(int fd, const char *name, const unsigned char *ip); 171 int mdns_advertise_a(int fd, const char *name, const unsigned char *ip);
170 int mdns_advertise_null(int fd, const char *name, const char *data, unsigned short rdlength); 172 int mdns_advertise_null(int fd, const char *name, const char *data, unsigned short rdlength);
171 int mdns_advertise_ptr(int fd, const char *name, const char *domain); 173 int mdns_advertise_ptr(int fd, const char *name, const char *domain);
174 int mdns_advertise_ptr_with_ttl(int fd, const char *name, const char *domain, int ttl);
172 int mdns_advertise_txt(int fd, const char *name, const GSList *txt); 175 int mdns_advertise_txt(int fd, const char *name, const GSList *txt);
173 int mdns_advertise_aaaa(int fd, const char *name, const unsigned char *ip); 176 int mdns_advertise_aaaa(int fd, const char *name, const unsigned char *ip);
174 int mdns_advertise_srv(int fd, const char *name, unsigned short port, const char *target); 177 int mdns_advertise_srv(int fd, const char *name, unsigned short port, const char *target);
175 178
176 /** 179 /**
193 void mdns_free_rrs(GSList *rrs); 196 void mdns_free_rrs(GSList *rrs);
194 197
195 ResourceRecord *mdns_copy_rr(const ResourceRecord *rr); 198 ResourceRecord *mdns_copy_rr(const ResourceRecord *rr);
196 199
197 ResourceRecordRDataTXTNode *mdns_txt_find(const GSList *ret, const char *name); 200 ResourceRecordRDataTXTNode *mdns_txt_find(const GSList *ret, const char *name);
201
198 GSList *mdns_txt_add(GSList *ret, const char *name, const char *value, gboolean replace); 202 GSList *mdns_txt_add(GSList *ret, const char *name, const char *value, gboolean replace);
199 203
200 204
201 #endif /* _MDNS_H_ */ 205 #endif /* _MDNS_H_ */