summaryrefslogtreecommitdiff
path: root/src/protocol/codec.rs
AgeCommit message (Collapse)Author
2023-09-27[optimize] Packet Decodeluwenpeng
1. Add a macro to obtain Packet’s encapsulation information (the returned data is an immutable reference to Packet) * get_innermost_special_encapsulation!() * get_outermost_special_encapsulation!() Example: let icmp_encapsulation : Option<&Encapsulation> = get_innermost_special_encapsulation!(&Packet, ICMP); Example: let l4_encapsulation : Option<&Encapsulation> = get_innermost_special_encapsulation!(&Packet, TCP | UDP); 2. Clean up the Clone/Copy Trait of PacketDecode to avoid memory copies caused by improper use by users.
2023-08-18[refactor] Redefine decode trait associated typesluwenpeng
2023-08-14[feature] Add Decode traitluwenpeng