Token that represents meta data of a DHCP packet.
For example in the expression pkt.iface == 'eth0' this token represents the pkt.iface expression.
Currently supported meta datas are:
- iface (incoming/outgoinginterface name)
- src (source IP address, 4 or 16 octets)
- dst (destination IP address, 4 or 16 octets)
- len (length field in the UDP header, padded to 4 octets)
Definition at line 569 of file token.h.
Gets a value from the specified packet.
Evaluation uses metadata available in the packet. It does not require any values to be present on the stack.
- Parameters
-
pkt | - metadata will be extracted from here |
values | - stack of values (1 result will be pushed) |
- Returns
- 0 which means evaluate next token if any.
Implements isc::dhcp::Token.
Definition at line 507 of file token.cc.
References DST, isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_PKT, isc::dhcp::eval_logger, isc::eval::EvalContext::fromUint32(), isc::dhcp::Pkt::getIface(), isc::dhcp::Pkt::getLabel(), isc::dhcp::Pkt::getLocalAddr(), isc::dhcp::Pkt::getRemoteAddr(), IFACE, isc_throw, LEN, LOG_DEBUG, SRC, and isc::asiolink::IOAddress::toBytes().