mDNS based Zeroconf support More...
#include <poll.h>#include <pthread.h>#include <time.h>#include <unistd.h>#include <atalk/logger.h>#include <atalk/netatalk_conf.h>#include <atalk/unicode.h>#include <atalk/util.h>#include "afp_mdns.h"#include "afp_zeroconf.h"Functions | |
| int | TXTRecordPrintf (TXTRecordRef *rec, const char *key, const char *fmt,...) |
| int | TXTRecordKeyPrintf (TXTRecordRef *rec, const char *key_fmt, int key_var, const char *fmt,...) |
| static void * | polling_thread (void *arg) |
| static void | RegisterReply (DNSServiceRef sdRef, DNSServiceFlags flags, DNSServiceErrorType errorCode, const char *name, const char *regtype, const char *domain, void *context) |
| This is the callback for the service register function. | |
| static void | unregister_stuff (void) |
| static void | register_stuff (const AFPObj *obj) |
| void | md_zeroconf_register (const AFPObj *obj) |
| int | md_zeroconf_unregister (void) |
| Tries to shutdown this loop impl. | |
Variables | |
| static DNSServiceRef * | svc_refs = NULL |
| static int | svc_ref_count = 0 |
| static pthread_t | poller |
| static struct pollfd * | fds |
mDNS based Zeroconf support
| void md_zeroconf_register | ( | const AFPObj * | obj | ) |
Tries to setup the Zeroconf thread and any neccessary config setting.
| int md_zeroconf_unregister | ( | void | ) |
Tries to shutdown this loop impl.
|
static |
This is the thread that polls the filehandles
|
static |
This function tries to register the AFP DNS SRV service type.
|
static |
This is the callback for the service register function.
| int TXTRecordKeyPrintf | ( | TXTRecordRef * | rec, |
| const char * | key_fmt, | ||
| int | key_var, | ||
| const char * | fmt, | ||
| ... ) |
| int TXTRecordPrintf | ( | TXTRecordRef * | rec, |
| const char * | key, | ||
| const char * | fmt, | ||
| ... ) |
|
static |
This function unregisters anything we have already registered and frees associated memory
|
static |
|
static |
|
static |
|
static |