|
|
FirewallManager (FeaNode& fea_node, const IfTree& iftree)
| FirewallManager |
Constructor.
Parameters:
fea_node | the FEA node. |
iftree | the interface configuration tree to use. |
~FirewallManager ()
| ~FirewallManager |
[virtual]
EventLoop& eventloop ()
| eventloop |
Get a reference to the EventLoop instance.
Returns: a reference to the EventLoop instance.
const IfTree& iftree ()
| iftree |
[const]
Get a reference to the interface configuration.
Returns: a reference to the interface configuration.
ProcessStatus status (string& reason)
| status |
[const]
Get the status code.
Parameters:
reason | the human-readable reason for any failure. |
Returns: the status code.
int start_transaction (uint32_t& tid, string& error_msg)
| start_transaction |
Start firewall-related transaction.
Parameters:
tid | the return-by-reference new transaction ID. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int commit_transaction (uint32_t tid, string& error_msg)
| commit_transaction |
Commit firewall-related transaction.
Parameters:
tid | the transaction ID. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int abort_transaction (uint32_t tid, string& error_msg)
| abort_transaction |
Abort firewall-related transaction.
Parameters:
tid | the transaction ID. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int add_transaction_operation (uint32_t tid,
const TransactionManager::Operation& op,
string& error_msg)
| add_transaction_operation |
Add operation to firewall-related transaction.
Parameters:
tid | the transaction ID. |
op | the operation to add. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int register_firewall_get (FirewallGet* firewall_get, bool is_exclusive)
| register_firewall_get |
Register FirewallGet plugin.
Parameters:
firewall_get | the plugin to register. |
is_exclusive | if true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int unregister_firewall_get (FirewallGet* firewall_get)
| unregister_firewall_get |
Unregister FirewallGet plugin.
Parameters:
firewall_get | the plugin to unregister. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int register_firewall_set (FirewallSet* firewall_set, bool is_exclusive)
| register_firewall_set |
Register FirewallSet plugin.
Parameters:
firewall_set | the plugin to register. |
is_exclusive | if true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int unregister_firewall_set (FirewallSet* firewall_set)
| unregister_firewall_set |
Unregister FirewallSet plugin.
Parameters:
firewall_set | the plugin to unregister. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int start (string& error_msg)
| start |
Start operation.
Parameters:
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int stop (string& error_msg)
| stop |
Stop operation.
Parameters:
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int add_entry (const FirewallEntry& firewall_entry, string& error_msg)
| add_entry |
Add a single firewall entry that will be pushed into the underlying system.
Parameters:
firewall_entry | the entry to add. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int replace_entry (const FirewallEntry& firewall_entry, string& error_msg)
| replace_entry |
Replace a single firewall entry that will be pushed into the underlying system.
Parameters:
firewall_entry | the entry to replace. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int delete_entry (const FirewallEntry& firewall_entry, string& error_msg)
| delete_entry |
Delete a single firewall entry that will be pushed into the underlying system.
Parameters:
firewall_entry | the entry to delete. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int set_table4 (const list<FirewallEntry>& firewall_entry_list,
string& error_msg)
| set_table4 |
Set the IPv4 firewall table.
Parameters:
firewall_entry_list | the list with all entries to install into the IPv4 firewall table. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int set_table6 (const list<FirewallEntry>& firewall_entry_list,
string& error_msg)
| set_table6 |
Set the IPv6 firewall table.
Parameters:
firewall_entry_list | the list with all entries to install into the IPv6 firewall table. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int delete_all_entries4 (string& error_msg)
| delete_all_entries4 |
Delete all entries in the IPv4 firewall table.
Parameters:
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int delete_all_entries6 (string& error_msg)
| delete_all_entries6 |
Delete all entries in the IPv6 firewall table.
Parameters:
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int get_table4 (list<FirewallEntry>& firewall_entry_list,
string& error_msg)
| get_table4 |
Obtain the IPv4 firewall table.
Parameters:
firewall_entry_list | the return-by-reference list with all entries in the IPv4 firewall table. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int get_table6 (list<FirewallEntry>& firewall_entry_list,
string& error_msg)
| get_table6 |
Obtain the IPv6 firewall table.
Parameters:
firewall_entry_list | the return-by-reference list with all entries in the IPv6 firewall table. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int get_entry_list_start4 (uint32_t& token, bool& more, string& error_msg)
| get_entry_list_start4 |
Get a token for a list of IPv4 firewall entries.
Parameters:
token | to be provided when calling get_entry_list_next4. |
more | true if the list is not empty. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int get_entry_list_start6 (uint32_t& token, bool& more, string& error_msg)
| get_entry_list_start6 |
Get a token for a list of IPv6 firewall entries.
Parameters:
token | to be provided when calling get_entry_list_next6. |
more | true if the list is not empty. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int get_entry_list_next4 (uint32_t token,
FirewallEntry& firewall_entry,
bool& more,
string& error_msg)
| get_entry_list_next4 |
Get the next item in a list of IPv4 firewall entries.
Parameters:
token | returned by a previous call to get_entry_list_start4. |
firewall_entry | the firewall entry. |
more | true if the list has more items remaining. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int get_entry_list_next6 (uint32_t token,
FirewallEntry& firewall_entry,
bool& more,
string& error_msg)
| get_entry_list_next6 |
Get the next item in a list of IPv6 firewall entries.
Parameters:
token | returned by a previous call to get_entry_list_start6. |
firewall_entry | the firewall entry. |
more | true if the list has more items remaining. |
error_msg | the error message (if error). |
Returns: XORP_OK on success, otherwise XORP_ERROR.