Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
8611:05bc76d8e1b7 | 8612:219e9638e8f3 |
---|---|
118 * @return The file descriptor of the new socket, or -1 if | 118 * @return The file descriptor of the new socket, or -1 if |
119 * there was an error establishing the socket. | 119 * there was an error establishing the socket. |
120 */ | 120 */ |
121 int mdns_establish_socket(); | 121 int mdns_establish_socket(); |
122 | 122 |
123 | |
124 /** | |
125 * Sends a multicast DNS datagram. Generally this is called | |
126 * by other convenience functions such as mdns_query(), however | |
127 * a client CAN construct its own DNSPacket if it wishes. | |
128 * | |
129 * @param fd The file descriptor of a pre-established socket to | |
130 * be used for sending the outgoing mDNS datagram. | |
131 * @param dns The DNS datagram you wish to send. | |
132 * @return 0 on success, otherwise return the error number. | |
133 */ | |
134 int mdns_send_dns(int fd, const DNSPacket *dns); | |
135 | |
123 /** | 136 /** |
124 * Send a multicast DNS query for the given domain across the given | 137 * Send a multicast DNS query for the given domain across the given |
125 * socket. | 138 * socket. |
126 * | 139 * |
127 * @param fd The file descriptor of a pre-established socket to | 140 * @param fd The file descriptor of a pre-established socket to |
128 * be used for sending the outgoing mDNS query. | 141 * be used for sending the outgoing mDNS datagram. |
129 * @param domain This is the domain name you wish to query. It should | 142 * @param domain This is the domain name you wish to query. It should |
130 * be of the format "_presence._tcp.local" for example. | 143 * be of the format "_presence._tcp.local" for example. |
131 * @return 0 if sucessful. | 144 * @return 0 if sucessful. |
132 */ | 145 */ |
133 int mdns_query(int fd, const char *domain); | 146 int mdns_query(int fd, const char *domain); |
147 | |
148 int mdns_advertise_ptr(int fd, const char *name, const char *domain); | |
134 | 149 |
135 /** | 150 /** |
136 * Read a UDP packet from the given file descriptor and parse it | 151 * Read a UDP packet from the given file descriptor and parse it |
137 * into a DNSPacket. | 152 * into a DNSPacket. |
138 * | 153 * |