diff options
author | Ed Tanous <edtanous@google.com> | 2022-08-15 21:30:58 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-01-17 21:39:57 +0300 |
commit | 3a4ad5d9dba5ebbb92e8663c3177a326e920cd71 (patch) | |
tree | e354efc096bcac82b88a8eea14d5c3cb36255189 /include/google/google_service_root.hpp | |
parent | 8ac6e503656d73c5dddb252518e77a894ef393b9 (diff) | |
download | bmcweb-3a4ad5d9dba5ebbb92e8663c3177a326e920cd71.tar.xz |
Refactor ipv4VerifyIpAndGetBitcount
Boost has a number of ip related functions that can do a lot of this
parsing for us, we should make use of them.
Unfortunately, boost::asio::network_v4[1] doesn't have a no-throw
variant of this constructor. It's not clear if this was an intentional
omission, but for the moment, this patchset chooses to reimplement the
mask code in-place for the moment. Even with this, the code is still
simpler than what was present.
[1] https://www.boost.org/doc/libs/1_80_0/doc/html/boost_asio/reference/ip__network_v4/network_v4.html
Tested: Unit tests pass. Pretty good coverage.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia50b50ce0096a5acbb9da814ee15aa8edbfe0e31
Diffstat (limited to 'include/google/google_service_root.hpp')
0 files changed, 0 insertions, 0 deletions