mirror of
https://github.com/mfontanini/libtins
synced 2026-01-28 04:34:27 +01:00
Add missing operators to address classes (#275)
* * add or-operator and a simlple unit test for hw_address, ip_address, ipv6_address * add not-operator and a simlple unit test for hw_address, ip_address, ipv6_address * add greater-then-operator and a simlple unit test for ipv6_address * add new constructor and a simlple unit test for network_interface, which use a ipv6_address to find the nic * add override the function gateway_from_ip for ipv6_address parameter (untested) * change the ipv6_address in NotMaskAdress_Test, so that the expceted addresses are valid for the winsock api * Delete CMakeLists.txt.user * * add <=, >, >= operator for HWAddress with tests * add <=, >, >= operator for IPv4Address with tests * add <=,>= operator for IPv6Address with tests * refactoring the & , |, ~ operator of ipv6_address to "regular" operator
This commit is contained in:
committed by
Matias Fontanini
parent
7848e28b62
commit
342e2c77a7
@@ -113,5 +113,10 @@ bool hw_address_lt_compare(const uint8_t* start1, const uint8_t* end1,
|
||||
return lexicographical_compare(start1, end1, start2, end2);
|
||||
}
|
||||
|
||||
bool hw_address_gt_compare(const uint8_t* start1, const uint8_t* end1,
|
||||
const uint8_t* start2, const uint8_t* end2) {
|
||||
return lexicographical_compare(start2, end2, start1, end1);
|
||||
}
|
||||
|
||||
} // Internals
|
||||
} // Tins
|
||||
|
||||
Reference in New Issue
Block a user