naptr_35.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 <dns/name.h>
  17. #include <dns/rdata.h>
  18. #include <util/buffer.h>
  19. // BEGIN_ISC_NAMESPACE
  20. // BEGIN_COMMON_DECLARATIONS
  21. // END_COMMON_DECLARATIONS
  22. // BEGIN_RDATA_NAMESPACE
  23. class NAPTRImpl;
  24. /// \brief \c NAPTR class represents the NAPTR rdata defined in
  25. /// RFC2915, RFC2168 and RFC3403
  26. ///
  27. /// This class implements the basic interfaces inherited from the
  28. /// \c rdata::Rdata class, and provides accessors specific to the
  29. /// NAPTR rdata.
  30. class NAPTR : public Rdata {
  31. public:
  32. // BEGIN_COMMON_MEMBERS
  33. // END_COMMON_MEMBERS
  34. // NAPTR specific methods
  35. ~NAPTR();
  36. uint16_t getOrder() const;
  37. uint16_t getPreference() const;
  38. const std::string getFlags() const;
  39. const std::string getServices() const;
  40. const std::string getRegexp() const;
  41. const Name& getReplacement() const;
  42. private:
  43. /// Helper template function for toWire()
  44. ///
  45. /// \param outputer Where to write data in
  46. template <typename T>
  47. void toWireHelper(T& outputer) const;
  48. NAPTRImpl* impl_;
  49. };
  50. // END_RDATA_NAMESPACE
  51. // END_ISC_NAMESPACE
  52. // END_HEADER_GUARD
  53. // Local Variables:
  54. // mode: c++
  55. // End: