aboutsip / pkts

Pure java based pcap library capable of reading and writing to/from pcaps.
Other
198 stars 92 forks source link

Refactor Packet type hierarchy to not implement parent interfaces #69

Closed epall closed 7 years ago

epall commented 7 years ago

Before, packets often (but not always) implemented interfaces of their enclosing ("parent") packets, where the implementations simply forwarded the calls to their parent. This obscures the meaning of a particular packet layer and introduces hundreds of lines of code duplication.

Now, packets only implement the types their particular layer represents. This facilitates a more type-safe interface and improves encapsulation.

jonbo372 commented 7 years ago

merged. Once you have the IPv6 changes in as well I will go ahead and build a new release.

epall commented 7 years ago

Thanks! PR coming shortly.