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"
|
| 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.
|
◆ md_zeroconf_register()
| void md_zeroconf_register |
( |
const AFPObj * | obj | ) |
|
Tries to setup the Zeroconf thread and any neccessary config setting.
◆ md_zeroconf_unregister()
| int md_zeroconf_unregister |
( |
void | | ) |
|
Tries to shutdown this loop impl.
- Note
- Call this function from inside this thread.
◆ polling_thread()
| void * polling_thread |
( |
void * | arg | ) |
|
|
static |
This is the thread that polls the filehandles
◆ register_stuff()
| void register_stuff |
( |
const AFPObj * | obj | ) |
|
|
static |
This function tries to register the AFP DNS SRV service type.
◆ RegisterReply()
| void RegisterReply |
( |
DNSServiceRef | sdRef, |
|
|
DNSServiceFlags | flags, |
|
|
DNSServiceErrorType | errorCode, |
|
|
const char * | name, |
|
|
const char * | regtype, |
|
|
const char * | domain, |
|
|
void * | context ) |
|
static |
This is the callback for the service register function.
- Note
- actually there isn't a lot we can do if we get problems, so we don't really need to do anything other than report the issue.
◆ TXTRecordKeyPrintf()
| int TXTRecordKeyPrintf |
( |
TXTRecordRef * | rec, |
|
|
const char * | key_fmt, |
|
|
int | key_var, |
|
|
const char * | fmt, |
|
|
| ... ) |
◆ TXTRecordPrintf()
| int TXTRecordPrintf |
( |
TXTRecordRef * | rec, |
|
|
const char * | key, |
|
|
const char * | fmt, |
|
|
| ... ) |
◆ unregister_stuff()
| void unregister_stuff |
( |
void | | ) |
|
|
static |
This function unregisters anything we have already registered and frees associated memory
◆ fds
◆ poller
◆ svc_ref_count
◆ svc_refs
| DNSServiceRef* svc_refs = NULL |
|
static |