X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;ds=sidebyside;f=avahi-core%2Fiface.h;h=4106ea7b717739096d9c8fd911af437f1412d56b;hb=c7ecad8fa467b8be2b34064020e2c541c480645e;hp=14d0195acee1b6f4cf49874ab0ee0560f51d7037;hpb=55f7dcb690bcbdf6bca6568e0d9aacb2456811a5;p=catta diff --git a/avahi-core/iface.h b/avahi-core/iface.h index 14d0195..4106ea7 100644 --- a/avahi-core/iface.h +++ b/avahi-core/iface.h @@ -30,7 +30,7 @@ typedef struct AvahiHwInterface AvahiHwInterface; #include #include -#include "server.h" +#include "internal.h" #include "cache.h" #include "response-sched.h" #include "query-sched.h" @@ -45,10 +45,20 @@ typedef struct AvahiHwInterface AvahiHwInterface; #elif defined(HAVE_PF_ROUTE) #include "iface-pfroute.h" #else -#error "No network configuration notification system available" +typedef struct AvahiInterfaceMonitorOSDep AvahiInterfaceMonitorOSDep; +struct AvahiInterfaceMonitorOSDep { + + unsigned query_addr_seq, query_link_seq; + + enum { + LIST_IFACE, + LIST_ADDR, + LIST_DONE + } list; +}; #endif -#define AVAHI_MAX_MAC_ADDRESS 32 +#define AVAHI_MAC_ADDRESS_MAX 32 struct AvahiInterfaceMonitor { AvahiServer *server; @@ -72,7 +82,7 @@ struct AvahiHwInterface { unsigned mtu; - uint8_t mac_address[AVAHI_MAX_MAC_ADDRESS]; + uint8_t mac_address[AVAHI_MAC_ADDRESS_MAX]; size_t mac_address_size; AvahiSEntryGroup *entry_group; @@ -89,6 +99,8 @@ struct AvahiInterface { AvahiProtocol protocol; int announcing; + AvahiAddress local_mcast_address; + int mcast_joined; AvahiCache *cache; @@ -154,7 +166,8 @@ int avahi_interface_is_relevant(AvahiInterface *i); void avahi_interface_send_packet(AvahiInterface *i, AvahiDnsPacket *p); void avahi_interface_send_packet_unicast(AvahiInterface *i, AvahiDnsPacket *p, const AvahiAddress *a, uint16_t port); -int avahi_interface_post_query(AvahiInterface *i, AvahiKey *k, int immediately); +int avahi_interface_post_query(AvahiInterface *i, AvahiKey *k, int immediately, unsigned *ret_id); +int avahi_interface_withraw_query(AvahiInterface *i, unsigned id); int avahi_interface_post_response(AvahiInterface *i, AvahiRecord *record, int flush_cache, const AvahiAddress *querier, int immediately); int avahi_interface_post_probe(AvahiInterface *i, AvahiRecord *p, int immediately); @@ -174,4 +187,6 @@ int avahi_interface_address_is_relevant(AvahiInterfaceAddress *a); AvahiInterfaceAddress* avahi_interface_monitor_get_address(AvahiInterfaceMonitor *m, AvahiInterface *i, const AvahiAddress *raddr); +AvahiIfIndex avahi_find_interface_for_address(AvahiInterfaceMonitor *m, const AvahiAddress *a); + #endif