iplock: iplock::block_or_unblock Class Reference

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

#include <iplock.h>

Inheritance diagram for iplock::block_or_unblock:
Collaboration diagram for iplock::block_or_unblock:
Public Types typedef std::shared_ptr< commandpointer_t   typedef std::vector< uint16_t > port_list_t   Public Member Functions  block_or_unblock (iplock *parent, char const *command_name, advgetopt::getopt::pointer_t opt)   virtual ~block_or_unblock () 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

Definition at line 89 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_or_unblock::block_or_unblock ( iplockparent, char const *  command_name, advgetopt::getopt::pointer_t  opt  )

Definition at line 868 of file iplock.cpp.

References iplock::scheme::f_ports.

iplock::block_or_unblock::~block_or_unblock ( ) overridevirtual

Definition at line 900 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 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 handle_ips().

virtual void iplock::scheme::run ( ) inlineoverridevirtualinherited

Implements iplock::command.

Reimplemented in iplock::unblock, and iplock::block.

Definition at line 81 of file iplock.h.

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

Definition at line 696 of file iplock.cpp.

References iplock::scheme::scheme().

Referenced by 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

Definition at line 55 of file iplock.h.

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

port_list_t iplock::scheme::f_ports = port_list_t() protectedinherited

Definition at line 86 of file iplock.h.

Referenced by block_or_unblock(), and handle_ips().

bool const iplock::command::f_quiet protectedinherited

Definition at line 59 of file iplock.h.

Referenced by handle_ips(), iplock::flush::run(), and iplock::batch::run().

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 handle_ips().

bool const iplock::command::f_verbose protectedinherited

Definition at line 60 of file iplock.h.

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

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