GRAYBYTE WORDPRESS FILE MANAGER1637

Server IP : 68.65.123.43 / Your IP : 216.73.216.162
System : Linux server266.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/include/bind9/dns/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/include/bind9/dns//compress.h
/*
 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
 *
 * See the COPYRIGHT file distributed with this work for additional
 * information regarding copyright ownership.
 */

#ifndef DNS_COMPRESS_H
#define DNS_COMPRESS_H 1

#include <inttypes.h>
#include <stdbool.h>

#include <isc/lang.h>
#include <isc/region.h>

#include <dns/types.h>

ISC_LANG_BEGINDECLS

/*! \file dns/compress.h
 * Direct manipulation of the structures is strongly discouraged.
 *
 * A name compression context handles compression of multiple DNS names
 * in relation to a single DNS message. The context can be used to
 * selectively turn on/off compression for specific names (depending on
 * the RR type) by using \c dns_compress_setmethods(). Alternately,
 * compression can be disabled completely using \c
 * dns_compress_disable().
 *
 * \c dns_compress_setmethods() is intended for use by RDATA towire()
 * implementations, whereas \c dns_compress_disable() is intended to be
 * used by a nameserver's configuration manager.
 */

#define DNS_COMPRESS_NONE		0x00	/*%< no compression */
#define DNS_COMPRESS_GLOBAL14		0x01	/*%< "normal" compression. */
#define DNS_COMPRESS_ALL		0x01	/*%< all compression. */
#define DNS_COMPRESS_CASESENSITIVE	0x02	/*%< case sensitive compression. */
#define DNS_COMPRESS_ENABLED		0x04

#define DNS_COMPRESS_READY		0x80000000

#define DNS_COMPRESS_TABLESIZE 64
#define DNS_COMPRESS_INITIALNODES 16

typedef struct dns_compressnode dns_compressnode_t;

struct dns_compressnode {
	isc_region_t		r;
	uint16_t		offset;
	uint16_t		count;
	uint8_t			labels;
	dns_compressnode_t	*next;
};

struct dns_compress {
	unsigned int		magic;		/*%< Magic number. */
	unsigned int		allowed;	/*%< Allowed methods. */
	int			edns;		/*%< Edns version or -1. */
	/*% Global compression table. */
	dns_compressnode_t	*table[DNS_COMPRESS_TABLESIZE];
	/*% Preallocated nodes for the table. */
	dns_compressnode_t	initialnodes[DNS_COMPRESS_INITIALNODES];
	uint16_t		count;		/*%< Number of nodes. */
	isc_mem_t		*mctx;		/*%< Memory context. */
};

typedef enum {
	DNS_DECOMPRESS_ANY,			/*%< Any compression */
	DNS_DECOMPRESS_STRICT,			/*%< Allowed compression */
	DNS_DECOMPRESS_NONE			/*%< No compression */
} dns_decompresstype_t;

struct dns_decompress {
	unsigned int		magic;		/*%< Magic number. */
	unsigned int		allowed;	/*%< Allowed methods. */
	int			edns;		/*%< Edns version or -1. */
	dns_decompresstype_t	type;		/*%< Strict checking */
};

isc_result_t
dns_compress_init(dns_compress_t *cctx, int edns, isc_mem_t *mctx);
/*%<
 *	Initialise the compression context structure pointed to by
 *	'cctx'. A freshly initialized context has name compression
 *	enabled, but no methods are set. Please use \c
 *	dns_compress_setmethods() to set a compression method.
 *
 *	Requires:
 *	\li	'cctx' is a valid dns_compress_t structure.
 *	\li	'mctx' is an initialized memory context.
 *	Ensures:
 *	\li	cctx->global is initialized.
 *
 *	Returns:
 *	\li	#ISC_R_SUCCESS
 */

void
dns_compress_invalidate(dns_compress_t *cctx);

/*%<
 *	Invalidate the compression structure pointed to by cctx.
 *
 *	Requires:
 *\li		'cctx' to be initialized.
 */

void
dns_compress_setmethods(dns_compress_t *cctx, unsigned int allowed);

/*%<
 *	Sets allowed compression methods.
 *
 *	Requires:
 *\li		'cctx' to be initialized.
 */

unsigned int
dns_compress_getmethods(dns_compress_t *cctx);

/*%<
 *	Gets allowed compression methods.
 *
 *	Requires:
 *\li		'cctx' to be initialized.
 *
 *	Returns:
 *\li		allowed compression bitmap.
 */

void
dns_compress_disable(dns_compress_t *cctx);
/*%<
 *	Disables all name compression in the context. Once disabled,
 *	name compression cannot currently be re-enabled.
 *
 *	Requires:
 *\li		'cctx' to be initialized.
 *
 */

void
dns_compress_setsensitive(dns_compress_t *cctx, bool sensitive);

/*
 *	Preserve the case of compressed domain names.
 *
 *	Requires:
 *		'cctx' to be initialized.
 */

bool
dns_compress_getsensitive(dns_compress_t *cctx);
/*
 *	Return whether case is to be preserved when compressing
 *	domain names.
 *
 *	Requires:
 *		'cctx' to be initialized.
 */

int
dns_compress_getedns(dns_compress_t *cctx);

/*%<
 *	Gets edns value.
 *
 *	Requires:
 *\li		'cctx' to be initialized.
 *
 *	Returns:
 *\li		-1 .. 255
 */

bool
dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
			dns_name_t *prefix, uint16_t *offset);
/*%<
 *	Finds longest possible match of 'name' in the global compression table.
 *
 *	Requires:
 *\li		'cctx' to be initialized.
 *\li		'name' to be a absolute name.
 *\li		'prefix' to be initialized.
 *\li		'offset' to point to an uint16_t.
 *
 *	Ensures:
 *\li		'prefix' and 'offset' are valid if true is 	returned.
 *
 *	Returns:
 *\li		#true / #false
 */

void
dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
		 const dns_name_t *prefix, uint16_t offset);
/*%<
 *	Add compression pointers for 'name' to the compression table,
 *	not replacing existing pointers.
 *
 *	Requires:
 *\li		'cctx' initialized
 *
 *\li		'name' must be initialized and absolute, and must remain
 *		valid until the message compression is complete.
 *
 *\li		'prefix' must be a prefix returned by
 *		dns_compress_findglobal(), or the same as 'name'.
 */

void
dns_compress_rollback(dns_compress_t *cctx, uint16_t offset);

/*%<
 *	Remove any compression pointers from global table >= offset.
 *
 *	Requires:
 *\li		'cctx' is initialized.
 */

void
dns_decompress_init(dns_decompress_t *dctx, int edns,
		    dns_decompresstype_t type);

/*%<
 *	Initializes 'dctx'.
 *	Records 'edns' and 'type' into the structure.
 *
 *	Requires:
 *\li		'dctx' to be a valid pointer.
 */

void
dns_decompress_invalidate(dns_decompress_t *dctx);

/*%<
 *	Invalidates 'dctx'.
 *
 *	Requires:
 *\li		'dctx' to be initialized
 */

void
dns_decompress_setmethods(dns_decompress_t *dctx, unsigned int allowed);

/*%<
 *	Sets 'dctx->allowed' to 'allowed'.
 *
 *	Requires:
 *\li		'dctx' to be initialized
 */

unsigned int
dns_decompress_getmethods(dns_decompress_t *dctx);

/*%<
 *	Returns 'dctx->allowed'
 *
 *	Requires:
 *\li		'dctx' to be initialized
 */

int
dns_decompress_edns(dns_decompress_t *dctx);

/*%<
 *	Returns 'dctx->edns'
 *
 *	Requires:
 *\li		'dctx' to be initialized
 */

dns_decompresstype_t
dns_decompress_type(dns_decompress_t *dctx);

/*%<
 *	Returns 'dctx->type'
 *
 *	Requires:
 *\li		'dctx' to be initialized
 */

ISC_LANG_ENDDECLS

#endif /* DNS_COMPRESS_H */

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
February 21 2025 04:13:15
root / root
0755
acache.h
13.898 KB
February 20 2025 09:05:25
root / root
0644
acl.h
7.072 KB
February 20 2025 09:05:25
root / root
0644
adb.h
22.065 KB
February 20 2025 09:05:25
root / root
0644
badcache.h
3.29 KB
February 20 2025 09:05:25
root / root
0644
bit.h
0.788 KB
February 20 2025 09:05:25
root / root
0644
byaddr.h
3.908 KB
February 20 2025 09:05:25
root / root
0644
cache.h
8.44 KB
February 20 2025 09:05:25
root / root
0644
callbacks.h
2.218 KB
February 20 2025 09:05:25
root / root
0644
catz.h
11.556 KB
February 20 2025 09:05:25
root / root
0644
cert.h
1.432 KB
February 20 2025 09:05:25
root / root
0644
client.h
21.525 KB
February 20 2025 09:05:25
root / root
0644
clientinfo.h
1.959 KB
February 20 2025 09:05:25
root / root
0644
compress.h
6.49 KB
February 20 2025 09:05:25
root / root
0644
db.h
45.476 KB
February 20 2025 09:05:25
root / root
0644
dbiterator.h
7.248 KB
February 20 2025 09:05:25
root / root
0644
dbtable.h
3.091 KB
February 20 2025 09:05:25
root / root
0644
diff.h
6.816 KB
February 20 2025 09:05:25
root / root
0644
dispatch.h
16.042 KB
February 20 2025 09:05:25
root / root
0644
dlz.h
10.369 KB
February 20 2025 09:05:25
root / root
0644
dlz_dlopen.h
4.567 KB
February 20 2025 09:05:25
root / root
0644
dns64.h
5.503 KB
February 20 2025 09:05:25
root / root
0644
dnssec.h
11.831 KB
February 20 2025 09:05:25
root / root
0644
dnstap.h
9.145 KB
February 20 2025 09:05:25
root / root
0644
ds.h
1.196 KB
February 20 2025 09:05:25
root / root
0644
dsdigest.h
1.682 KB
February 20 2025 09:05:25
root / root
0644
dyndb.h
4.722 KB
February 20 2025 09:05:25
root / root
0644
ecdb.h
0.79 KB
February 20 2025 09:05:25
root / root
0644
edns.h
0.705 KB
February 20 2025 09:05:25
root / root
0644
enumclass.h
1.191 KB
February 20 2025 09:05:25
root / root
0644
enumtype.h
8.105 KB
February 20 2025 09:05:25
root / root
0644
events.h
3.964 KB
February 20 2025 09:05:25
root / root
0644
fixedname.h
1.624 KB
February 20 2025 09:05:25
root / root
0644
forward.h
3.371 KB
February 20 2025 09:05:25
root / root
0644
geoip.h
2.727 KB
February 20 2025 09:05:25
root / root
0644
ipkeylist.h
2.135 KB
February 20 2025 09:05:25
root / root
0644
iptable.h
1.583 KB
February 20 2025 09:05:25
root / root
0644
journal.h
8.034 KB
February 20 2025 09:05:25
root / root
0644
keydata.h
1.034 KB
February 20 2025 09:05:25
root / root
0644
keyflags.h
1.248 KB
February 20 2025 09:05:25
root / root
0644
keytable.h
9.24 KB
February 20 2025 09:05:25
root / root
0644
keyvalues.h
4.062 KB
February 20 2025 09:05:25
root / root
0644
lib.h
1.164 KB
February 20 2025 09:05:25
root / root
0644
log.h
3.871 KB
February 20 2025 09:05:25
root / root
0644
lookup.h
2.855 KB
February 20 2025 09:05:25
root / root
0644
master.h
11.024 KB
February 20 2025 09:05:25
root / root
0644
masterdump.h
12.351 KB
February 20 2025 09:05:25
root / root
0644
message.h
37.922 KB
February 20 2025 09:05:25
root / root
0644
name.h
36.245 KB
February 20 2025 09:05:25
root / root
0644
ncache.h
4.813 KB
February 20 2025 09:05:25
root / root
0644
nsec.h
2.859 KB
February 20 2025 09:05:25
root / root
0644
nsec3.h
7.844 KB
February 20 2025 09:05:25
root / root
0644
nta.h
4.441 KB
February 20 2025 09:05:25
root / root
0644
opcode.h
0.983 KB
February 20 2025 09:05:25
root / root
0644
order.h
1.952 KB
February 20 2025 09:05:25
root / root
0644
peer.h
5.826 KB
February 20 2025 09:05:25
root / root
0644
portlist.h
2.052 KB
February 20 2025 09:05:25
root / root
0644
private.h
1.89 KB
February 20 2025 09:05:25
root / root
0644
rbt.h
39.666 KB
February 20 2025 09:05:25
root / root
0644
rcode.h
2.423 KB
February 20 2025 09:05:25
root / root
0644
rdata.h
21.106 KB
February 20 2025 09:05:25
root / root
0644
rdataclass.h
2.204 KB
February 20 2025 09:05:25
root / root
0644
rdatalist.h
2.509 KB
February 20 2025 09:05:25
root / root
0644
rdataset.h
21.031 KB
February 20 2025 09:05:25
root / root
0644
rdatasetiter.h
3.834 KB
February 20 2025 09:05:25
root / root
0644
rdataslab.h
4.281 KB
February 20 2025 09:05:25
root / root
0644
rdatastruct.h
60.141 KB
February 20 2025 09:05:25
root / root
0644
rdatatype.h
2.244 KB
February 20 2025 09:05:25
root / root
0644
request.h
10.895 KB
February 20 2025 09:05:25
root / root
0644
resolver.h
19.753 KB
February 20 2025 09:05:25
root / root
0644
result.h
9.066 KB
February 20 2025 09:05:25
root / root
0644
rootns.h
0.871 KB
February 20 2025 09:05:25
root / root
0644
rpz.h
10.093 KB
February 20 2025 09:05:25
root / root
0644
rriterator.h
4.131 KB
February 20 2025 09:05:25
root / root
0644
rrl.h
6.484 KB
February 20 2025 09:05:25
root / root
0644
sdb.h
7.055 KB
February 20 2025 09:05:25
root / root
0644
sdlz.h
13.881 KB
February 20 2025 09:05:25
root / root
0644
secalg.h
1.666 KB
February 20 2025 09:05:25
root / root
0644
secproto.h
1.521 KB
February 20 2025 09:05:25
root / root
0644
soa.h
2.135 KB
February 20 2025 09:05:25
root / root
0644
ssu.h
8.113 KB
February 20 2025 09:05:25
root / root
0644
stats.h
13.136 KB
February 20 2025 09:05:25
root / root
0644
tcpmsg.h
3.071 KB
February 20 2025 09:05:25
root / root
0644
time.h
1.655 KB
February 20 2025 09:05:25
root / root
0644
timer.h
1.026 KB
February 20 2025 09:05:25
root / root
0644
tkey.h
7.452 KB
February 20 2025 09:05:25
root / root
0644
tsec.h
2.88 KB
February 20 2025 09:05:25
root / root
0644
tsig.h
8.188 KB
February 20 2025 09:05:25
root / root
0644
ttl.h
1.899 KB
February 20 2025 09:05:25
root / root
0644
types.h
13.826 KB
February 20 2025 09:05:25
root / root
0644
update.h
1.614 KB
February 20 2025 09:05:25
root / root
0644
validator.h
6.993 KB
February 20 2025 09:05:25
root / root
0644
version.h
0.848 KB
February 20 2025 09:05:25
root / root
0644
view.h
34.447 KB
February 20 2025 09:05:25
root / root
0644
xfrin.h
2.855 KB
February 20 2025 09:05:25
root / root
0644
zone.h
59.438 KB
February 20 2025 09:05:25
root / root
0644
zonekey.h
0.759 KB
February 20 2025 09:05:25
root / root
0644
zt.h
5.432 KB
February 20 2025 09:05:25
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF