PGEN-Address gives users easy interface for IP address and MAC address. These are implemented as pgen_ipaddr and pgen_macaddr.

These are sample codes with PGEN-Address.

They has many utility member functions and operators.

Member Function and Operator

Address class has many operators that helps address operation.

Available operators is ==, !=, <, >, <=, >=. For example <= is true. > is false. != is false.

If you want to print address with printf(), you use member function, c_str(), like std::string class. See sample code above. More Information, please see libpgen on GihHub.

Comments are closed.