dnp3 (C++ API) 1.6.0
Loading...
Searching...
No Matches
dnp3::AddressFilter Class Reference

Filters connecting client by their IP address to associate a connecting master with an outstation on the server. More...

#include <dnp3.hpp>

Public Member Functions

 AddressFilter (AddressFilter &&other) noexcept
 Transfer ownership of the underlying C-type to this instance and invalidate the other instance. More...
 
 AddressFilter (const std::string &address)
 Create an address filter that matches a specific address or wildcards. More...
 
 ~AddressFilter ()
 Destroy an address filter. More...
 
void add (const std::string &address)
 Add an accepted IP address to the filter. More...
 

Static Public Member Functions

static AddressFilter any ()
 Create an address filter that accepts any IP address. More...
 

Friends

class CppAddressFilterFriend
 

Detailed Description

Filters connecting client by their IP address to associate a connecting master with an outstation on the server.

Address filters must be DISJOINT, i.e. two filters cannot accept the same IP address. The OutstationServer::add_outstation() method will fail if the filter conflicts with a previously added filter.

Constructor & Destructor Documentation

◆ AddressFilter() [1/2]

dnp3::AddressFilter::AddressFilter ( AddressFilter &&  other)
inlinenoexcept

Transfer ownership of the underlying C-type to this instance and invalidate the other instance.

Note
the moved class will now throw an exception if any method is called
Parameters
otherClass from which ownership will be transfer to this instance

◆ AddressFilter() [2/2]

dnp3::AddressFilter::AddressFilter ( const std::string &  address)

Create an address filter that matches a specific address or wildcards.

Examples: 192.168.1.26, 192.168.0.*, *.*.*.*

Wildcards are only supported for IPv4 addresses

Parameters
addressIP address to accept
Exceptions
ParamException

◆ ~AddressFilter()

dnp3::AddressFilter::~AddressFilter ( )

Destroy an address filter.

Member Function Documentation

◆ add()

void dnp3::AddressFilter::add ( const std::string &  address)

Add an accepted IP address to the filter.

Parameters
addressIP address to add
Exceptions
ParamException

◆ any()

static AddressFilter dnp3::AddressFilter::any ( )
static

Create an address filter that accepts any IP address.

Returns
Address filter

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