X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fdns.h;h=52e8d88fa45761636ecf9c2a8fa8117929969fab;hb=9c0f9c65093cfa53d45f9b68782321eb8063a032;hp=4696e00d66cb46d56c692b76f291404cff24528e;hpb=943a6b93697fc0a7bcd0cc574744d7de609c189c;p=catta diff --git a/avahi-core/dns.h b/avahi-core/dns.h index 4696e00..52e8d88 100644 --- a/avahi-core/dns.h +++ b/avahi-core/dns.h @@ -1,21 +1,19 @@ #ifndef foodnshfoo #define foodnshfoo -/* $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 @@ -25,9 +23,11 @@ #include "rr.h" #include "hashmap.h" -#define AVAHI_DNS_PACKET_SIZE_MAX 9000 #define AVAHI_DNS_PACKET_HEADER_SIZE 12 #define AVAHI_DNS_PACKET_EXTRA_SIZE 48 +#define AVAHI_DNS_LABELS_MAX 127 +#define AVAHI_DNS_RDATA_MAX 0xFFFF +#define AVAHI_DNS_PACKET_SIZE_MAX (AVAHI_DNS_PACKET_HEADER_SIZE + 256 + 2 + 2 + 4 + 2 + AVAHI_DNS_RDATA_MAX) typedef struct AvahiDnsPacket { size_t size, rindex, max_size; @@ -50,6 +50,8 @@ void avahi_dns_packet_inc_field(AvahiDnsPacket *p, unsigned idx); uint8_t *avahi_dns_packet_extend(AvahiDnsPacket *p, size_t l); +void avahi_dns_packet_cleanup_name_table(AvahiDnsPacket *p); + uint8_t *avahi_dns_packet_append_uint16(AvahiDnsPacket *p, uint16_t v); uint8_t *avahi_dns_packet_append_uint32(AvahiDnsPacket *p, uint32_t v); uint8_t *avahi_dns_packet_append_name(AvahiDnsPacket *p, const char *name); @@ -105,7 +107,5 @@ size_t avahi_dns_packet_space(AvahiDnsPacket *p); #define AVAHI_MDNS_SUFFIX_ADDR_IPV4 "254.169.in-addr.arpa" #define AVAHI_MDNS_SUFFIX_ADDR_IPV6 "0.8.e.f.ip6.arpa" -#define AVAHI_DNS_RDATA_MAX 65535 - #endif