Kea 2.7.6
evaluate.h
Go to the documentation of this file.
1// Copyright (C) 2015-2024 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef EVALUATE_H
8#define EVALUATE_H
9
10#include <eval/token.h>
11#include <string>
12
13namespace isc {
14namespace dhcp {
15
24void evaluateRaw(const Expression& expr, Pkt& pkt, ValueStack& values);
25
37bool evaluateBool(const Expression& expr, Pkt& pkt);
38
39
51std::string evaluateString(const Expression& expr, Pkt& pkt);
52
53} // end of isc::dhcp namespace
54} // end of isc namespace
55
56#endif
std::string evaluateString(const Expression &expr, Pkt &pkt)
Evaluate a RPN expression for a v4 or v6 packet and return a string value.
Definition evaluate.cc:45
void evaluateRaw(const Expression &expr, Pkt &pkt, ValueStack &values)
Evaluate a RPN expression for a v4 or v6 packet.
Definition evaluate.cc:15
bool evaluateBool(const Expression &expr, Pkt &pkt)
Evaluate a RPN expression for a v4 or v6 packet and return a true or false decision.
Definition evaluate.cc:34
std::vector< TokenPtr > Expression
This is a structure that holds an expression converted to RPN.
Definition token.h:29
std::stack< std::string > ValueStack
Evaluated values are stored as a stack of strings.
Definition token.h:34
Defines the logger used by the top-level component of kea-lfc.