I've defined my own protocol with fields. Some of the fields are enumerated.
When executing pkt[0].show()
, I see the value in enum as expected.
Now, I'd like to have some logic based on the this enum filed.
The elegant way to write my code is using the enum (if filed=='MY_ENUM_VALUE: ...
), however when I executing the pkt[0][Layer].field_name
I'm getting the numeric value.
How can I read the enum value?