#include <SrcFilter.h>
Public Member Functions | |
int | addRules (int argc, const char *const *argv, std::ostream &os) |
add rules | |
void | dumpRules (std::ostream &os) const |
dump the currently acrtive rules | |
SrcFilter (awds::Topology *topology) | |
constructor | |
virtual bool | check_packet (awds::BasePacket *p) |
decide, if a packet is accepted | |
virtual | ~SrcFilter () |
Static Public Member Functions | |
static int | cmd_filter (awds::ShellClient &sc, void *data, int argc, char **argv) |
callback for the shell |
SrcFilter::~SrcFilter | ( | ) | [virtual] |
destructor
int SrcFilter::addRules | ( | int | argc, | |
const char *const * | argv, | |||
std::ostream & | os | |||
) |
add rules
This is a parser for adding new rules.
argc | the number of arguments. | |
argv | the array of arguments. | |
os | the stream to write the output to. |
References awds::RTopology::getNodeByName().
bool SrcFilter::check_packet | ( | awds::BasePacket * | p | ) | [virtual] |
decide, if a packet is accepted
p | the packet to check. |
Implements awds::Firewall.
References awds::BasePacket::getType().
void SrcFilter::dumpRules | ( | std::ostream & | os | ) | const |
dump the currently acrtive rules
Use this function to dump the currently avtive rules to the screen.
os | the stream to write the output to. |