P4C
The P4 Compiler
Loading...
Searching...
No Matches
p4tools/common/lib/constants.h
1
#ifndef BACKENDS_P4TOOLS_COMMON_LIB_CONSTANTS_H_
2
#define BACKENDS_P4TOOLS_COMMON_LIB_CONSTANTS_H_
3
4
namespace
P4::P4Tools
{
5
6
class
P4Constants
{
7
public
:
8
// Parser error codes, copied from core.p4.
10
static
constexpr
int
NO_ERROR
= 0x0000;
12
static
constexpr
int
PARSER_ERROR_PACKET_TOO_SHORT
= 0x0001;
14
static
constexpr
int
PARSER_ERROR_NO_MATCH
= 0x0002;
16
static
constexpr
int
PARSER_ERROR_STACK_OUT_OF_BOUNDS
= 0x0003;
18
static
constexpr
int
PARSER_ERROR_HEADER_TOO_SHORT
= 0x0004;
20
static
constexpr
int
PARSER_ERROR_TIMEOUT
= 0x005;
23
static
constexpr
int
PARSER_ERROR_INVALID_ARGUMENT
= 0x0020;
25
static
constexpr
const
char
*
MATCH_KIND_EXACT
=
"exact"
;
27
static
constexpr
const
char
*
MATCH_KIND_TERNARY
=
"ternary"
;
29
static
constexpr
const
char
*
MATCH_KIND_LPM
=
"lpm"
;
30
};
31
32
}
// namespace P4::P4Tools
33
34
#endif
/* BACKENDS_P4TOOLS_COMMON_LIB_CONSTANTS_H_ */
P4::P4Tools::P4Constants
Definition
p4tools/common/lib/constants.h:6
P4::P4Tools::P4Constants::PARSER_ERROR_TIMEOUT
static constexpr int PARSER_ERROR_TIMEOUT
Parser execution time limit exceeded.
Definition
p4tools/common/lib/constants.h:20
P4::P4Tools::P4Constants::PARSER_ERROR_HEADER_TOO_SHORT
static constexpr int PARSER_ERROR_HEADER_TOO_SHORT
Extracting too many bits into a varbit field.
Definition
p4tools/common/lib/constants.h:18
P4::P4Tools::P4Constants::MATCH_KIND_LPM
static constexpr const char * MATCH_KIND_LPM
Longest-prefix match.
Definition
p4tools/common/lib/constants.h:29
P4::P4Tools::P4Constants::MATCH_KIND_TERNARY
static constexpr const char * MATCH_KIND_TERNARY
Ternary match, using a mask.
Definition
p4tools/common/lib/constants.h:27
P4::P4Tools::P4Constants::PARSER_ERROR_PACKET_TOO_SHORT
static constexpr int PARSER_ERROR_PACKET_TOO_SHORT
Not enough bits in packet for 'extract'.
Definition
p4tools/common/lib/constants.h:12
P4::P4Tools::P4Constants::NO_ERROR
static constexpr int NO_ERROR
No error.
Definition
p4tools/common/lib/constants.h:10
P4::P4Tools::P4Constants::MATCH_KIND_EXACT
static constexpr const char * MATCH_KIND_EXACT
Match bits exactly.
Definition
p4tools/common/lib/constants.h:25
P4::P4Tools::P4Constants::PARSER_ERROR_NO_MATCH
static constexpr int PARSER_ERROR_NO_MATCH
'select' expression has no matches
Definition
p4tools/common/lib/constants.h:14
P4::P4Tools::P4Constants::PARSER_ERROR_STACK_OUT_OF_BOUNDS
static constexpr int PARSER_ERROR_STACK_OUT_OF_BOUNDS
Reference to invalid element of a header stack.
Definition
p4tools/common/lib/constants.h:16
P4::P4Tools::P4Constants::PARSER_ERROR_INVALID_ARGUMENT
static constexpr int PARSER_ERROR_INVALID_ARGUMENT
Definition
p4tools/common/lib/constants.h:23
P4::P4Tools
Definition
common/compiler/compiler_result.cpp:3
backends
p4tools
common
lib
constants.h
Generated by
1.12.0