Acl holds and manipulates AclStatements.
More...
|
bool | addStatement (string) |
| Adds an ACL statement to this ACL. More...
|
|
bool | addExtStatement (bool, string, bool, string, string, int, string, string, int) |
| Adds an ACL statement to this ACL with the specified parameters. More...
|
|
bool | removeStatement (string) |
| Removes an ACL statement from this ACL. More...
|
|
bool | removeExtStatement (bool, string, bool, string, string, int, string, string, int) |
| Removes the ACL statement from this ACL with the specified parameters. More...
|
|
AclStatement | getStatementAt (int) |
| Returns an ACL statement at the specified index. More...
|
|
int | getStatementCount () |
| Returns the number of ACL statements. More...
|
|
void | addRemark (string) |
| Adds a remark to this ACL. More...
|
|
string | getRemark (int) |
| Returns the remark at the specified index. More...
|
|
int | getRemarkCount () |
| Returns the number of remarks in this ACL. More...
|
|
int | getCommandCount () |
| Returns the number of ACL commands. More...
|
|
string | getCommandAt (int) |
| Returns the ACL command at the specified index. More...
|
|
bool | isExtended () |
| Returns true if this ACL is an extended ACL, false if it is a standard ACL. More...
|
|
string | getAclId () |
| Returns this ACL's ID. More...
|
|
vector< string > | getExtStatementDataAt (bool, int) |
| Returns a vector of the data of the ACL statement at the specified index. More...
|
|
bool | evaluate (QString) |
| Evaluates the ACL against a packet/PDU, and returns true if permitted, false otherwise. More...
|
|
AclStatement | getMatch (QString) |
| Evaluates the ACL against a packet/PDU, and returns the matched AclStatement. More...
|
|
Acl holds and manipulates AclStatements.
◆ addExtStatement()
bool Acl::addExtStatement |
( |
bool |
, |
|
|
string |
, |
|
|
bool |
, |
|
|
string |
, |
|
|
string |
, |
|
|
int |
, |
|
|
string |
, |
|
|
string |
, |
|
|
int |
|
|
) |
| |
Adds an ACL statement to this ACL with the specified parameters.
- Parameters
-
protocol,valid | protocols are IP, ICMP, TCP, and UDP. |
remoteIp,the | remote IP adddress. |
remoteMask,the | remote wildcard mask. |
remotePort,the | remote port for TCP and UDP. |
localIp,the | local IP address. |
localMask,the | local wildcard mask. |
localPort,the | local port for TCP and UDP. |
- Returns
- bool, true if added successfully, otherwise false.
◆ addRemark()
void Acl::addRemark |
( |
string |
| ) |
|
Adds a remark to this ACL.
- Parameters
-
remark,the | remark to be added. |
◆ addStatement()
bool Acl::addStatement |
( |
string |
| ) |
|
Adds an ACL statement to this ACL.
- Parameters
-
statement,the | IOS ACL statement. "access-list [this-aclid]" should be omitted. Start with "permit, deny, or remark". |
- Returns
- bool, true if added successfully, otherwise false.
◆ evaluate()
bool Acl::evaluate |
( |
QString |
| ) |
|
Evaluates the ACL against a packet/PDU, and returns true if permitted, false otherwise.
- Parameters
-
jsonPdu,the | PDU in JSON serialized format |
- Returns
- bool, true if permitted, false otherwise
◆ getAclId()
Returns this ACL's ID.
- Returns
- string, this ACL's ID.
◆ getCommandAt()
string Acl::getCommandAt |
( |
int |
| ) |
|
Returns the ACL command at the specified index.
- Parameters
-
int | index, the index of the ACL command. |
- Returns
- string, the ACL command at the specified index.
◆ getCommandCount()
int Acl::getCommandCount |
( |
| ) |
|
Returns the number of ACL commands.
- Returns
- int, the number of ACL commands.
◆ getExtStatementDataAt()
vector< string > Acl::getExtStatementDataAt |
( |
bool |
, |
|
|
int |
|
|
) |
| |
Returns a vector of the data of the ACL statement at the specified index.
- Parameters
-
index,the | index of the ACL statement of interest. |
- Returns
- vector<string>, a vector of the data of the ACL statement at the specified index.
◆ getMatch()
Evaluates the ACL against a packet/PDU, and returns the matched AclStatement.
- Parameters
-
jsonPdu,the | PDU in JSON serialized format |
- Returns
- AclStatement, the matched statement, or null if no match
◆ getRemark()
string Acl::getRemark |
( |
int |
| ) |
|
Returns the remark at the specified index.
- Parameters
-
index,the | index of the remark. |
- Returns
- string, the remark at the specified index.
◆ getRemarkCount()
int Acl::getRemarkCount |
( |
| ) |
|
Returns the number of remarks in this ACL.
- Returns
- int, the number of remarks in this ACL.
◆ getStatementAt()
Returns an ACL statement at the specified index.
- Parameters
-
index,the | index of the ACL statement. |
- Returns
- AclStatement, the ACL statement at the specified index.
◆ getStatementCount()
int Acl::getStatementCount |
( |
| ) |
|
Returns the number of ACL statements.
- Returns
- int, the number of ACL statements.
◆ isExtended()
Returns true if this ACL is an extended ACL, false if it is a standard ACL.
- Returns
- bool, true if this ACL is an extended ACL, false if it is a standard ACL.
◆ removeExtStatement()
bool Acl::removeExtStatement |
( |
bool |
, |
|
|
string |
, |
|
|
bool |
, |
|
|
string |
, |
|
|
string |
, |
|
|
int |
, |
|
|
string |
, |
|
|
string |
, |
|
|
int |
|
|
) |
| |
Removes the ACL statement from this ACL with the specified parameters.
- Parameters
-
protocol,valid | protocols are IP, ICMP, TCP, and UDP. |
remoteIp,the | remote IP adddress. |
remoteMask,the | remote wildcard mask. |
remotePort,the | remote port for TCP and UDP. |
localIp,the | local IP address. |
localMask,the | local wildcard mask. |
localPort,the | local port for TCP and UDP. |
- Returns
- bool, true if removed successfully, otherwise false.
◆ removeStatement()
bool Acl::removeStatement |
( |
string |
| ) |
|
Removes an ACL statement from this ACL.
- Parameters
-
statement | the IOS ACL statement. "access-list [this-aclid]" should be omitted. Start with "permit, deny, or remark". |
- Returns
- bool, true if removed successfully, otherwise false.
The documentation for this class was generated from the following file: