IP address. More...
#include <ip_address.h>
Public Member Functions | |
| ip_address () | |
| Construct null.  More... | |
| ip_address (const std::string &v) | |
| Construct from string.  More... | |
| bool | is_null () const | 
| Test if null (all 0's).  More... | |
| std::ostream & | operator<< (std::ostream &os) const | 
| Stream out.  More... | |
| std::string | string () const | 
| Calculate string.  More... | |
Static Public Attributes | |
| static const char | SEPARATOR_CHAR | 
| separator ('.')  More... | |
Private Attributes | |
| unsigned char | octets_ [4] | 
Friends | |
| bool TECOMMONEXPORT | parse (std::string::const_iterator &first, std::string::const_iterator last, ip_address &v) | 
| Parse IP address, returning whether found or not and advancing first and setting address if found.  More... | |
| bool TECOMMONEXPORT | parse (std::string::const_iterator &first, std::string::const_iterator last, ipv6_address &v) | 
| Parse IP v6 address, returning whether found or not and advancing first and setting address if found.  More... | |
IP address.
Syntax: Note that leading 0's are not valid.
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
dec-octet   = DIGIT                 ; 0-9
            | %x31-39 DIGIT         ; 10-99
            | "1" 2DIGIT            ; 100-199
            | "2" %x30-34 DIGIT     ; 200-249
            | "25" %x30-35          ; 250-255
 
Definition at line 46 of file ip_address.h.
| te::common::uri::ip_address::ip_address | ( | ) | 
Construct null.
| te::common::uri::ip_address::ip_address | ( | const std::string & | v | ) | 
Construct from string.
Note that the string cannot be empty, it must contain valid chars.
| std::invalid_argument | if invalid | 
      
  | 
  inline | 
Test if null (all 0's).
Definition at line 54 of file ip_address.h.
| std::ostream& te::common::uri::ip_address::operator<< | ( | std::ostream & | os | ) | const | 
Stream out.
| std::string te::common::uri::ip_address::string | ( | ) | const | 
Calculate string.
      
  | 
  friend | 
Parse IP address, returning whether found or not and advancing first and setting address if found.
Does not skip leading space.
      
  | 
  friend | 
Parse IP v6 address, returning whether found or not and advancing first and setting address if found.
Does not skip leading space.
      
  | 
  private | 
Definition at line 61 of file ip_address.h.
      
  | 
  static | 
separator ('.')
Definition at line 57 of file ip_address.h.