Enum rshark::Val
[−]
[src]
pub enum Val { Signed(i64), Unsigned { value: u64, radix: u8, }, Enum(u64, &'static str), String(String), Address { bytes: Vec<u8>, encoded: String, }, Subpacket(Vec<NamedValue>), Bytes(Vec<u8>), Error(Error), Warning(Error), }
A value parsed from a packet.
TODO
This value type isn't as expressive as would be required for a real Wireshark replacement just yet. Additional needs include:
- tracking original bytes (by reference or by index?)
Variants
Signed | A signed integer, in machine-native representation. | |||||
Unsigned | An unsigned integer, in machine-native representation, and a radix (base) for when we display the value to the user (e.g., 0x100 vs 256). Fields
| |||||
Enum | An integer value that represents a symbolic value. | |||||
String | A UTF-8–encoded string. | |||||
Address | A network address, which can have its own special encoding. Fields
| |||||
Subpacket | A set of named values from an encapsulated packet (e.g., TCP within IP). | |||||
Bytes | Raw bytes, e.g., a checksum or just unparsed data. | |||||
Error | An error that stopped further parsing. | |||||
Warning | A problem with a packet that did not stop further parsing (e.g., bad checksum). |