libtins
4.0
|
Represents an ICMPv6 PDU. More...
#include <icmpv6.h>
Classes | |
struct | addr_list_type |
struct | dns_search_list_type |
struct | handover_assist_info_type |
struct | handover_key_reply_type |
struct | handover_key_req_type |
struct | ip_prefix_type |
struct | lladdr_type |
The type used to store the link layer address option data. More... | |
struct | map_type |
struct | mobile_node_id_type |
struct | multicast_address_record |
struct | naack_type |
The type used to store the neighbour advertisement acknowledgement option data. More... | |
struct | new_advert_interval_type |
struct | prefix_info_type |
struct | recursive_dns_type |
struct | route_info_type |
struct | rsa_sign_type |
struct | shortcut_limit_type |
struct | timestamp_type |
Public Types | |
enum | Types { DEST_UNREACHABLE = 1, PACKET_TOOBIG = 2, TIME_EXCEEDED = 3, PARAM_PROBLEM = 4, ECHO_REQUEST = 128, ECHO_REPLY = 129, MGM_QUERY = 130, MGM_REPORT = 131, MGM_REDUCTION = 132, ROUTER_SOLICIT = 133, ROUTER_ADVERT = 134, NEIGHBOUR_SOLICIT = 135, NEIGHBOUR_ADVERT = 136, REDIRECT = 137, ROUTER_RENUMBER = 138, NI_QUERY = 139, NI_REPLY = 140, MLD2_REPORT = 143, DHAAD_REQUEST = 144, DHAAD_REPLY = 145, MOBILE_PREFIX_SOLICIT = 146, MOBILE_PREFIX_ADVERT = 147, CERT_PATH_SOLICIT = 148, CERT_PATH_ADVERT = 149, MULTICAST_ROUTER_ADVERT = 151, MULTICAST_ROUTER_SOLICIT = 152, MULTICAST_ROUTER_TERMINATE = 153, RPL_CONTROL_MSG = 155 } |
enum | OptionTypes { SOURCE_ADDRESS = 1, TARGET_ADDRESS, PREFIX_INFO, REDIRECT_HEADER, MTU, NBMA_SHORT_LIMIT, ADVERT_INTERVAL, HOME_AGENT_INFO, S_ADDRESS_LIST, T_ADDRESS_LIST, CGA, RSA_SIGN, TIMESTAMP, NONCE, TRUST_ANCHOR, CERTIFICATE, IP_PREFIX, NEW_ROUTER_PREFIX, LINK_ADDRESS, NAACK, MAP = 23, ROUTE_INFO, RECURSIVE_DNS_SERV, RA_FLAGS_EXT, HANDOVER_KEY_REQ, HANDOVER_KEY_REPLY, HANDOVER_ASSIST_INFO, MOBILE_NODE_ID, DNS_SEARCH_LIST, PROXY_SIGNATURE, ADDRESS_REG, SIXLOWPAN_CONTEXT, AUTHORITATIVE_BORDER_ROUTER, CARD_REQUEST = 138, CARD_REPLY } |
typedef IPv6Address | ipaddress_type |
typedef HWAddress< 6 > | hwaddress_type |
typedef PDUOption< uint8_t, ICMPv6 > | option |
typedef std::vector< option > | options_type |
typedef std::vector< uint16_t > | new_ha_info_type |
The type used to store the new home agent information option data. | |
typedef std::vector< uint8_t > | nonce_type |
typedef std::pair< uint16_t, uint32_t > | mtu_type |
typedef std::vector< multicast_address_record > | multicast_address_records_list |
typedef std::vector< ipaddress_type > | sources_list |
Public Types inherited from Tins::PDU | |
enum | endian_type { BE, LE } |
enum | PDUType { RAW, ETHERNET_II, IEEE802_3, DOT3 = IEEE802_3, RADIOTAP, DOT11, DOT11_ACK, DOT11_ASSOC_REQ, DOT11_ASSOC_RESP, DOT11_AUTH, DOT11_BEACON, DOT11_BLOCK_ACK, DOT11_BLOCK_ACK_REQ, DOT11_CF_END, DOT11_DATA, DOT11_CONTROL, DOT11_DEAUTH, DOT11_DIASSOC, DOT11_END_CF_ACK, DOT11_MANAGEMENT, DOT11_PROBE_REQ, DOT11_PROBE_RESP, DOT11_PS_POLL, DOT11_REASSOC_REQ, DOT11_REASSOC_RESP, DOT11_RTS, DOT11_QOS_DATA, LLC, SNAP, IP, ARP, TCP, UDP, ICMP, BOOTP, DHCP, EAPOL, RC4EAPOL, RSNEAPOL, DNS, LOOPBACK, IPv6, ICMPv6, SLL, DHCPv6, DOT1Q, PPPOE, STP, PPI, IPSEC_AH, IPSEC_ESP, PKTAP, MPLS, UNKNOWN = 999, USER_DEFINED_PDU = 1000 } |
Enum which identifies each type of PDU. More... | |
typedef byte_array | serialization_type |
Public Member Functions | |
ICMPv6 (Types tp=ECHO_REQUEST) | |
Constructs an ICMPv6 object. More... | |
ICMPv6 (const uint8_t *buffer, uint32_t total_sz) | |
Constructs an ICMPv6 object from a buffer. More... | |
Types | type () const |
Getter for the type field. More... | |
uint8_t | code () const |
Getter for the code field. More... | |
uint16_t | checksum () const |
Getter for the cksum field. More... | |
uint16_t | identifier () const |
Getter for the identifier field. More... | |
uint16_t | sequence () const |
Getter for the sequence field. More... | |
small_uint< 1 > | override () const |
Getter for the override field. More... | |
small_uint< 1 > | solicited () const |
Getter for the solicited field. More... | |
small_uint< 1 > | router () const |
Getter for the router field. More... | |
uint8_t | hop_limit () const |
Getter for the hop limit field. More... | |
uint16_t | maximum_response_code () const |
Getter for the maximum response code field. More... | |
small_uint< 2 > | router_pref () const |
Getter for the router_pref field. More... | |
small_uint< 1 > | home_agent () const |
Getter for the home_agent field. More... | |
small_uint< 1 > | other () const |
Getter for the other field. More... | |
small_uint< 1 > | managed () const |
Getter for the managed field. More... | |
uint16_t | router_lifetime () const |
Getter for the router_lifetime field. More... | |
uint32_t | reachable_time () const |
Getter for the reachable_time field. More... | |
uint32_t | retransmit_timer () const |
Getter for the retransmit_timer field. More... | |
const ipaddress_type & | target_addr () const |
Getter for the target address field. More... | |
const ipaddress_type & | dest_addr () const |
Getter for the destination address field. More... | |
const ipaddress_type & | multicast_addr () const |
Getter for the multicast address field. More... | |
const options_type & | options () const |
Getter for the ICMPv6 options. More... | |
uint8_t | length () const |
Getter for the length field. More... | |
const multicast_address_records_list & | multicast_address_records () const |
Getter for the multicast address records field. | |
const sources_list & | sources () const |
Getter for the multicast address records field. More... | |
small_uint< 1 > | supress () const |
Getter for the Suppress Router-Side Processing field. More... | |
small_uint< 3 > | qrv () const |
Getter for the Querier's Robustnes Variable field. More... | |
uint8_t | qqic () const |
Getter for the Querier's Query Interval Code field. More... | |
void | type (Types new_type) |
Setter for the type field. More... | |
void | code (uint8_t new_code) |
Setter for the code field. More... | |
void | checksum (uint16_t new_cksum) |
Setter for the cksum field. More... | |
void | identifier (uint16_t new_identifier) |
Setter for the identifier field. More... | |
void | sequence (uint16_t new_sequence) |
Setter for the sequence field. More... | |
void | override (small_uint< 1 > new_override) |
Setter for the override field. More... | |
void | solicited (small_uint< 1 > new_solicited) |
Setter for the solicited field. More... | |
void | router (small_uint< 1 > new_router) |
Setter for the router field. More... | |
void | hop_limit (uint8_t new_hop_limit) |
Setter for the hop_limit field. More... | |
void | maximum_response_code (uint16_t maximum_response_code) |
Setter for the maximum response code field. More... | |
void | router_pref (small_uint< 2 > new_router_pref) |
Setter for the router_pref field. More... | |
void | home_agent (small_uint< 1 > new_home_agent) |
Setter for the home_agent field. More... | |
void | other (small_uint< 1 > new_other) |
Setter for the other field. More... | |
void | managed (small_uint< 1 > new_managed) |
Setter for the managed field. More... | |
void | router_lifetime (uint16_t new_router_lifetime) |
Setter for the router_lifetime field. More... | |
void | target_addr (const ipaddress_type &new_target_addr) |
Setter for the target address field. More... | |
void | dest_addr (const ipaddress_type &new_dest_addr) |
Setter for the destination address field. More... | |
void | multicast_addr (const ipaddress_type &new_multicast_addr) |
Setter for the multicast address field. More... | |
void | reachable_time (uint32_t new_reachable_time) |
Setter for the reachable_time field. More... | |
void | retransmit_timer (uint32_t new_retrans_timer) |
Setter for the retransmit_timer field. More... | |
void | multicast_address_records (const multicast_address_records_list &records) |
Setter for the multicast address records field. More... | |
void | sources (const sources_list &new_sources) |
Setter for the sources field. More... | |
void | supress (small_uint< 1 > value) |
Setter for the supress field. More... | |
void | qrv (small_uint< 3 > value) |
Setter for the Querier's Robustness Variable field. More... | |
void | qqic (uint8_t value) |
Setter for the Querier's Query Interval Code field. More... | |
PDUType | pdu_type () const |
Getter for the PDU's type. More... | |
bool | has_target_addr () const |
Checks whether this ICMPv6 object has a target_addr field. More... | |
bool | has_dest_addr () const |
Checks whether this ICMPv6 object has a target_addr field. More... | |
void | add_option (const option &option) |
Adds an ICMPv6 option. More... | |
void | add_option (option &&option) |
Adds an ICMPv6 option. More... | |
bool | remove_option (OptionTypes type) |
Removes an ICMPv6 option. More... | |
uint32_t | header_size () const |
Returns the header size. More... | |
uint32_t | trailer_size () const |
Returns the trailer size. More... | |
const ICMPExtensionsStructure & | extensions () const |
Getter for the extensions field. More... | |
ICMPExtensionsStructure & | extensions () |
Getter for the extensions field. More... | |
bool | has_extensions () const |
Indicates whether this object contains ICMP extensions. | |
void | use_length_field (bool value) |
Sets whether the length field will be set for packets that use it. More... | |
bool | matches_response (const uint8_t *ptr, uint32_t total_sz) const |
Check whether ptr points to a valid response for this PDU. More... | |
const option * | search_option (OptionTypes type) const |
Searchs for an option that matchs the given flag. More... | |
ICMPv6 * | clone () const |
void | use_mldv2 (bool value) |
Indicates whether to use MLDv2. More... | |
void | source_link_layer_addr (const hwaddress_type &addr) |
Setter for the source link layer address option. More... | |
void | target_link_layer_addr (const hwaddress_type &addr) |
Setter for the target link layer address option. More... | |
void | prefix_info (prefix_info_type info) |
Setter for the prefix information option. More... | |
void | redirect_header (const byte_array &data) |
Setter for the redirect header option. More... | |
void | mtu (const mtu_type &value) |
Setter for the MTU option. More... | |
void | shortcut_limit (const shortcut_limit_type &value) |
Setter for the shortcut limit option. More... | |
void | new_advert_interval (const new_advert_interval_type &value) |
Setter for the new advertisement interval option. More... | |
void | new_home_agent_info (const new_ha_info_type &value) |
Setter for the new home agent information option. More... | |
void | source_addr_list (const addr_list_type &value) |
Setter for the new source address list option. More... | |
void | target_addr_list (const addr_list_type &value) |
Setter for the new target address list option. More... | |
void | rsa_signature (const rsa_sign_type &value) |
Setter for the new RSA signature option. More... | |
void | timestamp (const timestamp_type &value) |
Setter for the new timestamp option. More... | |
void | nonce (const nonce_type &value) |
Setter for the new nonce option. More... | |
void | ip_prefix (const ip_prefix_type &value) |
Setter for the new IP address/prefix option. More... | |
void | link_layer_addr (lladdr_type value) |
Setter for the new link layer address option. More... | |
void | naack (const naack_type &value) |
Setter for the neighbour advertisement acknowledgement option. More... | |
void | map (const map_type &value) |
Setter for the map option. More... | |
void | route_info (const route_info_type &value) |
Setter for the route information option. More... | |
void | recursive_dns_servers (const recursive_dns_type &value) |
Setter for the recursive DNS servers option. More... | |
void | handover_key_request (const handover_key_req_type &value) |
Setter for the handover key request option. More... | |
void | handover_key_reply (const handover_key_reply_type &value) |
Setter for the handover key reply option. More... | |
void | handover_assist_info (const handover_assist_info_type &value) |
Setter for the handover assist info option. More... | |
void | mobile_node_identifier (const mobile_node_id_type &value) |
Setter for the mobile node identifier option. More... | |
void | dns_search_list (const dns_search_list_type &value) |
Setter for the DNS search list option. More... | |
hwaddress_type | source_link_layer_addr () const |
Getter for the source link layer address option. More... | |
hwaddress_type | target_link_layer_addr () const |
Getter for the target link layer address option. More... | |
prefix_info_type | prefix_info () const |
Getter for the prefix information option. More... | |
byte_array | redirect_header () const |
Getter for the redirect header option. More... | |
mtu_type | mtu () const |
Getter for the MTU option. More... | |
shortcut_limit_type | shortcut_limit () const |
Getter for the shortcut limit option. More... | |
new_advert_interval_type | new_advert_interval () const |
Getter for the new advertisement interval option. More... | |
new_ha_info_type | new_home_agent_info () const |
Getter for the new home agent information option. More... | |
addr_list_type | source_addr_list () const |
Getter for the source address list option. More... | |
addr_list_type | target_addr_list () const |
Getter for the target address list option. More... | |
rsa_sign_type | rsa_signature () const |
Getter for the RSA signature option. More... | |
timestamp_type | timestamp () const |
Getter for the timestamp option. More... | |
nonce_type | nonce () const |
Getter for the nonce option. More... | |
ip_prefix_type | ip_prefix () const |
Getter for the IP address/prefix option. More... | |
lladdr_type | link_layer_addr () const |
Getter for the link layer address option. More... | |
naack_type | naack () const |
Getter for the neighbour advertisement acknowledgement option. More... | |
map_type | map () const |
Getter for the map option. More... | |
route_info_type | route_info () const |
Getter for the route information option. More... | |
recursive_dns_type | recursive_dns_servers () const |
Getter for the recursive dns servers option. More... | |
handover_key_req_type | handover_key_request () const |
Getter for the handover key request option. More... | |
handover_key_reply_type | handover_key_reply () const |
Getter for the handover key reply option. More... | |
handover_assist_info_type | handover_assist_info () const |
Getter for the handover key reply option. More... | |
mobile_node_id_type | mobile_node_identifier () const |
Getter for the mobile node identifier option. More... | |
dns_search_list_type | dns_search_list () const |
Getter for the mobile node identifier option. More... | |
Public Member Functions inherited from Tins::PDU | |
PDU () | |
Default constructor. | |
PDU (PDU &&rhs) TINS_NOEXCEPT | |
Move constructor. More... | |
PDU & | operator= (PDU &&rhs) TINS_NOEXCEPT |
Move assignment operator. More... | |
virtual | ~PDU () |
PDU destructor. More... | |
uint32_t | size () const |
The whole chain of PDU's size, including this one. More... | |
PDU * | inner_pdu () const |
Getter for the inner PDU. More... | |
PDU * | parent_pdu () const |
PDU * | release_inner_pdu () |
Releases the inner PDU. More... | |
void | inner_pdu (PDU *next_pdu) |
Sets the child PDU. More... | |
void | inner_pdu (const PDU &next_pdu) |
Sets the child PDU. More... | |
serialization_type | serialize () |
Serializes the whole chain of PDU's, including this one. More... | |
template<typename T > | |
T * | find_pdu (PDUType type=T::pdu_flag) |
Finds and returns the first PDU that matches the given flag. More... | |
template<typename T > | |
const T * | find_pdu (PDUType type=T::pdu_flag) const |
Finds and returns the first PDU that matches the given flag. More... | |
template<typename T > | |
T & | rfind_pdu (PDUType type=T::pdu_flag) |
Finds and returns the first PDU that matches the given flag. More... | |
template<typename T > | |
const T & | rfind_pdu (PDUType type=T::pdu_flag) const |
Finds and returns the first PDU that matches the given flag. More... | |
virtual void | send (PacketSender &sender, const NetworkInterface &iface) |
Send the stack of PDUs through a PacketSender. More... | |
virtual PDU * | recv_response (PacketSender &sender, const NetworkInterface &iface) |
Receives a matching response for this packet. More... | |
virtual bool | matches_flag (PDUType flag) const |
Check whether this PDU matches the specified flag. More... | |
Static Public Attributes | |
static const PDU::PDUType | pdu_flag = PDU::ICMPv6 |
This PDU's flag. | |
Static Public Attributes inherited from Tins::PDU | |
static const endian_type | endianness = BE |
Additional Inherited Members | |
Protected Member Functions inherited from Tins::PDU | |
PDU (const PDU &other) | |
Copy constructor. | |
PDU & | operator= (const PDU &other) |
Copy assignment operator. | |
void | copy_inner_pdu (const PDU &pdu) |
Copy other PDU's inner PDU(if any). More... | |
virtual void | prepare_for_serialize () |
Prepares this PDU for serialization. More... | |
void | serialize (uint8_t *buffer, uint32_t total_sz) |
Serializes this PDU and propagates this action to child PDUs. More... | |
Represents an ICMPv6 PDU.
typedef HWAddress<6> Tins::ICMPv6::hwaddress_type |
The type used to store addresses.
The type used to store addresses.
typedef std::pair<uint16_t, uint32_t> Tins::ICMPv6::mtu_type |
The type used to store the MTU option.
typedef std::vector<uint8_t> Tins::ICMPv6::nonce_type |
The type used to store the nonce option data.
typedef PDUOption<uint8_t, ICMPv6> Tins::ICMPv6::option |
The type used to represent ICMPv6 options.
typedef std::vector<option> Tins::ICMPv6::options_type |
The type used to store options.
The types of ICMPv6 options.
enum Tins::ICMPv6::Types |
The types of ICMPv6 messages
Tins::ICMPv6::ICMPv6 | ( | Types | tp = ECHO_REQUEST | ) |
Tins::ICMPv6::ICMPv6 | ( | const uint8_t * | buffer, |
uint32_t | total_sz | ||
) |
Constructs an ICMPv6 object from a buffer.
If there is not enough size for an ICMPv6 header, a malformed_packet exception is thrown.
Any extra data is stored in a RawPDU.
buffer | The buffer from which this PDU will be constructed. |
total_sz | The total size of the buffer. |
void Tins::ICMPv6::add_option | ( | const option & | option | ) |
Adds an ICMPv6 option.
The option is added after the last option in the option fields.
option | The option to be added |
|
inline |
|
inline |
Getter for the cksum field.
void Tins::ICMPv6::checksum | ( | uint16_t | new_cksum | ) |
Setter for the cksum field.
new_cksum | The new cksum field value. |
|
inlinevirtual |
Implements Tins::PDU.
|
inline |
Getter for the code field.
void Tins::ICMPv6::code | ( | uint8_t | new_code | ) |
Setter for the code field.
new_code | The new code field value. |
|
inline |
Getter for the destination address field.
void Tins::ICMPv6::dest_addr | ( | const ipaddress_type & | new_dest_addr | ) |
Setter for the destination address field.
new_dest_addr | The new destination address field value. |
void Tins::ICMPv6::dns_search_list | ( | const dns_search_list_type & | value | ) |
ICMPv6::dns_search_list_type Tins::ICMPv6::dns_search_list | ( | ) | const |
Getter for the mobile node identifier option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Getter for the extensions field.
|
inline |
Getter for the extensions field.
void Tins::ICMPv6::handover_assist_info | ( | const handover_assist_info_type & | value | ) |
Setter for the handover assist info option.
value | The new handover assist info option data. |
ICMPv6::handover_assist_info_type Tins::ICMPv6::handover_assist_info | ( | ) | const |
Getter for the handover key reply option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::handover_key_reply | ( | const handover_key_reply_type & | value | ) |
Setter for the handover key reply option.
value | The new handover key reply option data. |
ICMPv6::handover_key_reply_type Tins::ICMPv6::handover_key_reply | ( | ) | const |
Getter for the handover key reply option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::handover_key_request | ( | const handover_key_req_type & | value | ) |
Setter for the handover key request option.
value | The new handover key request option data. |
ICMPv6::handover_key_req_type Tins::ICMPv6::handover_key_request | ( | ) | const |
Getter for the handover key request option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Checks whether this ICMPv6 object has a target_addr field.
This depends on the type field.
|
inline |
Checks whether this ICMPv6 object has a target_addr field.
This depends on the type field.
|
virtual |
Returns the header size.
This method overrides PDU::header_size. This size includes the payload and options size.
Implements Tins::PDU.
|
inline |
Getter for the home_agent field.
void Tins::ICMPv6::home_agent | ( | small_uint< 1 > | new_home_agent | ) |
Setter for the home_agent field.
new_home_agent | The new home_agent field value. |
|
inline |
Getter for the hop limit field.
void Tins::ICMPv6::hop_limit | ( | uint8_t | new_hop_limit | ) |
Setter for the hop_limit field.
new_hop_limit | The new hop_limit field value. |
|
inline |
Getter for the identifier field.
void Tins::ICMPv6::identifier | ( | uint16_t | new_identifier | ) |
Setter for the identifier field.
new_identifier | The new identifier field value. |
void Tins::ICMPv6::ip_prefix | ( | const ip_prefix_type & | value | ) |
ICMPv6::ip_prefix_type Tins::ICMPv6::ip_prefix | ( | ) | const |
Getter for the IP address/prefix option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Getter for the length field.
void Tins::ICMPv6::link_layer_addr | ( | lladdr_type | value | ) |
Setter for the new link layer address option.
value | The new link layer address option data. |
ICMPv6::lladdr_type Tins::ICMPv6::link_layer_addr | ( | ) | const |
Getter for the link layer address option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Getter for the managed field.
void Tins::ICMPv6::managed | ( | small_uint< 1 > | new_managed | ) |
Setter for the managed field.
new_managed | The new managed field value. |
void Tins::ICMPv6::map | ( | const map_type & | value | ) |
Setter for the map option.
value | The new map option data. |
ICMPv6::map_type Tins::ICMPv6::map | ( | ) | const |
Getter for the map option.
This method will throw an option_not_found exception if the option is not found.
|
virtual |
Check whether ptr points to a valid response for this PDU.
ptr | The pointer to the buffer. |
total_sz | The size of the buffer. |
Reimplemented from Tins::PDU.
|
inline |
Getter for the maximum response code field.
void Tins::ICMPv6::maximum_response_code | ( | uint16_t | maximum_response_code | ) |
Setter for the maximum response code field.
new_hop_limit | The new maximum response code field value. |
void Tins::ICMPv6::mobile_node_identifier | ( | const mobile_node_id_type & | value | ) |
Setter for the mobile node identifier option.
value | The new mobile node identifier option data. |
ICMPv6::mobile_node_id_type Tins::ICMPv6::mobile_node_identifier | ( | ) | const |
Getter for the mobile node identifier option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::mtu | ( | const mtu_type & | value | ) |
Setter for the MTU option.
value | The MTU option data. |
ICMPv6::mtu_type Tins::ICMPv6::mtu | ( | ) | const |
Getter for the MTU option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Getter for the multicast address field.
Note that this field is only valid for Multicast Listener Query Message packets
void Tins::ICMPv6::multicast_addr | ( | const ipaddress_type & | new_multicast_addr | ) |
Setter for the multicast address field.
Note that this field is only valid if the type is MGM_QUERY
new_multicast_addr | The new multicast address field value. |
void Tins::ICMPv6::multicast_address_records | ( | const multicast_address_records_list & | records | ) |
Setter for the multicast address records field.
This field is only valid if the type of this PDU is MLD2_REPORT
void Tins::ICMPv6::naack | ( | const naack_type & | value | ) |
Setter for the neighbour advertisement acknowledgement option.
value | The new naack option data. |
ICMPv6::naack_type Tins::ICMPv6::naack | ( | ) | const |
Getter for the neighbour advertisement acknowledgement option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::new_advert_interval | ( | const new_advert_interval_type & | value | ) |
Setter for the new advertisement interval option.
value | The new advertisement interval option data. |
ICMPv6::new_advert_interval_type Tins::ICMPv6::new_advert_interval | ( | ) | const |
Getter for the new advertisement interval option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::new_home_agent_info | ( | const new_ha_info_type & | value | ) |
Setter for the new home agent information option.
value | The new home agent information option data. |
ICMPv6::new_ha_info_type Tins::ICMPv6::new_home_agent_info | ( | ) | const |
Getter for the new home agent information option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::nonce | ( | const nonce_type & | value | ) |
Setter for the new nonce option.
value | The new nonce option data. |
ICMPv6::nonce_type Tins::ICMPv6::nonce | ( | ) | const |
Getter for the nonce option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Getter for the ICMPv6 options.
|
inline |
Getter for the other field.
void Tins::ICMPv6::other | ( | small_uint< 1 > | new_other | ) |
Setter for the other field.
new_other | The new other field value. |
|
inline |
Getter for the override field.
void Tins::ICMPv6::override | ( | small_uint< 1 > | new_override | ) |
Setter for the override field.
new_override | The new override field value. |
|
inlinevirtual |
void Tins::ICMPv6::prefix_info | ( | prefix_info_type | info | ) |
Setter for the prefix information option.
info | The prefix information. |
ICMPv6::prefix_info_type Tins::ICMPv6::prefix_info | ( | ) | const |
Getter for the prefix information option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Getter for the Querier's Query Interval Code field.
Note that this field is only valid for Multicast Listener Query Message packets
void Tins::ICMPv6::qqic | ( | uint8_t | value | ) |
Setter for the Querier's Query Interval Code field.
This field is only valid if the type of this PDU is MGM_QUERY
|
inline |
Getter for the Querier's Robustnes Variable field.
Note that this field is only valid for Multicast Listener Query Message packets
void Tins::ICMPv6::qrv | ( | small_uint< 3 > | value | ) |
Setter for the Querier's Robustness Variable field.
This field is only valid if the type of this PDU is MGM_QUERY
|
inline |
Getter for the reachable_time field.
void Tins::ICMPv6::reachable_time | ( | uint32_t | new_reachable_time | ) |
Setter for the reachable_time field.
new_reachable_time | The new reachable_time field value. |
void Tins::ICMPv6::recursive_dns_servers | ( | const recursive_dns_type & | value | ) |
ICMPv6::recursive_dns_type Tins::ICMPv6::recursive_dns_servers | ( | ) | const |
Getter for the recursive dns servers option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::redirect_header | ( | const byte_array & | data | ) |
Setter for the redirect header option.
data | The redirect header option data. |
byte_array Tins::ICMPv6::redirect_header | ( | ) | const |
Getter for the redirect header option.
This method will throw an option_not_found exception if the option is not found.
bool Tins::ICMPv6::remove_option | ( | OptionTypes | type | ) |
Removes an ICMPv6 option.
If there are multiple options of the given type, only the first one will be removed.
type | The type of the option to be removed. |
|
inline |
Getter for the retransmit_timer field.
void Tins::ICMPv6::retransmit_timer | ( | uint32_t | new_retrans_timer | ) |
Setter for the retransmit_timer field.
new_retrans_timer | The new retrans_timer field value. |
void Tins::ICMPv6::route_info | ( | const route_info_type & | value | ) |
Setter for the route information option.
value | The new route information option data. |
ICMPv6::route_info_type Tins::ICMPv6::route_info | ( | ) | const |
Getter for the route information option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Getter for the router field.
void Tins::ICMPv6::router | ( | small_uint< 1 > | new_router | ) |
Setter for the router field.
new_router | The new router field value. |
|
inline |
Getter for the router_lifetime field.
void Tins::ICMPv6::router_lifetime | ( | uint16_t | new_router_lifetime | ) |
Setter for the router_lifetime field.
new_router_lifetime | The new router_lifetime field value. |
|
inline |
Getter for the router_pref field.
void Tins::ICMPv6::router_pref | ( | small_uint< 2 > | new_router_pref | ) |
Setter for the router_pref field.
new_router_pref | The new router_pref field value. |
void Tins::ICMPv6::rsa_signature | ( | const rsa_sign_type & | value | ) |
Setter for the new RSA signature option.
value | The new RSA signature option data. |
ICMPv6::rsa_sign_type Tins::ICMPv6::rsa_signature | ( | ) | const |
Getter for the RSA signature option.
This method will throw an option_not_found exception if the option is not found.
const ICMPv6::option * Tins::ICMPv6::search_option | ( | OptionTypes | type | ) | const |
Searchs for an option that matchs the given flag.
If the header is not found, a null pointer is returned. Deleting the returned pointer will result in undefined behaviour.
type | The option identifier to be searched. |
|
inline |
Getter for the sequence field.
void Tins::ICMPv6::sequence | ( | uint16_t | new_sequence | ) |
Setter for the sequence field.
new_sequence | The new sequence field value. |
void Tins::ICMPv6::shortcut_limit | ( | const shortcut_limit_type & | value | ) |
Setter for the shortcut limit option.
value | The shortcut limit option data. |
ICMPv6::shortcut_limit_type Tins::ICMPv6::shortcut_limit | ( | ) | const |
Getter for the shortcut limit option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Getter for the solicited field.
void Tins::ICMPv6::solicited | ( | small_uint< 1 > | new_solicited | ) |
Setter for the solicited field.
new_solicited | The new solicited field value. |
void Tins::ICMPv6::source_addr_list | ( | const addr_list_type & | value | ) |
Setter for the new source address list option.
value | The new source address list option data. |
ICMPv6::addr_list_type Tins::ICMPv6::source_addr_list | ( | ) | const |
Getter for the source address list option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::source_link_layer_addr | ( | const hwaddress_type & | addr | ) |
Setter for the source link layer address option.
addr | The source link layer address. |
ICMPv6::hwaddress_type Tins::ICMPv6::source_link_layer_addr | ( | ) | const |
Getter for the source link layer address option.
This method will throw an option_not_found exception if the option is not found.
|
inline |
Getter for the multicast address records field.
Note that this field is only valid for Multicast Listener Query Message packets
void Tins::ICMPv6::sources | ( | const sources_list & | new_sources | ) |
Setter for the sources field.
This field is only valid if the type of this PDU is MGM_QUERY
|
inline |
Getter for the Suppress Router-Side Processing field.
Note that this field is only valid for Multicast Listener Query Message packets
void Tins::ICMPv6::supress | ( | small_uint< 1 > | value | ) |
Setter for the supress field.
This field is only valid if the type of this PDU is MGM_QUERY
|
inline |
Getter for the target address field.
void Tins::ICMPv6::target_addr | ( | const ipaddress_type & | new_target_addr | ) |
Setter for the target address field.
new_target_addr | The new target address field value. |
void Tins::ICMPv6::target_addr_list | ( | const addr_list_type & | value | ) |
Setter for the new target address list option.
value | The new target address list option data. |
ICMPv6::addr_list_type Tins::ICMPv6::target_addr_list | ( | ) | const |
Getter for the target address list option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::target_link_layer_addr | ( | const hwaddress_type & | addr | ) |
Setter for the target link layer address option.
addr | The target link layer address. |
ICMPv6::hwaddress_type Tins::ICMPv6::target_link_layer_addr | ( | ) | const |
Getter for the target link layer address option.
This method will throw an option_not_found exception if the option is not found.
void Tins::ICMPv6::timestamp | ( | const timestamp_type & | value | ) |
Setter for the new timestamp option.
value | The new timestamp option data. |
ICMPv6::timestamp_type Tins::ICMPv6::timestamp | ( | ) | const |
Getter for the timestamp option.
This method will throw an option_not_found exception if the option is not found.
|
virtual |
Returns the trailer size.
This method overrides PDU::trailer_size. This size will hold the extensions size
Reimplemented from Tins::PDU.
|
inline |
Getter for the type field.
void Tins::ICMPv6::type | ( | Types | new_type | ) |
Setter for the type field.
new_type | The new type field value. |
void Tins::ICMPv6::use_length_field | ( | bool | value | ) |
Sets whether the length field will be set for packets that use it.
As defined in RFC 4884, some ICMP packet types can have a length field. This method controlers whether the length field is set or not.
Note that this only indicates that the packet should use this field. The actual value will be set during the packet's serialization.
Note that, in order to br RFC compliant, if the size of the encapsulated PDU is greater than 128, the length field will always be set, regardless of whether this method was called or not.
/param value true iff the length field should be set appropriately
void Tins::ICMPv6::use_mldv2 | ( | bool | value | ) |
Indicates whether to use MLDv2.
If this is set to true, then MLDv2 will be used rather than MLDv1 when serializing Multicast Listener Discovery messages. By default, MLDv2 will be used.
value | The value to set |