]> arthur.barton.de Git - netatalk.git/blob - etc/netatalk/afp_avahi.h
netatalk: fix a crash on Solaris when registering with mDNS
[netatalk.git] / etc / netatalk / afp_avahi.h
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */
2 /*
3  * Author:  Daniel S. Haischt <me@daniel.stefan.haischt.name>
4  * Purpose: Avahi based Zeroconf support
5  * Docs:    http://avahi.org/download/doxygen/
6  *
7  */
8
9 #ifndef AFPD_AVAHI_H
10 #define AFPD_AVAHI_H
11
12 #include <stdlib.h>
13 #include <assert.h>
14 #include <string.h>
15
16 #include <avahi-client/client.h>
17 #include <avahi-client/publish.h>
18 #include <avahi-common/alternative.h>
19 #include <avahi-common/thread-watch.h>
20 #include <avahi-common/malloc.h>
21 #include <avahi-common/error.h>
22
23 #include <atalk/logger.h>
24
25 struct context {
26         /* Avahi stuff */
27   int               thread_running;
28   AvahiThreadedPoll *threaded_poll;
29   AvahiClient       *client;
30   AvahiEntryGroup   *group;
31         /* Netatalk stuff */
32         const AFPObj      *obj;
33 };
34
35 /* prototype definitions */
36 void av_zeroconf_register(const AFPObj *obj);
37 int av_zeroconf_unregister(void);
38
39 #endif   /* AFPD_AVAHI_H */