iplock: iplock::block Class Reference

iplock  3.0.18
A command line tool to add and remove rules from your firewall without you having to be root.

Block the specified IP addresses. More...

#include <iplock.h>

Inheritance diagram for iplock::block:
Collaboration diagram for iplock::block:
Public Types typedef std::shared_ptr< commandpointer_t   typedef std::vector< uint16_t > port_list_t   Public Member Functions  block (iplock *parent, advgetopt::getopt::pointer_t opt)   virtual ~block () override   std::string get_command (std::string const &name) const   port_list_t const & get_ports () const   std::string get_scheme_string (std::string const &name) const   void handle_ips (std::string const &name, int run_on_result)   virtual void run () override   Protected Member Functions void verify_ip (std::string const &ip)   Protected Attributes std::string f_chain = std::string("unwanted")   std::string f_interface = std::string("eth0")   iplockf_iplock = nullptr   advgetopt::getopt::pointer_t f_iplock_opt = advgetopt::getopt::pointer_t()   advgetopt::getopt::pointer_t f_opt = advgetopt::getopt::pointer_t()   port_list_t f_ports = port_list_t()   bool const f_quiet   std::string f_scheme = "http"   advgetopt::getopt::pointer_t f_scheme_opt = advgetopt::getopt::pointer_t()   bool const f_verbose   Detailed Description

This class goes through the list of IP addresses specified on the command line and add them to the chain as defined in ipconfig.conf.

By default, the scheme is set to "http". It can be changed with the –scheme command line option.

Definition at line 99 of file iplock.h.

Member Typedef Documentation
typedef std::shared_ptr<command> iplock::command::pointer_t inherited

Definition at line 41 of file iplock.h.

typedef std::vector<uint16_t> iplock::scheme::port_list_t inherited

Definition at line 68 of file iplock.h.

Constructor & Destructor Documentation
iplock::block::block ( iplockparent, advgetopt::getopt::pointer_t  opt  )

Definition at line 1076 of file iplock.cpp.

iplock::block::~block ( ) overridevirtual

Definition at line 1082 of file iplock.cpp.

Member Function Documentation
std::string iplock::scheme::get_command ( std::string const &  name) const inherited

Definition at line 856 of file iplock.cpp.

References iplock::command::f_iplock_opt.

Referenced by iplock::block_or_unblock::handle_ips().

port_list_t const& iplock::scheme::get_ports ( ) const inlineinherited

Definition at line 79 of file iplock.h.

std::string iplock::scheme::get_scheme_string ( std::string const &  name) const inherited

Definition at line 862 of file iplock.cpp.

Referenced by iplock::block_or_unblock::handle_ips().

void iplock::block::run ( ) overridevirtual

Reimplemented from iplock::scheme.

Definition at line 1087 of file iplock.cpp.

References iplock::block_or_unblock::handle_ips().

void iplock::command::verify_ip ( std::string const &  ip) protectedinherited

Definition at line 696 of file iplock.cpp.

References iplock::scheme::scheme().

Referenced by iplock::block_or_unblock::handle_ips(), and iplock::count::run().

Member Data Documentation
std::string iplock::command::f_chain = std::string("unwanted") protectedinherited
std::string iplock::command::f_interface = std::string("eth0") protectedinherited
iplock* iplock::command::f_iplock = nullptr protectedinherited

Definition at line 54 of file iplock.h.

Referenced by iplock::batch::run().

advgetopt::getopt::pointer_t iplock::command::f_iplock_opt = advgetopt::getopt::pointer_t() protectedinherited
advgetopt::getopt::pointer_t iplock::command::f_opt = advgetopt::getopt::pointer_t() protectedinherited
port_list_t iplock::scheme::f_ports = port_list_t() protectedinherited
bool const iplock::command::f_quiet protectedinherited
std::string iplock::scheme::f_scheme = "http" protectedinherited

Definition at line 84 of file iplock.h.

advgetopt::getopt::pointer_t iplock::scheme::f_scheme_opt = advgetopt::getopt::pointer_t() protectedinherited

Definition at line 85 of file iplock.h.

Referenced by iplock::block_or_unblock::handle_ips().

bool const iplock::command::f_verbose protectedinherited

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

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly