ped_filter.h File Reference

Works with filters. More...

#include "ped_policy_table.h"

Go to the source code of this file.

Defines

#define PFD_FILTER_NAME   "pfd_filter"
 pfd_filter applied to all interfaces

Functions

boolean is_pfd_filter_on (void)
void turn_on_pfd_filter (void)
void turn_off_pfd_filter (void)
int init_dfw (evContext ctx)
void shutdown_dfw (void)
boolean init_pfd_filter (char *interface_name)
boolean apply_pfd_filter_to_interface (char *interface_name)
void remove_pfd_filter_from_interface (char *interface_name)
boolean apply_filters_to_interface (char *interface_name, ped_policy_filter_t *filters)
boolean remove_filters_from_interface (char *interface_name)


Detailed Description

Works with filters.

Create PFD filter and applies filters to interfaces

Definition in file ped_filter.h.


Function Documentation

boolean apply_filters_to_interface ( char *  interface_name,
ped_policy_filter_t filters 
)

Apply filters on an interface

Parameters:
[in] interface_name Name of interface to apply filters on
[in] filters The filters to apply
Returns:
TRUE if successful; FALSE otherwise

Definition at line 704 of file ped_filter.c.

References APPLY_FILTER_FILENAME, exec_op_script(), ped_policy_filter_s::filter_data, get_unit(), policy_filter_msg_s::input_filter, and policy_filter_msg_s::output_filter.

Referenced by policy_table_add_filter().

boolean apply_pfd_filter_to_interface ( char *  interface_name  ) 

Apply PFD filters on an interface

Parameters:
[in] interface_name Name of interface to apply filters on
Returns:
TRUE if successful; FALSE otherwise

Definition at line 555 of file ped_filter.c.

References cid, dfw_handle, get_unit(), pfd_filter_info, pfd_on, and ready.

Referenced by policy_table_add_filter(), policy_table_add_route(), and policy_table_clean().

int init_dfw ( evContext  ctx  ) 

Initialize the connection to the dfwd

Parameters:
[in] ctx event context
Returns:
0 if successful; otherwise -1 with an error message.

Definition at line 348 of file ped_filter.c.

References dfw_handle, make_pfd_filter_on_int, ready, session_connect(), session_state_changed(), transaction_accepted(), and transaction_rejected().

Referenced by ped_init().

boolean init_pfd_filter ( char *  interface_name  ) 

Create the configuration necessary for the PFD service routes to work

Parameters:
[in] interface_name Name of interface in the PFD routing instance
Returns:
TRUE if successful; FALSE otherwise

Definition at line 437 of file ped_filter.c.

References cid, dfw_handle, exec_op_script(), INIT_FILTER_FILENAME, make_pfd_filter_on_int, pfd_filter_info, and ready.

Referenced by ped_config_read().

boolean is_pfd_filter_on ( void   ) 

Is the PFD filter on

Definition at line 312 of file ped_filter.c.

References pfd_on.

Referenced by show_managed().

boolean remove_filters_from_interface ( char *  interface_name  ) 

Remove all configured filters from an interface

Parameters:
[in] interface_name Name of interface to remove filters on
Returns:
TRUE if successful; FALSE otherwise

Definition at line 774 of file ped_filter.c.

References APPLY_FILTER_FILENAME, exec_op_script(), and get_unit().

Referenced by policy_table_clean(), policy_table_clear_policy(), and policy_table_delete_policy().

void remove_pfd_filter_from_interface ( char *  interface_name  ) 

Remove PFD filter from an interface

Parameters:
[in] interface_name Name of interface to remove filters on

Definition at line 628 of file ped_filter.c.

References cid, dfw_handle, get_unit(), pfd_filter_info, pfd_on, and ready.

Referenced by policy_table_clean(), and policy_table_delete_policy().

void shutdown_dfw ( void   ) 

Close down and free all resources

Definition at line 410 of file ped_filter.c.

References cid, dfw_handle, and ready.

void turn_off_pfd_filter ( void   ) 

Don't PFD filter automatically

Definition at line 332 of file ped_filter.c.

References pfd_on.

Referenced by ped_config_read().

void turn_on_pfd_filter ( void   ) 

Apply PFD filter automatically

Definition at line 322 of file ped_filter.c.

References pfd_on.

Referenced by ped_config_read().


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:27:06 2010 for SDK Your Net Corporation Policy Manager Example: Policy Enforcement Daemon 1.0 by Doxygen 1.5.1