dca_interface  6.3.4
ipr_ipdata.h
Go to the documentation of this file.
1 /* IBM Source Code */
2 /* (C) Copyright IBM Corp. 2009, 2012 */
3 /* Licensed Materials - Property of IBM */
4 /* US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA Schedule Contract with IBM Corp. */
5 
6 #ifndef IPR_IPDATA_H
7 #define IPR_IPDATA_H
8 
16 namespace dca_ipr {
17 
18  class ipdata_p;
19 
33  class Ip {
34  public:
36  Ip();
37  Ip( const Ip& aIp );
38  Ip& operator = ( const Ip& aIp );
39  virtual ~Ip();
41 
53  Ip( const char *buffer, size_t buffer_len );
54 
56  PRIVATE_PTR ipdata_p *_p;
57  };
58 
65  class Ipv4 : public Ip {
66  public:
68  Ipv4();
69  Ipv4( const Ipv4& aIpv4 );
70  Ipv4& operator = ( const Ipv4& aIpv4 );
71  virtual ~Ipv4();
73 
78  Ipv4( unsigned int ipaddr );
79 
87  Ipv4( const char *buffer, size_t buffer_len );
88  };
89 
96  class Ipv6 : public Ip {
97  public:
99  Ipv6();
100  Ipv6( const Ipv6& aIpv6 );
101  Ipv6& operator = ( const Ipv6& aIpv6 );
102  virtual ~Ipv6();
104 
111  Ipv6( const unsigned char ipaddr[16] );
112 
121  Ipv6( const char *buffer, size_t buffer_len );
122  };
123 
124 }
125 
126 #endif
Definition of the Ip class.
Definition: ipr_ipdata.h:33
Definition of the Ipv6 class.
Definition: ipr_ipdata.h:96
Ipv6(const char *buffer, size_t buffer_len)
Constructs an Ipv6 class using a string represenatation e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334...
Ipv6(const unsigned char ipaddr[16])
Constructs an Ipv6 class with a 16 byte char array.
Definition of the Ipv4 class.
Definition: ipr_ipdata.h:65
Ipv4(unsigned int ipaddr)
Constructs an Ipv4 class with a given numeric IP address of IPv4.
#define PRIVATE_PTR
Type for private pointer implementations, for internal use only.
Definition: base_types.h:83
Ipv4(const char *buffer, size_t buffer_len)
Constructs an Ipv4 class using a string represenatation e.g. "127.0.0.1".
Ip(const char *buffer, size_t buffer_len)
Constructs an Ip class with a given C-string and its length.