Mercurial > pidgin.yaz
diff src/protocols/rendezvous/mdns.h @ 8612:219e9638e8f3
[gaim-migrate @ 9363]
Make sending mDNS datagrams more object oriented. And allow for
advertising PTR records. And some other changes. Just wanted
to commit this to the public archives in case my computer it
seized in a hostile buy-out by kopete.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 08 Apr 2004 01:23:49 +0000 |
parents | f3b928825a72 |
children | fdff0f31002d |
line wrap: on
line diff
--- a/src/protocols/rendezvous/mdns.h Thu Apr 08 00:54:05 2004 +0000 +++ b/src/protocols/rendezvous/mdns.h Thu Apr 08 01:23:49 2004 +0000 @@ -120,18 +120,33 @@ */ int mdns_establish_socket(); + +/** + * Sends a multicast DNS datagram. Generally this is called + * by other convenience functions such as mdns_query(), however + * a client CAN construct its own DNSPacket if it wishes. + * + * @param fd The file descriptor of a pre-established socket to + * be used for sending the outgoing mDNS datagram. + * @param dns The DNS datagram you wish to send. + * @return 0 on success, otherwise return the error number. + */ +int mdns_send_dns(int fd, const DNSPacket *dns); + /** * Send a multicast DNS query for the given domain across the given * socket. * * @param fd The file descriptor of a pre-established socket to - * be used for sending the outgoing mDNS query. + * be used for sending the outgoing mDNS datagram. * @param domain This is the domain name you wish to query. It should * be of the format "_presence._tcp.local" for example. * @return 0 if sucessful. */ int mdns_query(int fd, const char *domain); +int mdns_advertise_ptr(int fd, const char *name, const char *domain); + /** * Read a UDP packet from the given file descriptor and parse it * into a DNSPacket.