1 /* 2 Copyright 2021 Northern.tech AS 3 4 This file is part of CFEngine 3 - written and maintained by Northern.tech AS. 5 6 This program is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License as published by the 8 Free Software Foundation; version 3. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 18 19 To the extent this program is licensed as part of the Enterprise 20 versions of CFEngine, the applicable Commercial Open Source License 21 (COSL) may apply to this file if you as a licensee so wish it. See 22 included file COSL.txt. 23 */ 24 25 #ifndef CFENGINE_FINDHUB_PRIV_H 26 #define CFENGINE_FINDHUB_PRIV_H 27 28 #include <load_avahi.h> 29 #include <list.h> 30 31 AvahiSimplePoll *spoll; 32 33 typedef struct 34 { 35 char Hostname[4096]; 36 char IPAddress[AVAHI_ADDRESS_STR_MAX]; 37 uint16_t Port; 38 } HostProperties; 39 40 void resolve_callback(AvahiServiceResolver *r, 41 AvahiIfIndex interface, 42 AvahiProtocol protocol, 43 AvahiResolverEvent event, 44 const char *name, 45 const char *type, 46 const char *domain, 47 const char *host_name, 48 const AvahiAddress *address, 49 uint16_t port, 50 AvahiStringList *txt, 51 AvahiLookupFlags flags, 52 void* userdata); 53 54 void browse_callback(AvahiServiceBrowser *b, 55 AvahiIfIndex interface, 56 AvahiProtocol protocol, 57 AvahiBrowserEvent event, 58 const char *name, 59 const char *type, 60 const char *domain, 61 AvahiLookupResultFlags flags, 62 void *userdata); 63 64 void client_callback(AvahiClient *c, 65 AvahiClientState state, 66 void *userdata); 67 #endif 68