odtone::net::ip::prefix_v6
// In header: </home/carlos/Projectos/odtone/inc/odtone/net/ip/prefix.hpp> class prefix_v6 { public: // types typedef address_v6::bytes_type bytes_type; // construct/copy/destruct prefix_v6(); prefix_v6(const bytes_type &, uint); prefix_v6(const address_v6 &, uint); // public static functions static prefix_v6 from_string(const std::string &); // public member functions const bytes_type & bytes() const; uint length() const; operator undefined_bool() const; bool operator!() const; bool match(const address_v6 &) const; // friend functions friend std::ostream & operator<<(std::ostream &, const prefix_v6 &); };
This class represents the base IPv6 Prefix.
prefix_v6
public
construct/copy/destructprefix_v6();
Construct an empty IPv6 Prefix.
prefix_v6(const bytes_type & addr, uint length);
Construct an IPv6 Prefix.
Parameters: |
|
prefix_v6(const address_v6 & addr, uint length);
Construct an IPv6 Prefix.
Parameters: |
|
prefix_v6
public static functionsstatic prefix_v6 from_string(const std::string & str);
Get the IPv6 Prefix from a string.
Parameters: |
|
||
Returns: |
The extracted IPv6 Prefix. |
prefix_v6
public member functionsconst bytes_type & bytes() const;
Get the IPv6 Prefix raw bytes.
Returns: |
The IPv6 Prefix raw bytes. |
uint length() const;
Get the IPv6 Prefix length.
Returns: |
The IPv6 Prefix length. |
operator undefined_bool() const;
bool operator!() const;
bool match(const address_v6 & addr) const;
Check if the IPv6 Prefix is equal to another IPv6 Prefix.
Parameters: |
|
||
Returns: |
True if they are equal or false otherwise. |
prefix_v6
friend functionsfriend std::ostream & operator<<(std::ostream & out, const prefix_v6 & lhr);
IPv6 Prefix output.
Parameters: |
|
||||
Returns: |
ostream reference. |