compress.h revision dafcb997e390efa4423883dafd100c975c4095d6
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Copyright (C) 1999-2002 Internet Software Consortium.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Permission to use, copy, modify, and distribute this software for any
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * purpose with or without fee is hereby granted, provided that the above
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * copyright notice and this permission notice appear in all copies.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/* $Id: compress.h,v 1.32 2004/03/05 05:09:41 marka Exp $ */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#ifndef DNS_COMPRESS_H
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#define DNS_COMPRESS_H 1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#include <isc/lang.h>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#include <isc/region.h>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#include <dns/types.h>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsISC_LANG_BEGINDECLS
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#define DNS_COMPRESS_NONE 0x00 /* no compression */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#define DNS_COMPRESS_GLOBAL14 0x01 /* "normal" compression. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#define DNS_COMPRESS_ALL 0x01 /* all compression. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Direct manipulation of the structures is strongly discouraged.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#define DNS_COMPRESS_TABLESIZE 64
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#define DNS_COMPRESS_INITIALNODES 16
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewstypedef struct dns_compressnode dns_compressnode_t;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsstruct dns_compressnode {
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews isc_region_t r;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews isc_uint16_t offset;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews isc_uint16_t count;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews isc_uint8_t labels;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dns_compressnode_t *next;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews};
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsstruct dns_compress {
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews unsigned int magic; /* Magic number. */
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews unsigned int allowed; /* Allowed methods. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews int edns; /* Edns version or -1. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /* Global compression table. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dns_compressnode_t *table[DNS_COMPRESS_TABLESIZE];
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /* Preallocated nodes for the table. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dns_compressnode_t initialnodes[DNS_COMPRESS_INITIALNODES];
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews isc_uint16_t count; /* Number of nodes. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews isc_mem_t *mctx; /* Memory context. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews};
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewstypedef enum {
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews DNS_DECOMPRESS_ANY, /* Any compression */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews DNS_DECOMPRESS_STRICT, /* Allowed compression */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews DNS_DECOMPRESS_NONE /* No compression */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews} dns_decompresstype_t;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsstruct dns_decompress {
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews unsigned int magic; /* Magic number. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews unsigned int allowed; /* Allowed methods. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews int edns; /* Edns version or -1. */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dns_decompresstype_t type; /* Strict checking */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews};
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsisc_result_t
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_compress_init(dns_compress_t *cctx, int edns, isc_mem_t *mctx);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Inialise the compression context structure pointed to by 'cctx'.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'cctx' is a valid dns_compress_t structure.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'mctx' is an initialized memory context.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Ensures:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * cctx->global is initialized.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Returns:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * ISC_R_SUCCESS
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * failures from dns_rbt_create()
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsvoid
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_compress_invalidate(dns_compress_t *cctx);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Invalidate the compression structure pointed to by cctx.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'cctx' to be initialized.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsvoid
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_compress_setmethods(dns_compress_t *cctx, unsigned int allowed);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Sets allowed compression methods.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'cctx' to be initialized.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsunsigned int
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_compress_getmethods(dns_compress_t *cctx);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Gets allowed compression methods.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'cctx' to be initialized.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Returns:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * allowed compression bitmap.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsint
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_compress_getedns(dns_compress_t *cctx);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Gets edns value.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'cctx' to be initialized.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Returns:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * -1 .. 255
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsisc_boolean_t
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dns_name_t *prefix, isc_uint16_t *offset);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Finds longest possible match of 'name' in the global compression table.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'cctx' to be initialized.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'name' to be a absolute name.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'prefix' to be initialized.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'offset' to point to an isc_uint16_t.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Ensures:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'prefix' and 'offset' are valid if ISC_TRUE is returned.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Returns:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * ISC_TRUE / ISC_FALSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsvoid
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_compress_add(dns_compress_t *cctx, dns_name_t *name, dns_name_t *prefix,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews isc_uint16_t offset);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Add compression pointers for 'name' to the compression table,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * not replacing existing pointers.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'cctx' initialized
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'name' must be initialized and absolute, and must remain
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * valid until the message compression is complete.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'prefix' must be a prefix returned by
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * dns_compress_findglobal(), or the same as 'name'.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsvoid
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_compress_rollback(dns_compress_t *cctx, isc_uint16_t offset);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Remove any compression pointers from global table >= offset.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'cctx' is initialized.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsvoid
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_decompress_init(dns_decompress_t *dctx, int edns,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dns_decompresstype_t type);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Initializes 'dctx'.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Records 'edns' and 'type' into the structure.
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews *
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews * Requires:
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews * 'dctx' to be a valid pointer.
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews */
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrewsvoid
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_decompress_invalidate(dns_decompress_t *dctx);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Invalidates 'dctx'.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'dctx' to be initialized
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrewsvoid
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrewsdns_decompress_setmethods(dns_decompress_t *dctx, unsigned int allowed);
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews/*
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews * Sets 'dctx->allowed' to 'allowed'.
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews *
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews * Requires:
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews * 'dctx' to be initialized
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews */
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrewsunsigned int
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrewsdns_decompress_getmethods(dns_decompress_t *dctx);
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Returns 'dctx->allowed'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'dctx' to be initialized
057cafaa3df7be7a6dcca71fbaf8fb498fd83518Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsint
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_decompress_edns(dns_decompress_t *dctx);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Returns 'dctx->edns'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'dctx' to be initialized
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_decompresstype_t
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdns_decompress_type(dns_decompress_t *dctx);
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews/*
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Returns 'dctx->type'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews *
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * Requires:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews * 'dctx' to be initialized
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews */
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsISC_LANG_ENDDECLS
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#endif /* DNS_COMPRESS_H */