X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fiface.h;h=c3f24af05a7505e4374a98111ae2642d5ab26193;hb=9c0f9c65093cfa53d45f9b68782321eb8063a032;hp=30d3d229d122d70bc82a7cc1322d8ab88076beb4;hpb=b96da7bb83742c2b3013206f57d8fd45e5c817d7;p=catta diff --git a/avahi-core/iface.h b/avahi-core/iface.h index 30d3d22..c3f24af 100644 --- a/avahi-core/iface.h +++ b/avahi-core/iface.h @@ -1,21 +1,19 @@ #ifndef fooifacehfoo #define fooifacehfoo -/* $Id$ */ - /*** This file is part of avahi. - + avahi is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + avahi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with avahi; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 @@ -47,9 +45,9 @@ typedef struct AvahiHwInterface AvahiHwInterface; #else typedef struct AvahiInterfaceMonitorOSDep AvahiInterfaceMonitorOSDep; struct AvahiInterfaceMonitorOSDep { - + unsigned query_addr_seq, query_link_seq; - + enum { LIST_IFACE, LIST_ADDR, @@ -79,7 +77,7 @@ struct AvahiHwInterface { char *name; AvahiIfIndex index; int flags_ok; - + unsigned mtu; uint8_t mac_address[AVAHI_MAC_ADDRESS_MAX]; @@ -87,6 +85,10 @@ struct AvahiHwInterface { AvahiSEntryGroup *entry_group; + /* Packet rate limiting */ + struct timeval ratelimit_begin; + unsigned ratelimit_counter; + AVAHI_LLIST_HEAD(AvahiInterface, interfaces); }; @@ -96,7 +98,7 @@ struct AvahiInterface { AVAHI_LLIST_FIELDS(AvahiInterface, interface); AVAHI_LLIST_FIELDS(AvahiInterface, by_hardware); - + AvahiProtocol protocol; int announcing; AvahiAddress local_mcast_address; @@ -125,7 +127,8 @@ struct AvahiInterfaceAddress { unsigned prefix_len; int global_scope; - + int deprecated; + AvahiSEntryGroup *entry_group; }; @@ -166,7 +169,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);