![]() |
Kea 2.2.0
|
Represents a sub-option inserted by the DHCPv4 relay. More...
#include <token.h>
Inheritance diagram for isc::dhcp::TokenRelay4Option:Public Member Functions | |
| TokenRelay4Option (const uint16_t option_code, const RepresentationType &rep_type) | |
| Constructor for extracting sub-option from RAI (option 82) More... | |
Public Member Functions inherited from isc::dhcp::TokenOption | |
| TokenOption (const uint16_t option_code, const RepresentationType &rep_type) | |
| Constructor that takes an option code as a parameter. More... | |
| void | evaluate (Pkt &pkt, ValueStack &values) |
| Evaluates the values of the option. More... | |
| uint16_t | getCode () const |
| Returns option-code. More... | |
| RepresentationType | getRepresentation () const |
| Returns representation-type. More... | |
Public Member Functions inherited from isc::dhcp::Token | |
| virtual | ~Token () |
| Virtual destructor. More... | |
| virtual void | evaluate (Pkt &pkt, ValueStack &values)=0 |
| This is a generic method for evaluating a packet. More... | |
Protected Member Functions | |
| virtual OptionPtr | getOption (Pkt &pkt) |
| Attempts to obtain specified sub-option of option 82 from the packet. More... | |
Protected Member Functions inherited from isc::dhcp::TokenOption | |
| virtual OptionPtr | getOption (Pkt &pkt) |
| Attempts to retrieve an option. More... | |
| virtual std::string | pushFailure (ValueStack &values) |
| Auxiliary method that puts string representing a failure. More... | |
Additional Inherited Members | |
Public Types inherited from isc::dhcp::TokenOption | |
| enum | RepresentationType { TEXTUAL , HEXADECIMAL , EXISTS } |
| Token representation type. More... | |
Static Public Member Functions inherited from isc::dhcp::Token | |
| static bool | toBool (std::string value) |
| Coverts a (string) value to a boolean. More... | |
Protected Attributes inherited from isc::dhcp::TokenOption | |
| uint16_t | option_code_ |
| Code of the option to be extracted. More... | |
| RepresentationType | representation_type_ |
| Representation type. More... | |
Represents a sub-option inserted by the DHCPv4 relay.
DHCPv4 relays insert sub-options in option 82. This token attempts to extract such sub-options. Note in DHCPv6 it is radically different (possibly many encapsulation levels), thus there are separate classes for v4 and v6.
This token can represent the following expressions: relay[13].text - Textual representation of sub-option 13 in RAI (option 82) relay[13].hex - Binary representation of sub-option 13 in RAI (option 82) relay[vendor-class].text - Text representation of sub-option X in RAI (option 82) relay[vendor-class].hex - Binary representation of sub-option X in RAI (option 82)
| TokenRelay4Option::TokenRelay4Option | ( | const uint16_t | option_code, |
| const RepresentationType & | rep_type | ||
| ) |
Attempts to obtain specified sub-option of option 82 from the packet.
| pkt | DHCPv4 packet (that hopefully contains option 82) |
Reimplemented from isc::dhcp::TokenOption.
Definition at line 385 of file token.cc.
References isc::dhcp::DHO_DHCP_AGENT_OPTIONS, isc::dhcp::Pkt::getOption(), and isc::dhcp::TokenOption::option_code_.
Here is the call graph for this function: