xorp

FirewallSetPf Class Reference

Inheritance diagram for FirewallSetPf:
FirewallSet

List of all members.

Public Types

typedef map< uint32_t,
FirewallEntry
FirewallTrie

Public Member Functions

 FirewallSetPf (FeaDataPlaneManager &fea_data_plane_manager)
 Constructor.
virtual ~FirewallSetPf ()
 Virtual destructor.
virtual int start (string &error_msg)
 Start operation.
virtual int stop (string &error_msg)
 Stop operation.
virtual int update_entries (const list< FirewallEntry > &added_entries, const list< FirewallEntry > &replaced_entries, const list< FirewallEntry > &deleted_entries, string &error_msg)
 Update the firewall entries by pushing them into the underlying system.
virtual int set_table4 (const list< FirewallEntry > &firewall_entry_list, string &error_msg)
 Set the IPv4 firewall table.
virtual int delete_all_entries4 (string &error_msg)
 Delete all entries in the IPv4 firewall table.
virtual int set_table6 (const list< FirewallEntry > &firewall_entry_list, string &error_msg)
 Set the IPv6 firewall table.
virtual int delete_all_entries6 (string &error_msg)
 Delete all entries in the IPv6 firewall table.

Private Member Functions

virtual int add_entry (const FirewallEntry &firewall_entry, string &error_msg)
 Add a single firewall entry.
virtual int replace_entry (const FirewallEntry &firewall_entry, string &error_msg)
 Replace a single firewall entry.
virtual int delete_entry (const FirewallEntry &firewall_entry, string &error_msg)
 Delete a single firewall entry.
int start_transaction (uint32_t &ticket, string &error_msg)
 Start a transaction for manipulating the firewall table.
int commit_transaction (uint32_t ticket, string &error_msg)
 Commit a transaction for manipulating the firewall table.
int abort_transaction (uint32_t ticket, string &error_msg)
 Abort a transaction for manipulating the firewall table.
int push_entries (string &error_msg)
 Push all locally stored firewall entries.
int add_delete_transaction_entry (bool is_add, uint32_t ticket, const FirewallEntry &firewall_entry, string &error_msg)
 Add or delete a single firewall entry as part of a transaction.

Private Attributes

int _fd
FirewallTrie _firewall_entries4
FirewallTrie _firewall_entries6

Static Private Attributes

static const string _pf_device_name

Constructor & Destructor Documentation

FirewallSetPf::FirewallSetPf ( FeaDataPlaneManager fea_data_plane_manager)

Constructor.

Parameters:
fea_data_plane_managerthe corresponding data plane manager (FeaDataPlaneManager).

Member Function Documentation

int FirewallSetPf::abort_transaction ( uint32_t  ticket,
string &  error_msg 
) [private]

Abort a transaction for manipulating the firewall table.

Parameters:
ticketthe ticket for the transaction.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int FirewallSetPf::add_delete_transaction_entry ( bool  is_add,
uint32_t  ticket,
const FirewallEntry firewall_entry,
string &  error_msg 
) [private]

Add or delete a single firewall entry as part of a transaction.

Parameters:
is_addif true, then add the entry, otherwise delete it.
ticketthe ticket for the transaction.
firewall_entrythe entry to add.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual int FirewallSetPf::add_entry ( const FirewallEntry firewall_entry,
string &  error_msg 
) [private, virtual]

Add a single firewall entry.

Parameters:
firewall_entrythe entry to add.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int FirewallSetPf::commit_transaction ( uint32_t  ticket,
string &  error_msg 
) [private]

Commit a transaction for manipulating the firewall table.

Parameters:
ticketthe ticket for the transaction.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual int FirewallSetPf::delete_all_entries4 ( string &  error_msg) [virtual]

Delete all entries in the IPv4 firewall table.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements FirewallSet.

virtual int FirewallSetPf::delete_all_entries6 ( string &  error_msg) [virtual]

Delete all entries in the IPv6 firewall table.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements FirewallSet.

virtual int FirewallSetPf::delete_entry ( const FirewallEntry firewall_entry,
string &  error_msg 
) [private, virtual]

Delete a single firewall entry.

Parameters:
firewall_entrythe entry to delete.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
int FirewallSetPf::push_entries ( string &  error_msg) [private]

Push all locally stored firewall entries.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual int FirewallSetPf::replace_entry ( const FirewallEntry firewall_entry,
string &  error_msg 
) [private, virtual]

Replace a single firewall entry.

Parameters:
firewall_entrythe replacement entry.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual int FirewallSetPf::set_table4 ( const list< FirewallEntry > &  firewall_entry_list,
string &  error_msg 
) [virtual]

Set the IPv4 firewall table.

Parameters:
firewall_entry_listthe list with all entries to install into the IPv4 firewall table.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements FirewallSet.

virtual int FirewallSetPf::set_table6 ( const list< FirewallEntry > &  firewall_entry_list,
string &  error_msg 
) [virtual]

Set the IPv6 firewall table.

Parameters:
firewall_entry_listthe list with all entries to install into the IPv6 firewall table.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements FirewallSet.

virtual int FirewallSetPf::start ( string &  error_msg) [virtual]

Start operation.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements FirewallSet.

int FirewallSetPf::start_transaction ( uint32_t &  ticket,
string &  error_msg 
) [private]

Start a transaction for manipulating the firewall table.

Parameters:
ticketreturn-by-reference ticket for the transaction.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.
virtual int FirewallSetPf::stop ( string &  error_msg) [virtual]

Stop operation.

Parameters:
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements FirewallSet.

virtual int FirewallSetPf::update_entries ( const list< FirewallEntry > &  added_entries,
const list< FirewallEntry > &  replaced_entries,
const list< FirewallEntry > &  deleted_entries,
string &  error_msg 
) [virtual]

Update the firewall entries by pushing them into the underlying system.

Parameters:
added_entriesthe entries to add.
replaced_entriesthe entries to replace.
deleted_entriesthe deleted entries.
error_msgthe error message (if error).
Returns:
XORP_OK on success, otherwise XORP_ERROR.

Implements FirewallSet.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations