晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /usr/include/bind9/dns/ |
Upload File : |
/*
* 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_NCACHE_H
#define DNS_NCACHE_H 1
/*****
***** Module Info
*****/
/*! \file dns/ncache.h
*\brief
* DNS Ncache
*
* XXX TBS XXX
*
* MP:
*\li The caller must ensure any required synchronization.
*
* Reliability:
*\li No anticipated impact.
*
* Resources:
*\li TBS
*
* Security:
*\li No anticipated impact.
*
* Standards:
*\li RFC2308
*/
#include <stdbool.h>
#include <isc/lang.h>
#include <isc/stdtime.h>
#include <dns/types.h>
ISC_LANG_BEGINDECLS
/*%
* _OMITDNSSEC:
* Omit DNSSEC records when rendering.
*/
#define DNS_NCACHETOWIRE_OMITDNSSEC 0x0001
isc_result_t
dns_ncache_add(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
dns_rdatatype_t covers, isc_stdtime_t now, dns_ttl_t maxttl,
dns_rdataset_t *addedrdataset);
isc_result_t
dns_ncache_addoptout(dns_message_t *message, dns_db_t *cache,
dns_dbnode_t *node, dns_rdatatype_t covers,
isc_stdtime_t now, dns_ttl_t maxttl,
bool optout, dns_rdataset_t *addedrdataset);
/*%<
* Convert the authority data from 'message' into a negative cache
* rdataset, and store it in 'cache' at 'node' with a TTL limited to
* 'maxttl'.
*
* \li dns_ncache_add produces a negative cache entry with a trust of no
* more than answer
* \li dns_ncache_addoptout produces a negative cache entry which will have
* a trust of secure if all the records that make up the entry are secure.
*
* The 'covers' argument is the RR type whose nonexistence we are caching,
* or dns_rdatatype_any when caching a NXDOMAIN response.
*
* 'optout' indicates a DNS_RDATASETATTR_OPTOUT should be set.
*
* Note:
*\li If 'addedrdataset' is not NULL, then it will be attached to the added
* rdataset. See dns_db_addrdataset() for more details.
*
* Requires:
*\li 'message' is a valid message with a properly formatting negative cache
* authority section.
*
*\li The requirements of dns_db_addrdataset() apply to 'cache', 'node',
* 'now', and 'addedrdataset'.
*
* Returns:
*\li #ISC_R_SUCCESS
*\li #ISC_R_NOSPACE
*
*\li Any result code of dns_db_addrdataset() is a possible result code
* of dns_ncache_add().
*/
isc_result_t
dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx,
isc_buffer_t *target, unsigned int options,
unsigned int *countp);
/*%<
* Convert the negative caching rdataset 'rdataset' to wire format,
* compressing names as specified in 'cctx', and storing the result in
* 'target'. If 'omit_dnssec' is set, DNSSEC records will not
* be added to 'target'.
*
* Notes:
*\li The number of RRs added to target will be added to *countp.
*
* Requires:
*\li 'rdataset' is a valid negative caching rdataset.
*
*\li 'rdataset' is not empty.
*
*\li 'countp' is a valid pointer.
*
* Ensures:
*\li On a return of ISC_R_SUCCESS, 'target' contains a wire format
* for the data contained in 'rdataset'. Any error return leaves
* the buffer unchanged.
*
*\li *countp has been incremented by the number of RRs added to
* target.
*
* Returns:
*\li #ISC_R_SUCCESS - all ok
*\li #ISC_R_NOSPACE - 'target' doesn't have enough room
*
*\li Any error returned by dns_rdata_towire(), dns_rdataset_next(),
* dns_name_towire().
*/
isc_result_t
dns_ncache_getrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
dns_rdatatype_t type, dns_rdataset_t *rdataset);
/*%<
* Search the negative caching rdataset for an rdataset with the
* specified name and type.
*
* Requires:
*\li 'ncacherdataset' is a valid negative caching rdataset.
*
*\li 'ncacherdataset' is not empty.
*
*\li 'name' is a valid name.
*
*\li 'type' is not SIG, or a meta-RR type.
*
*\li 'rdataset' is a valid disassociated rdataset.
*
* Ensures:
*\li On a return of ISC_R_SUCCESS, 'rdataset' is bound to the found
* rdataset.
*
* Returns:
*\li #ISC_R_SUCCESS - the rdataset was found.
*\li #ISC_R_NOTFOUND - the rdataset was not found.
*
*/
isc_result_t
dns_ncache_getsigrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
dns_rdatatype_t covers, dns_rdataset_t *rdataset);
/*%<
* Similar to dns_ncache_getrdataset() but get the rrsig that matches.
*/
void
dns_ncache_current(dns_rdataset_t *ncacherdataset, dns_name_t *found,
dns_rdataset_t *rdataset);
/*%<
* Extract the current rdataset and name from a ncache entry.
*
* Requires:
* \li 'ncacherdataset' to be valid and to be a negative cache entry
* \li 'found' to be valid.
* \li 'rdataset' to be unassociated.
*/
ISC_LANG_ENDDECLS
#endif /* DNS_NCACHE_H */