Commit Graph

2 Commits

Author SHA1 Message Date
Abtin Keshavarzian 6e7ed5cb55 [encoding] avoid the use of using for Big/LittleEndian functions (#9621)
This commit refactors the code to eliminate the use of `using` for
`BigEndian` or `LittleEndian` functions like `HostSwap` and `ReadUint`.
As these functions are frequently used in header files, using the
direct namespace enhances code safety by mitigating potential conflicts
arising from the order of included headers in the absence of explicit
`using` declarations. Generally, avoiding the `using` keyword in headers
is considered a recommended practice.

Additionally, this commit removes the `Encoding` namespace to shorten
the full function names.
2023-11-19 21:19:13 -08:00
Abtin Keshavarzian fdf3c3034f [ip6] new methods in Header and add unit test (#7561)
This commit adds new methods in `Ip6::Header` to get and set Traffic
Class, Flow fields. It also updates and renames some of the existing
methods. This commit also adds a unit test `test_ip6_header` to
validate the IPv6 header parsing and preparation.
2022-04-06 13:47:48 -07:00