diff options
author | Simon THOBY <git@nightmared.fr> | 2022-12-07 23:22:01 +0100 |
---|---|---|
committer | Simon THOBY <git@nightmared.fr> | 2022-12-07 23:22:01 +0100 |
commit | d43356f31a3d4062ea076376a5ee1b457be1b226 (patch) | |
tree | 8b14934c73bbd1388633ba677e19c4f7297c91c4 /src/parser.rs | |
parent | edb440a952320ea4f021c1d7063ff6d5f2f13818 (diff) |
add the payload and nat expressions
Diffstat (limited to 'src/parser.rs')
-rw-r--r-- | src/parser.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/parser.rs b/src/parser.rs index 55f1e1c..17905c4 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -76,6 +76,39 @@ pub enum DecodeError { #[error("Invalid type for a verdict expression")] UnknownVerdictType(i32), + #[error("Invalid type for a nat expression")] + UnknownNatType(i32), + + #[error("Invalid type for a payload expression")] + UnknownPayloadType(u32), + + #[error("Unsupported value for a link layer header field")] + UnknownLinkLayerHeaderField(u32, u32), + + #[error("Unsupported value for an IPv4 header field")] + UnknownIPv4HeaderField(u32, u32), + + #[error("Unsupported value for an IPv6 header field")] + UnknownIPv6HeaderField(u32, u32), + + #[error("Unsupported value for a TCP header field")] + UnknownTCPHeaderField(u32, u32), + + #[error("Unsupported value for an UDP header field")] + UnknownUDPHeaderField(u32, u32), + + #[error("Unsupported value for an ICMPv6 header field")] + UnknownICMPv6HeaderField(u32, u32), + + #[error("Missing the 'base' attribute to deserialize the payload object")] + PayloadMissingBase, + + #[error("Missing the 'offset' attribute to deserialize the payload object")] + PayloadMissingOffset, + + #[error("Missing the 'len' attribute to deserialize the payload object")] + PayloadMissingLen, + #[error("The object does not contain a name for the expression being parsed")] MissingExpressionName, |