1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-30 13:34:27 +01:00

Added support for IPv6 addresses in DNS.

This commit is contained in:
Matias Fontanini
2012-11-20 23:57:02 -03:00
parent 2a0b248518
commit 08b4c92dac
5 changed files with 53 additions and 8 deletions

View File

@@ -42,6 +42,7 @@
namespace Tins {
class IPv4Address;
class IPv6Address;
/**
* \class DNS
@@ -240,6 +241,7 @@ namespace Tins {
typedef std::list<Query> queries_type;
typedef std::list<Resource> resources_type;
typedef IPv4Address address_type;
typedef IPv6Address address_v6_type;
/**
* \brief Default constructor.
@@ -485,6 +487,18 @@ namespace Tins {
*/
void add_answer(const std::string &name,
const DNSResourceRecord::info &info, address_type ip);
/**
* \brief Add a query response.
*
* \param name The resolved name.
* \param type The type of this answer.
* \param qclass The class of this answer.
* \param ttl The time-to-live of this answer.
* \param ip The ip address of the resolved name.
*/
void add_answer(const std::string &name,
const DNSResourceRecord::info &info, address_v6_type ip);
/**
* \brief Add a query response.

View File

@@ -72,6 +72,15 @@ public:
*/
IPv6Address(const std::string &addr);
/**
* \brief Constructor from a buffer.
*
* The ptr parameter must be at least address_size bytes long.
*
* \param ptr The buffer from which to construct this object.
*/
IPv6Address(const_iterator ptr);
/**
* \brief Retrieve the string representation of this address.
*