iplock: iplock::count Class Reference

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

Generate a count of all the entries by IP address. More...

#include <iplock.h>

Inheritance diagram for iplock::count:
Collaboration diagram for iplock::count:
Public Types typedef std::shared_ptr< commandpointer_t   Public Member Functions  count (iplock *parent, advgetopt::getopt::pointer_t opt)   virtual ~count () override   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()   bool const f_quiet   bool const f_verbose   Private Attributes advgetopt::getopt::pointer_t f_count_opt = advgetopt::getopt::pointer_t()   bool const f_reset   std::vector< std::string > f_targets = std::vector<std::string>()   Detailed Description

This class goes through the list of rules we added so far in the named chain and prints out the results to stdout.

If multiple ports get blocked, then the total for all those ports is reported.

Definition at line 123 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.

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

Definition at line 1134 of file iplock.cpp.

References f_count_opt, f_targets, and g_iplock_count_options_environment.

iplock::count::~count ( ) overridevirtual

Definition at line 1202 of file iplock.cpp.

Member Function Documentation
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 run().

Member Data Documentation
std::string iplock::command::f_chain = std::string("unwanted") protectedinherited
advgetopt::getopt::pointer_t iplock::count::f_count_opt = advgetopt::getopt::pointer_t() private

Definition at line 134 of file iplock.h.

Referenced by count(), and run().

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 iplock::block_or_unblock::handle_ips(), run(), and iplock::batch::run().

bool const iplock::command::f_quiet protectedinherited
bool const iplock::count::f_reset private

Definition at line 133 of file iplock.h.

std::vector<std::string> iplock::count::f_targets = std::vector<std::string>() private

Definition at line 135 of file iplock.h.

Referenced by count(), and run().

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