dca_interface  6.3.4
dca_ipr::Ip Class Reference

#include <ipr_ipdata.h>

Inheritance diagram for dca_ipr::Ip:
dca_ipr::Ipv4 dca_ipr::Ipv6

Detailed Description

Definition of the Ip class.

The Ip class defines the base class used for an IP address classification.

There are two derived classes, Ipv4 and Ipv6, which introduce special performance optimized internal functions for a known type of IP address.. If you do not know whether or not an IP address is V4 or V6 use the Ip class itself for the classification.

See also
IprClassifier, Ipv4, Ipv6

Definition at line 33 of file ipr_ipdata.h.

Public Member Functions

 Ip (const char *buffer, size_t buffer_len)
 Constructs an Ip class with a given C-string and its length. More...
 

Constructor & Destructor Documentation

◆ Ip()

dca_ipr::Ip::Ip ( const char *  buffer,
size_t  buffer_len 
)

Constructs an Ip class with a given C-string and its length.

Parameters
[in]bufferPointer to a char buffer that contains the IP address to use. The buffer is not copied and must exist until the classification call returns, and for the lifetime of the Ip class.
[in]buffer_lenThe length in characters of the buffer
Note
The buffer is assumed to contain only ASCII 7 bit characters and can be given in IPv4 or IPv6 notation. Use this class for IP classification only if you do not know whether the IP address is IPv4 or IPv6 string, otherwise use the Ipv4 or Ipv6 classes.
See also
Ipv4, Ipv6, IprClassifier

The documentation for this class was generated from the following file: