Skip to content

Releases: m2osw/libaddr

Release 1.0.19.1

23 Jun 18:02

Choose a tag to compare

This newer version makes use of several other libraries and has all the functionality that was found in the libsnapwebsites. It also cleaned up some of the objects so they make more sense. It has several new tools, in part used to verify that the code works as expected. We handle addresses (IP, domain names), interfaces, and routes. Along with the libtld project, you get a huge amount of functionality in that arena.

  • Fixed the validate_ip.cpp to use the new name of the exit exception in the advgetopt library.
  • Fix: Default address and port are now used after testing for emptiness.
  • Cleaned up the exceptions: better names and use the new libexcept macros.
  • Modernize the mk script.
  • Renamed the test unittest (planned unification).
  • Added the #include <snapdev/poison.h> to all .cpp files now that's available to our contribs.
  • Started moving things around so we have the library and tools separated.
  • Moved header files out of the sub-libaddr directory.
  • Renamed the src directory as libaddr.
  • Actually implemented the validate_ip command line tool.
  • Added new dependencies (AdvGetOpt, LibUtf8, SnapDev).
  • Updated the dev/coverage script to work with the new folders.
  • Avoid showing errno in one emit_error() when errno == 0.
  • Upgraded tests to compile against snapcatch2 instead of catch1.x
  • Added a PROJECT_BRIEF to the documentation.
  • Added in=C++ to the MAPPING_EXTENSION.
  • Added a class to allow for reading interface names.
  • Made code -Weffc++ compatible.
  • Added a class to read the Linux routes (from /proc/net/route).
  • Updated the tests to check the route class.
  • Added a tool to show what routes were read to make sure it worked.
  • Fixed the get_mask(), it should have been const all along.
  • Fixed the is_default() function, it now works with IPv4 as well.
  • Fixed the find_addr_interface() function so the correct default is returned (i.e. true).
  • Fixed the IPv4 mask bytes order.
  • Finally broke the class in two: addr and iface.
  • Replaced the is_computer_interface_address() with using the new and improved find_addr_interface() so we have additional info, not just true/false.
  • Added an is_default() function since that's true when we setup an addr object. That way you can detect an uninitialized addr.
  • Added a function to convert a string to an IP address.
  • Added a test to verify that function.
  • Fixed an exception, return a 'state' error instead of an 'argument'.
  • Many clean ups.

First clean version of this library.

06 Mar 09:16

Choose a tag to compare

Let us know what you think of our library. It will parse addresses as found in many places such as your firewall, your network file, the host file, etc. It supports CIDR, masks, ports, including port range and lists.

Find binary package for 16.04 on snapcpp launchpad.