summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dhcpv6.h8
-rw-r--r--include/icmpv6.h8
-rw-r--r--include/ip.h13
-rw-r--r--include/ipv6.h8
4 files changed, 36 insertions, 1 deletions
diff --git a/include/dhcpv6.h b/include/dhcpv6.h
index 0997bf1..fe80ca0 100644
--- a/include/dhcpv6.h
+++ b/include/dhcpv6.h
@@ -504,6 +504,14 @@ public:
* \return The stored link address field.
*/
const ipaddress_type &link_address() const { return link_addr; }
+
+ /**
+ * \brief Getter for the DHCPv6 options.
+ *
+ * \return The stored options.
+ */
+ const options_type &options() const { return options_; }
+ ;
// Setters
/**
diff --git a/include/icmpv6.h b/include/icmpv6.h
index f171329..f262cd4 100644
--- a/include/icmpv6.h
+++ b/include/icmpv6.h
@@ -583,6 +583,14 @@ public:
return _dest_address;
}
+ /**
+ * \brief Getter for the ICMPv6 options.
+ * \return The stored options.
+ */
+ const options_type &options() const {
+ return _options;
+ }
+
// Setters
/**
diff --git a/include/ip.h b/include/ip.h
index 93ad541..688f892 100644
--- a/include/ip.h
+++ b/include/ip.h
@@ -215,6 +215,11 @@ namespace Tins {
typedef generic_route_option_type record_route_type;
/**
+ * The type used to store IP options.
+ */
+ typedef std::list<ip_option> options_type;
+
+ /**
* \brief Constructor for building the IP PDU.
*
* Both the destination and source IP address can be supplied.
@@ -318,6 +323,12 @@ namespace Tins {
*/
small_uint<4> version() const { return _ip.version; }
+ /**
+ * \brief Getter for the IP options.
+ * \return The stored options.
+ */
+ const options_type &options() const { return _ip_options; }
+
/* Setters */
/**
@@ -616,7 +627,7 @@ namespace Tins {
generic_route_option_type search_route_option(option_identifier id) const;
iphdr _ip;
- std::list<ip_option> _ip_options;
+ options_type _ip_options;
uint32_t _options_size, _padded_options_size;
};
}
diff --git a/include/ipv6.h b/include/ipv6.h
index e4bcc83..9aab25c 100644
--- a/include/ipv6.h
+++ b/include/ipv6.h
@@ -192,6 +192,14 @@ public:
return _header.dst_addr;
}
+ /**
+ * \brief Getter for the IPv6 extension headers.
+ * \return The stored headers.
+ */
+ const headers_type& headers() const {
+ return ext_headers;
+ }
+
// Setters
/**