naptr_35.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. // BEGIN_HEADER_GUARD
  15. #include <string>
  16. #include <boost/scoped_ptr.hpp>
  17. #include <dns/name.h>
  18. #include <dns/rdata.h>
  19. #include <util/buffer.h>
  20. // BEGIN_ISC_NAMESPACE
  21. // BEGIN_COMMON_DECLARATIONS
  22. // END_COMMON_DECLARATIONS
  23. // BEGIN_RDATA_NAMESPACE
  24. class NAPTRImpl;
  25. /// \brief \c NAPTR class represents the NAPTR rdata defined in
  26. /// RFC2915, RFC2168 and RFC3403
  27. ///
  28. /// This class implements the basic interfaces inherited from the
  29. /// \c rdata::Rdata class, and provides accessors specific to the
  30. /// NAPTR rdata.
  31. class NAPTR : public Rdata {
  32. public:
  33. // BEGIN_COMMON_MEMBERS
  34. // END_COMMON_MEMBERS
  35. // NAPTR specific methods
  36. ~NAPTR();
  37. NAPTR& operator=(const NAPTR& source);
  38. uint16_t getOrder() const;
  39. uint16_t getPreference() const;
  40. const std::string getFlags() const;
  41. const std::string getServices() const;
  42. const std::string getRegexp() const;
  43. const Name& getReplacement() const;
  44. private:
  45. /// Helper template function for toWire()
  46. ///
  47. /// \param outputer Where to write data in
  48. template <typename T>
  49. void toWireHelper(T& outputer) const;
  50. boost::scoped_ptr<NAPTRImpl> impl_;
  51. };
  52. // END_RDATA_NAMESPACE
  53. // END_ISC_NAMESPACE
  54. // END_HEADER_GUARD
  55. // Local Variables:
  56. // mode: c++
  57. // End: