1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581 |
- ///////////////
- ///////////////
- /////////////// THIS FILE IS AUTOMATICALLY GENERATED BY gen-rdatacode.py.
- /////////////// DO NOT EDIT!
- ///////////////
- ///////////////
- #ifndef DNS_RDATACLASS_H
- #define DNS_RDATACLASS_H 1
- #include <dns/master_loader.h>
- namespace isc {
- namespace dns {
- class Name;
- class MasterLexer;
- class MasterLoaderCallbacks;
- }
- }
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef ANY_TSIG_250_H
- #define ANY_TSIG_250_H 1
- #include <stdint.h>
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace any {
- struct TSIGImpl;
- /// \brief \c rdata::TSIG class represents the TSIG RDATA as defined %in
- /// RFC2845.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class, and provides trivial accessors specific to the
- /// TSIG RDATA.
- class TSIG : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit TSIG(const std::string& type_str);
- TSIG(isc::util::InputBuffer& buffer, size_t rdata_len);
- TSIG(const TSIG& other);
- TSIG(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- /// \brief Constructor from RDATA field parameters.
- ///
- /// The parameters are a straightforward mapping of %TSIG RDATA
- /// fields as defined %in RFC2845, but there are some implementation
- /// specific notes as follows.
- ///
- /// \c algorithm is a \c Name object that specifies the algorithm.
- /// For example, if the algorithm is HMAC-SHA256, \c algorithm would be
- /// \c Name("hmac-sha256").
- ///
- /// \c time_signed corresponds to the Time Signed field, which is of
- /// 48-bit unsigned integer type, and therefore cannot exceed 2^48-1;
- /// otherwise, an exception of type \c OutOfRange will be thrown.
- ///
- /// \c mac_size and \c mac correspond to the MAC Size and MAC fields,
- /// respectively. When the MAC field is empty, \c mac must be NULL.
- /// \c mac_size and \c mac must be consistent %in that \c mac_size is 0 if
- /// and only if \c mac is NULL; otherwise an exception of type
- /// InvalidParameter will be thrown.
- ///
- /// The same restriction applies to \c other_len and \c other_data,
- /// which correspond to the Other Len and Other Data fields, respectively.
- ///
- /// This constructor internally involves resource allocation, and if
- /// it fails, a corresponding standard exception will be thrown.
- TSIG(const Name& algorithm, uint64_t time_signed, uint16_t fudge,
- uint16_t mac_size, const void* mac, uint16_t original_id,
- uint16_t error, uint16_t other_len, const void* other_data);
- /// \brief Assignment operator.
- ///
- /// It internally allocates a resource, and if it fails a corresponding
- /// standard exception will be thrown.
- /// This operator never throws an exception otherwise.
- ///
- /// This operator provides the strong exception guarantee: When an
- /// exception is thrown the content of the assignment target will be
- /// intact.
- TSIG& operator=(const TSIG& source);
- /// \brief The destructor.
- ~TSIG();
- /// \brief Return the algorithm name.
- ///
- /// This method never throws an exception.
- const Name& getAlgorithm() const;
- /// \brief Return the value of the Time Signed field.
- ///
- /// The returned value does not exceed 2^48-1.
- ///
- /// This method never throws an exception.
- uint64_t getTimeSigned() const;
- /// \brief Return the value of the Fudge field.
- ///
- /// This method never throws an exception.
- uint16_t getFudge() const;
- /// \brief Return the value of the MAC Size field.
- ///
- /// This method never throws an exception.
- uint16_t getMACSize() const;
- /// \brief Return the value of the MAC field.
- ///
- /// If the MAC field is empty, it returns NULL.
- /// Otherwise, the memory region beginning at the address returned by
- /// this method is valid up to the bytes specified by the return value
- /// of \c getMACSize().
- /// The memory region is only valid while the corresponding \c TSIG
- /// object is valid. The caller must hold the \c TSIG object while
- /// it needs to refer to the region or it must make a local copy of the
- /// region.
- ///
- /// This method never throws an exception.
- const void* getMAC() const;
- /// \brief Return the value of the Original ID field.
- ///
- /// This method never throws an exception.
- uint16_t getOriginalID() const;
- /// \brief Return the value of the Error field.
- ///
- /// This method never throws an exception.
- uint16_t getError() const;
- /// \brief Return the value of the Other Len field.
- ///
- /// This method never throws an exception.
- uint16_t getOtherLen() const;
- /// \brief Return the value of the Other Data field.
- ///
- /// The same note as \c getMAC() applies.
- ///
- /// This method never throws an exception.
- const void* getOtherData() const;
- private:
- TSIGImpl* constructFromLexer(MasterLexer& lexer, const Name* origin);
- TSIGImpl* impl_;
- };
- } // end of namespace "any"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // ANY_TSIG_250_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef CH_A_1_H
- #define CH_A_1_H 1
- #include <string>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace ch {
- class A : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit A(const std::string& type_str);
- A(isc::util::InputBuffer& buffer, size_t rdata_len);
- A(const A& other);
- A(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- };
- } // end of namespace "ch"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // CH_A_1_H
- // Copyright (C) 2011-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_AFSDB_18_H
- #define GENERIC_AFSDB_18_H 1
- #include <stdint.h>
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- /// \brief \c rdata::AFSDB class represents the AFSDB RDATA as defined %in
- /// RFC1183.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class, and provides trivial accessors specific to the
- /// AFSDB RDATA.
- class AFSDB : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit AFSDB(const std::string& type_str);
- AFSDB(isc::util::InputBuffer& buffer, size_t rdata_len);
- AFSDB(const AFSDB& other);
- AFSDB(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- /// \brief Assignment operator.
- ///
- /// This method never throws an exception.
- AFSDB& operator=(const AFSDB& source);
- ///
- /// Specialized methods
- ///
- /// \brief Return the value of the server field.
- ///
- /// \return A reference to a \c Name class object corresponding to the
- /// internal server name.
- ///
- /// This method never throws an exception.
- const Name& getServer() const;
- /// \brief Return the value of the subtype field.
- ///
- /// This method never throws an exception.
- uint16_t getSubtype() const;
- private:
- void createFromLexer(MasterLexer& lexer, const Name* origin);
- uint16_t subtype_;
- Name server_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_AFSDB_18_H
- // Copyright (C) 2014-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_CAA_257_H
- #define GENERIC_CAA_257_H 1
- #include <stdint.h>
- #include <dns/name.h>
- #include <dns/rdata.h>
- #include <string>
- #include <vector>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- struct CAAImpl;
- class CAA : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit CAA(const std::string& caa_str);
- CAA(isc::util::InputBuffer& buffer, size_t rdata_len);
- CAA(const CAA& other);
- CAA(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- CAA(uint8_t flags, const std::string& tag, const std::string& value);
- CAA& operator=(const CAA& source);
- ~CAA();
- ///
- /// Specialized methods
- ///
- /// \brief Return the Flags field of the CAA RDATA.
- uint8_t getFlags() const;
- /// \brief Return the Tag field of the CAA RDATA.
- const std::string& getTag() const;
- /// \brief Return the Value field of the CAA RDATA.
- ///
- /// Note: The const reference which is returned is valid only during
- /// the lifetime of this \c generic::CAA object. It should not be
- /// used afterwards.
- const std::vector<uint8_t>& getValue() const;
- private:
- CAAImpl* constructFromLexer(MasterLexer& lexer);
- CAAImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_CAA_257_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_CNAME_5_H
- #define GENERIC_CNAME_5_H 1
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- class CNAME : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit CNAME(const std::string& type_str);
- CNAME(isc::util::InputBuffer& buffer, size_t rdata_len);
- CNAME(const CNAME& other);
- CNAME(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- // CNAME specific methods
- CNAME(const Name& cname);
- const Name& getCname() const;
- private:
- Name cname_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_CNAME_5_H
- // Copyright (C) 2011-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_DLV_32769_H
- #define GENERIC_DLV_32769_H 1
- #include <stdint.h>
- #include <string>
- #include <dns/name.h>
- #include <dns/rrtype.h>
- #include <dns/rrttl.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- namespace detail {
- template <class Type, uint16_t typeCode> class DSLikeImpl;
- }
- /// \brief \c rdata::generic::DLV class represents the DLV RDATA as defined in
- /// RFC4431.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class, and provides trivial accessors specific to the
- /// DLV RDATA.
- class DLV : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit DLV(const std::string& type_str);
- DLV(isc::util::InputBuffer& buffer, size_t rdata_len);
- DLV(const DLV& other);
- DLV(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- /// \brief Assignment operator.
- ///
- /// It internally allocates a resource, and if it fails a corresponding
- /// standard exception will be thrown.
- /// This operator never throws an exception otherwise.
- ///
- /// This operator provides the strong exception guarantee: When an
- /// exception is thrown the content of the assignment target will be
- /// intact.
- DLV& operator=(const DLV& source);
- /// \brief The destructor.
- ~DLV();
- /// \brief Return the value of the Tag field.
- ///
- /// This method never throws an exception.
- uint16_t getTag() const;
- private:
- typedef detail::DSLikeImpl<DLV, 32769> DLVImpl;
- DLVImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_DLV_32769_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_DNAME_39_H
- #define GENERIC_DNAME_39_H 1
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- class DNAME : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit DNAME(const std::string& type_str);
- DNAME(isc::util::InputBuffer& buffer, size_t rdata_len);
- DNAME(const DNAME& other);
- DNAME(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- // DNAME specific methods
- DNAME(const Name& dname);
- const Name& getDname() const;
- private:
- Name dname_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_DNAME_39_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #include <stdint.h>
- #include <string>
- #include <dns/name.h>
- #include <dns/rrtype.h>
- #include <dns/rrttl.h>
- #include <dns/rdata.h>
- #include <dns/master_lexer.h>
- #ifndef GENERIC_DNSKEY_48_H
- #define GENERIC_DNSKEY_48_H 1
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- struct DNSKEYImpl;
- class DNSKEY : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit DNSKEY(const std::string& type_str);
- DNSKEY(isc::util::InputBuffer& buffer, size_t rdata_len);
- DNSKEY(const DNSKEY& other);
- DNSKEY(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- DNSKEY& operator=(const DNSKEY& source);
- ~DNSKEY();
- ///
- /// Specialized methods
- ///
- /// \brief Returns the key tag
- ///
- /// \throw isc::OutOfRange if the key data for RSA/MD5 is too short
- /// to support tag extraction.
- uint16_t getTag() const;
- uint16_t getFlags() const;
- uint8_t getAlgorithm() const;
- private:
- DNSKEYImpl* constructFromLexer(isc::dns::MasterLexer& lexer);
- DNSKEYImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_DNSKEY_48_H
- // Copyright (C) 2011-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_DS_43_H
- #define GENERIC_DS_43_H 1
- #include <stdint.h>
- #include <string>
- #include <dns/name.h>
- #include <dns/rrtype.h>
- #include <dns/rrttl.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- namespace detail {
- template <class Type, uint16_t typeCode> class DSLikeImpl;
- }
- /// \brief \c rdata::generic::DS class represents the DS RDATA as defined in
- /// RFC3658.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class, and provides trivial accessors specific to the
- /// DS RDATA.
- class DS : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit DS(const std::string& type_str);
- DS(isc::util::InputBuffer& buffer, size_t rdata_len);
- DS(const DS& other);
- DS(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- /// \brief Assignment operator.
- ///
- /// It internally allocates a resource, and if it fails a corresponding
- /// standard exception will be thrown.
- /// This operator never throws an exception otherwise.
- ///
- /// This operator provides the strong exception guarantee: When an
- /// exception is thrown the content of the assignment target will be
- /// intact.
- DS& operator=(const DS& source);
- /// \brief The destructor.
- ~DS();
- /// \brief Return the value of the Tag field.
- ///
- /// This method never throws an exception.
- uint16_t getTag() const;
- private:
- typedef detail::DSLikeImpl<DS, 43> DSImpl;
- DSImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_DS_43_H
- // Copyright (C) 2011-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_HINFO_13_H
- #define GENERIC_HINFO_13_H 1
- #include <stdint.h>
- #include <string>
- #include <boost/scoped_ptr.hpp>
- #include <boost/noncopyable.hpp>
- #include <dns/name.h>
- #include <dns/rdata.h>
- #include <util/buffer.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- class HINFOImpl;
- /// \brief \c HINFO class represents the HINFO rdata defined in
- /// RFC1034, RFC1035
- ///
- /// This class implements the basic interfaces inherited from the
- /// \c rdata::Rdata class, and provides accessors specific to the
- /// HINFO rdata.
- class HINFO : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit HINFO(const std::string& type_str);
- HINFO(isc::util::InputBuffer& buffer, size_t rdata_len);
- HINFO(const HINFO& other);
- HINFO(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- // HINFO specific methods
- ~HINFO();
- HINFO& operator=(const HINFO&);
- const std::string getCPU() const;
- const std::string getOS() const;
- private:
- /// Helper template function for toWire()
- ///
- /// \param outputer Where to write data in
- template <typename T>
- void toWireHelper(T& outputer) const;
- boost::scoped_ptr<HINFOImpl> impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_HINFO_13_H
- // Copyright (C) 2011-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_MINFO_14_H
- #define GENERIC_MINFO_14_H 1
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- /// \brief \c rdata::generic::MINFO class represents the MINFO RDATA as
- /// defined in RFC1035.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class, and provides trivial accessors specific to the
- /// MINFO RDATA.
- class MINFO : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit MINFO(const std::string& type_str);
- MINFO(isc::util::InputBuffer& buffer, size_t rdata_len);
- MINFO(const MINFO& other);
- MINFO(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- /// \brief Define the assignment operator.
- ///
- /// \exception std::bad_alloc Memory allocation fails in copying
- /// internal member variables (this should be very rare).
- MINFO& operator=(const MINFO& source);
- /// \brief Return the value of the rmailbox field.
- ///
- /// \throw std::bad_alloc If resource allocation for the returned
- /// \c Name fails.
- ///
- /// \note
- /// Unlike the case of some other RDATA classes (such as
- /// \c NS::getNSName()), this method constructs a new \c Name object
- /// and returns it, instead of returning a reference to a \c Name object
- /// internally maintained in the class (which is a private member).
- /// This is based on the observation that this method will be rarely
- /// used and even when it's used it will not be in a performance context
- /// (for example, a recursive resolver won't need this field in its
- /// resolution process). By returning a new object we have flexibility
- /// of changing the internal representation without the risk of changing
- /// the interface or method property.
- /// The same note applies to the \c getEmailbox() method.
- Name getRmailbox() const { return (rmailbox_); }
- /// \brief Return the value of the emailbox field.
- ///
- /// \throw std::bad_alloc If resource allocation for the returned
- /// \c Name fails.
- Name getEmailbox() const { return (emailbox_); }
- private:
- Name rmailbox_;
- Name emailbox_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_MINFO_14_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_MX_15_H
- #define GENERIC_MX_15_H 1
- #include <stdint.h>
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- class MX : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit MX(const std::string& type_str);
- MX(isc::util::InputBuffer& buffer, size_t rdata_len);
- MX(const MX& other);
- MX(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- MX(uint16_t preference, const Name& mxname);
- ///
- /// Specialized methods
- ///
- const Name& getMXName() const;
- uint16_t getMXPref() const;
- private:
- void constructFromLexer(isc::dns::MasterLexer& lexer,
- const isc::dns::Name* origin);
- /// Note: this is a prototype version; we may reconsider
- /// this representation later.
- uint16_t preference_;
- Name mxname_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_MX_15_H
- // Copyright (C) 2011-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_NAPTR_35_H
- #define GENERIC_NAPTR_35_H 1
- #include <string>
- #include <boost/scoped_ptr.hpp>
- #include <dns/name.h>
- #include <dns/rdata.h>
- #include <util/buffer.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- class NAPTRImpl;
- /// \brief \c NAPTR class represents the NAPTR rdata defined in
- /// RFC2915, RFC2168 and RFC3403
- ///
- /// This class implements the basic interfaces inherited from the
- /// \c rdata::Rdata class, and provides accessors specific to the
- /// NAPTR rdata.
- class NAPTR : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit NAPTR(const std::string& type_str);
- NAPTR(isc::util::InputBuffer& buffer, size_t rdata_len);
- NAPTR(const NAPTR& other);
- NAPTR(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- // NAPTR specific methods
- ~NAPTR();
- NAPTR& operator=(const NAPTR& source);
- uint16_t getOrder() const;
- uint16_t getPreference() const;
- const std::string getFlags() const;
- const std::string getServices() const;
- const std::string getRegexp() const;
- const Name& getReplacement() const;
- private:
- /// Helper template function for toWire()
- ///
- /// \param outputer Where to write data in
- template <typename T>
- void toWireHelper(T& outputer) const;
- boost::scoped_ptr<NAPTRImpl> impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_NAPTR_35_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_NS_2_H
- #define GENERIC_NS_2_H 1
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- class NS : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit NS(const std::string& type_str);
- NS(isc::util::InputBuffer& buffer, size_t rdata_len);
- NS(const NS& other);
- NS(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- ///
- /// Specialized constructor
- ///
- explicit NS(const Name& nsname) : nsname_(nsname) {}
- ///
- /// Specialized methods
- ///
- const Name& getNSName() const;
- private:
- Name nsname_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_NS_2_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #include <stdint.h>
- #include <string>
- #include <vector>
- #include <dns/name.h>
- #include <dns/rrtype.h>
- #include <dns/rrttl.h>
- #include <dns/rdata.h>
- #include <dns/master_lexer.h>
- #ifndef GENERIC_NSEC3_50_H
- #define GENERIC_NSEC3_50_H 1
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- struct NSEC3Impl;
- class NSEC3 : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit NSEC3(const std::string& type_str);
- NSEC3(isc::util::InputBuffer& buffer, size_t rdata_len);
- NSEC3(const NSEC3& other);
- NSEC3(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- NSEC3& operator=(const NSEC3& source);
- ~NSEC3();
- uint8_t getHashalg() const;
- uint8_t getFlags() const;
- uint16_t getIterations() const;
- const std::vector<uint8_t>& getSalt() const;
- const std::vector<uint8_t>& getNext() const;
- private:
- NSEC3Impl* constructFromLexer(isc::dns::MasterLexer& lexer);
- NSEC3Impl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_NSEC3_50_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #include <stdint.h>
- #include <string>
- #include <vector>
- #include <dns/name.h>
- #include <dns/rrtype.h>
- #include <dns/rrttl.h>
- #include <dns/rdata.h>
- #include <dns/master_lexer.h>
- #ifndef GENERIC_NSEC3PARAM_51_H
- #define GENERIC_NSEC3PARAM_51_H 1
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- struct NSEC3PARAMImpl;
- class NSEC3PARAM : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit NSEC3PARAM(const std::string& type_str);
- NSEC3PARAM(isc::util::InputBuffer& buffer, size_t rdata_len);
- NSEC3PARAM(const NSEC3PARAM& other);
- NSEC3PARAM(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- NSEC3PARAM& operator=(const NSEC3PARAM& source);
- ~NSEC3PARAM();
- ///
- /// Specialized methods
- ///
- uint8_t getHashalg() const;
- uint8_t getFlags() const;
- uint16_t getIterations() const;
- const std::vector<uint8_t>& getSalt() const;
- private:
- NSEC3PARAMImpl* constructFromLexer(isc::dns::MasterLexer& lexer);
- NSEC3PARAMImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_NSEC3PARAM_51_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #include <stdint.h>
- #include <string>
- #include <dns/name.h>
- #include <dns/rrtype.h>
- #include <dns/rrttl.h>
- #include <dns/rdata.h>
- #ifndef GENERIC_NSEC_47_H
- #define GENERIC_NSEC_47_H 1
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- struct NSECImpl;
- class NSEC : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit NSEC(const std::string& type_str);
- NSEC(isc::util::InputBuffer& buffer, size_t rdata_len);
- NSEC(const NSEC& other);
- NSEC(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- NSEC& operator=(const NSEC& source);
- ~NSEC();
- // specialized methods
- /// Return the next domain name.
- ///
- /// \exception std::bad_alloc Resource allocation failure in name copy.
- ///
- /// \return The next domain name field in the form of \c Name object.
- const Name& getNextName() const;
- private:
- NSECImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_NSEC_47_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_OPT_41_H
- #define GENERIC_OPT_41_H 1
- #include <string>
- #include <dns/rdata.h>
- #include <boost/shared_ptr.hpp>
- #include <vector>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- struct OPTImpl;
- class OPT : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit OPT(const std::string& type_str);
- OPT(isc::util::InputBuffer& buffer, size_t rdata_len);
- OPT(const OPT& other);
- OPT(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- // The default constructor makes sense for OPT as it can be empty.
- OPT();
- OPT& operator=(const OPT& source);
- ~OPT();
- /// \brief A class representing a pseudo RR (or option) within an
- /// OPT RR (see RFC 6891).
- class PseudoRR {
- public:
- /// \brief Constructor.
- /// \param code The OPTION-CODE field of the pseudo RR.
- /// \param data The OPTION-DATA field of the pseudo
- /// RR. OPTION-LENGTH is set to the length of this vector.
- PseudoRR(uint16_t code,
- boost::shared_ptr<std::vector<uint8_t> >& data);
- /// \brief Return the option code of this pseudo RR.
- uint16_t getCode() const;
- /// \brief Return the option data of this pseudo RR.
- const uint8_t* getData() const;
- /// \brief Return the length of the option data of this
- /// pseudo RR.
- uint16_t getLength() const;
- private:
- uint16_t code_;
- boost::shared_ptr<std::vector<uint8_t> > data_;
- };
- /// \brief Append a pseudo RR (option) in this OPT RR.
- ///
- /// \param code The OPTION-CODE field of the pseudo RR.
- /// \param data The OPTION-DATA field of the pseudo RR.
- /// \param length The size of the \c data argument. OPTION-LENGTH is
- /// set to this size.
- /// \throw isc::InvalidParameter if this pseudo RR would cause
- /// the OPT RDATA to overflow its RDLENGTH.
- void appendPseudoRR(uint16_t code, const uint8_t* data, uint16_t length);
- /// \brief Return a vector of the pseudo RRs (options) in this
- /// OPT RR.
- ///
- /// Note: The returned reference is only valid during the lifetime
- /// of this \c generic::OPT object. It should not be used
- /// afterwards.
- const std::vector<PseudoRR>& getPseudoRRs() const;
- private:
- OPTImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_OPT_41_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_PTR_12_H
- #define GENERIC_PTR_12_H 1
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- class PTR : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit PTR(const std::string& type_str);
- PTR(isc::util::InputBuffer& buffer, size_t rdata_len);
- PTR(const PTR& other);
- PTR(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- ///
- /// Specialized constructor
- ///
- explicit PTR(const Name& ptr_name) : ptr_name_(ptr_name) {}
- ///
- /// Specialized methods
- ///
- const Name& getPTRName() const;
- private:
- Name ptr_name_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_PTR_12_H
- // Copyright (C) 2011-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_RP_17_H
- #define GENERIC_RP_17_H 1
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- /// \brief \c rdata::generic::RP class represents the RP RDATA as defined in
- /// RFC1183.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class, and provides trivial accessors specific to the
- /// RP RDATA.
- class RP : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit RP(const std::string& type_str);
- RP(isc::util::InputBuffer& buffer, size_t rdata_len);
- RP(const RP& other);
- RP(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- /// We use the default copy constructor and assignment operator.
- /// \brief Constructor from RDATA field parameters.
- ///
- /// The parameters are a straightforward mapping of %RP RDATA
- /// fields as defined in RFC1183.
- RP(const Name& mailbox, const Name& text) :
- mailbox_(mailbox), text_(text)
- {}
- /// \brief Return the value of the mailbox field.
- ///
- /// \throw std::bad_alloc If resource allocation for the returned
- /// \c Name fails.
- ///
- /// \note
- /// Unlike the case of some other RDATA classes (such as
- /// \c NS::getNSName()), this method constructs a new \c Name object
- /// and returns it, instead of returning a reference to a \c Name object
- /// internally maintained in the class (which is a private member).
- /// This is based on the observation that this method will be rarely used
- /// and even when it's used it will not be in a performance context
- /// (for example, a recursive resolver won't need this field in its
- /// resolution process). By returning a new object we have flexibility of
- /// changing the internal representation without the risk of changing
- /// the interface or method property.
- /// The same note applies to the \c getText() method.
- Name getMailbox() const { return (mailbox_); }
- /// \brief Return the value of the text field.
- ///
- /// \throw std::bad_alloc If resource allocation for the returned
- /// \c Name fails.
- Name getText() const { return (text_); }
- private:
- Name mailbox_;
- Name text_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_RP_17_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #include <stdint.h>
- #include <string>
- #include <dns/name.h>
- #include <dns/rrtype.h>
- #include <dns/rdata.h>
- #ifndef GENERIC_RRSIG_46_H
- #define GENERIC_RRSIG_46_H 1
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- struct RRSIGImpl;
- /// \brief \c rdata::RRSIG class represents the RRSIG RDATA as defined %in
- /// RFC4034.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class, and provides trivial accessors specific to the
- /// RRSIG RDATA.
- class RRSIG : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit RRSIG(const std::string& type_str);
- RRSIG(isc::util::InputBuffer& buffer, size_t rdata_len);
- RRSIG(const RRSIG& other);
- RRSIG(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- RRSIG& operator=(const RRSIG& source);
- ~RRSIG();
- // specialized methods
- const RRType& typeCovered() const;
- private:
- // helper function for string and lexer constructors
- RRSIGImpl* constructFromLexer(MasterLexer& lexer, const Name* origin);
- RRSIGImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_RRSIG_46_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_SOA_6_H
- #define GENERIC_SOA_6_H 1
- #include <string>
- #include <dns/name.h>
- #include <dns/rdata.h>
- #include <dns/serial.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- class SOA : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit SOA(const std::string& type_str);
- SOA(isc::util::InputBuffer& buffer, size_t rdata_len);
- SOA(const SOA& other);
- SOA(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- SOA(const Name& mname, const Name& rname, uint32_t serial,
- uint32_t refresh, uint32_t retry, uint32_t expire,
- uint32_t minimum);
- /// \brief Returns the serial stored in the SOA.
- Serial getSerial() const;
- /// brief Returns the minimum TTL field value of the SOA.
- uint32_t getMinimum() const;
- private:
- /// Note: this is a prototype version; we may reconsider
- /// this representation later.
- Name mname_;
- Name rname_;
- /// serial, refresh, retry, expire, minimum, stored in network byte order
- uint8_t numdata_[20];
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_SOA_6_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_SPF_99_H
- #define GENERIC_SPF_99_H 1
- #include <stdint.h>
- #include <string>
- #include <vector>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- namespace detail {
- template<class Type, uint16_t typeCode> class TXTLikeImpl;
- }
- /// \brief \c rdata::SPF class represents the SPF RDATA as defined %in
- /// RFC4408.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class. The semantics of the class is provided by
- /// a copy of instantiated TXTLikeImpl class common to both TXT and SPF.
- class SPF : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit SPF(const std::string& type_str);
- SPF(isc::util::InputBuffer& buffer, size_t rdata_len);
- SPF(const SPF& other);
- SPF(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- /// \brief Assignment operator.
- ///
- /// It internally allocates a resource, and if it fails a corresponding
- /// standard exception will be thrown.
- /// This operator never throws an exception otherwise.
- ///
- /// This operator provides the strong exception guarantee: When an
- /// exception is thrown the content of the assignment target will be
- /// intact.
- SPF& operator=(const SPF& source);
- /// \brief The destructor.
- ~SPF();
- ///
- /// Specialized methods
- ///
- /// \brief Return a reference to the data strings
- ///
- /// This method never throws an exception.
- const std::vector<std::vector<uint8_t> >& getString() const;
- private:
- typedef isc::dns::rdata::generic::detail::TXTLikeImpl<SPF, 99> SPFImpl;
- SPFImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_SPF_99_H
- // Copyright (C) 2012-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_SSHFP_44_H
- #define GENERIC_SSHFP_44_H 1
- #include <stdint.h>
- #include <string>
- #include <vector>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- struct SSHFPImpl;
- class SSHFP : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit SSHFP(const std::string& type_str);
- SSHFP(isc::util::InputBuffer& buffer, size_t rdata_len);
- SSHFP(const SSHFP& other);
- SSHFP(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- SSHFP(uint8_t algorithm, uint8_t fingerprint_type,
- const std::string& fingerprint);
- SSHFP& operator=(const SSHFP& source);
- ~SSHFP();
- ///
- /// Specialized methods
- ///
- uint8_t getAlgorithmNumber() const;
- uint8_t getFingerprintType() const;
- const std::vector<uint8_t>& getFingerprint() const;
- size_t getFingerprintLength() const;
- private:
- SSHFPImpl* constructFromLexer(MasterLexer& lexer);
- SSHFPImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_SSHFP_44_H
- // Copyright (C) 2014-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_TLSA_52_H
- #define GENERIC_TLSA_52_H 1
- #include <stdint.h>
- #include <dns/name.h>
- #include <dns/rdata.h>
- #include <string>
- #include <vector>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- struct TLSAImpl;
- class TLSA : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit TLSA(const std::string& tlsa_str);
- TLSA(isc::util::InputBuffer& buffer, size_t rdata_len);
- TLSA(const TLSA& other);
- TLSA(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- TLSA(uint8_t certificate_usage, uint8_t selector,
- uint8_t matching_type, const std::string& certificate_assoc_data);
- TLSA& operator=(const TLSA& source);
- ~TLSA();
- ///
- /// Specialized methods
- ///
- uint8_t getCertificateUsage() const;
- uint8_t getSelector() const;
- uint8_t getMatchingType() const;
- const std::vector<uint8_t>& getData() const;
- size_t getDataLength() const;
- private:
- TLSAImpl* constructFromLexer(MasterLexer& lexer);
- TLSAImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_TLSA_52_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef GENERIC_TXT_16_H
- #define GENERIC_TXT_16_H 1
- #include <stdint.h>
- #include <string>
- #include <vector>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace generic {
- namespace detail {
- template<class Type, uint16_t typeCode> class TXTLikeImpl;
- }
- class TXT : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit TXT(const std::string& type_str);
- TXT(isc::util::InputBuffer& buffer, size_t rdata_len);
- TXT(const TXT& other);
- TXT(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- TXT& operator=(const TXT& source);
- ~TXT();
- private:
- typedef isc::dns::rdata::generic::detail::TXTLikeImpl<TXT, 16> TXTImpl;
- TXTImpl* impl_;
- };
- } // end of namespace "generic"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // GENERIC_TXT_16_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef HS_A_1_H
- #define HS_A_1_H 1
- #include <string>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace hs {
- class A : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit A(const std::string& type_str);
- A(isc::util::InputBuffer& buffer, size_t rdata_len);
- A(const A& other);
- A(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- };
- } // end of namespace "hs"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // HS_A_1_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef IN_A_1_H
- #define IN_A_1_H 1
- #include <string>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace in {
- class A : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit A(const std::string& type_str);
- A(isc::util::InputBuffer& buffer, size_t rdata_len);
- A(const A& other);
- A(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- //We can use the default destructor.
- //virtual ~A() {}
- // notyet:
- //const struct in_addr& getAddress() const { return (addr_); }
- private:
- uint32_t addr_; // raw IPv4 address (network byte order)
- };
- } // end of namespace "in"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // IN_A_1_H
- // Copyright (C) 2010-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef IN_AAAA_28_H
- #define IN_AAAA_28_H 1
- #include <stdint.h>
- #include <string>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace in {
- class AAAA : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit AAAA(const std::string& type_str);
- AAAA(isc::util::InputBuffer& buffer, size_t rdata_len);
- AAAA(const AAAA& other);
- AAAA(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- // notyet:
- //const struct in6_addr& getAddress() const { return (addr_); }
- private:
- uint8_t addr_[16]; // raw IPv6 address (network byte order)
- };
- } // end of namespace "in"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // IN_AAAA_28_H
- // Copyright (C) 2011-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef IN_DHCID_49_H
- #define IN_DHCID_49_H 1
- #include <string>
- #include <vector>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace in {
- /// \brief \c rdata::DHCID class represents the DHCID RDATA as defined %in
- /// RFC4701.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class, and provides trivial accessors specific to the
- /// DHCID RDATA.
- class DHCID : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit DHCID(const std::string& type_str);
- DHCID(isc::util::InputBuffer& buffer, size_t rdata_len);
- DHCID(const DHCID& other);
- DHCID(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- /// \brief Return the digest.
- ///
- /// This method never throws an exception.
- const std::vector<uint8_t>& getDigest() const;
- private:
- // helper for string and lexer constructors
- void constructFromLexer(MasterLexer& lexer);
- /// \brief Private data representation
- ///
- /// Opaque data at least 3 octets long as per RFC4701.
- ///
- std::vector<uint8_t> digest_;
- };
- } // end of namespace "in"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // IN_DHCID_49_H
- // Copyright (C) 2011-2015 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 http://mozilla.org/MPL/2.0/.
- #ifndef IN_SRV_33_H
- #define IN_SRV_33_H 1
- #include <stdint.h>
- #include <dns/name.h>
- #include <dns/rdata.h>
- namespace isc {
- namespace util {
- class InputBuffer;
- class OutputBuffer;
- }
- namespace dns {
- // BEGIN_COMMON_DECLARATIONS
- class AbstractMessageRenderer;
- // END_COMMON_DECLARATIONS
- namespace rdata {
- namespace in {
- struct SRVImpl;
- /// \brief \c rdata::SRV class represents the SRV RDATA as defined %in
- /// RFC2782.
- ///
- /// This class implements the basic interfaces inherited from the abstract
- /// \c rdata::Rdata class, and provides trivial accessors specific to the
- /// SRV RDATA.
- class SRV : public Rdata {
- public:
- // BEGIN_COMMON_MEMBERS
- explicit SRV(const std::string& type_str);
- SRV(isc::util::InputBuffer& buffer, size_t rdata_len);
- SRV(const SRV& other);
- SRV(
- MasterLexer& lexer, const Name* name,
- MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
- virtual std::string toText() const;
- virtual void toWire(isc::util::OutputBuffer& buffer) const;
- virtual void toWire(AbstractMessageRenderer& renderer) const;
- virtual int compare(const Rdata& other) const;
- // END_COMMON_MEMBERS
- /// \brief Assignment operator.
- ///
- /// It internally allocates a resource, and if it fails a corresponding
- /// standard exception will be thrown.
- /// This operator never throws an exception otherwise.
- ///
- /// This operator provides the strong exception guarantee: When an
- /// exception is thrown the content of the assignment target will be
- /// intact.
- SRV& operator=(const SRV& source);
- /// \brief The destructor.
- ~SRV();
- ///
- /// Specialized methods
- ///
- /// \brief Return the value of the priority field.
- ///
- /// This method never throws an exception.
- uint16_t getPriority() const;
- /// \brief Return the value of the weight field.
- ///
- /// This method never throws an exception.
- uint16_t getWeight() const;
- /// \brief Return the value of the port field.
- ///
- /// This method never throws an exception.
- uint16_t getPort() const;
- /// \brief Return the value of the target field.
- ///
- /// \return A reference to a \c Name class object corresponding to the
- /// internal target name.
- ///
- /// This method never throws an exception.
- const Name& getTarget() const;
- private:
- SRVImpl* impl_;
- };
- } // end of namespace "in"
- } // end of namespace "rdata"
- } // end of namespace "dns"
- } // end of namespace "isc"
- #endif // IN_SRV_33_H
- #endif // DNS_RDATACLASS_H
- // Local Variables:
- // mode: c++
- // End:
|