feisty meow concerns codebase
2.140
|
provides a mechanism for restricting access to a resource by the client's IP address. More...
#include <range_limiter.h>
Public Types | |
enum | capabilities { ALLOW , DENY } |
Public Member Functions | |
range_limiter () | |
range_limiter (const basis::astring &source_file, const basis::astring §ion) | |
~range_limiter () | |
bool | is_allowed (const machine_uid &host) |
bool | is_allowed (const basis::astring &hostname) |
capabilities | get_default () |
void | set_default (capabilities rights) |
bool | add (const machine_uid &address, capabilities rights) |
bool | add (const basis::astring &hostname, capabilities rights) |
bool | add (const machine_uid &first, const machine_uid &second, capabilities rights) |
bool | remove (const machine_uid &address) |
bool | remove (const basis::astring &hostname) |
bool | remove (const machine_uid &first, const machine_uid &second) |
bool | load (const basis::astring &file_name, const basis::astring §ion) |
bool | save (const basis::astring &file_name, const basis::astring §ion) |
provides a mechanism for restricting access to a resource by the client's IP address.
Definition at line 36 of file range_limiter.h.
Enumerator | |
---|---|
ALLOW | |
DENY |
Definition at line 48 of file range_limiter.h.
sockets::range_limiter::range_limiter | ( | ) |
Definition at line 45 of file range_limiter.cpp.
sockets::range_limiter::range_limiter | ( | const basis::astring & | source_file, |
const basis::astring & | section | ||
) |
Definition at line 50 of file range_limiter.cpp.
References load().
sockets::range_limiter::~range_limiter | ( | ) |
Definition at line 57 of file range_limiter.cpp.
References basis::WHACK().
bool sockets::range_limiter::add | ( | const basis::astring & | hostname, |
capabilities | rights | ||
) |
Definition at line 87 of file range_limiter.cpp.
bool sockets::range_limiter::add | ( | const machine_uid & | address, |
capabilities | rights | ||
) |
Definition at line 81 of file range_limiter.cpp.
References sockets::machine_uid::valid().
bool sockets::range_limiter::add | ( | const machine_uid & | first, |
const machine_uid & | second, | ||
capabilities | rights | ||
) |
Definition at line 93 of file range_limiter.cpp.
References sockets::machine_uid::valid().
range_limiter::capabilities sockets::range_limiter::get_default | ( | ) |
Definition at line 71 of file range_limiter.cpp.
References DENY.
bool sockets::range_limiter::is_allowed | ( | const basis::astring & | hostname | ) |
Definition at line 65 of file range_limiter.cpp.
bool sockets::range_limiter::is_allowed | ( | const machine_uid & | host | ) |
Definition at line 59 of file range_limiter.cpp.
References sockets::machine_uid::valid().
bool sockets::range_limiter::load | ( | const basis::astring & | file_name, |
const basis::astring & | section | ||
) |
Definition at line 118 of file range_limiter.cpp.
Referenced by range_limiter().
bool sockets::range_limiter::remove | ( | const basis::astring & | hostname | ) |
Definition at line 106 of file range_limiter.cpp.
bool sockets::range_limiter::remove | ( | const machine_uid & | address | ) |
Definition at line 100 of file range_limiter.cpp.
References sockets::machine_uid::valid().
bool sockets::range_limiter::remove | ( | const machine_uid & | first, |
const machine_uid & | second | ||
) |
Definition at line 112 of file range_limiter.cpp.
References sockets::machine_uid::valid().
bool sockets::range_limiter::save | ( | const basis::astring & | file_name, |
const basis::astring & | section | ||
) |
Definition at line 124 of file range_limiter.cpp.
void sockets::range_limiter::set_default | ( | capabilities | rights | ) |
Definition at line 76 of file range_limiter.cpp.