dpm-ctrl_dfw.h File Reference

Relating to managing the firewall filters. More...

#include <sync/dpm_ipc.h>

Go to the source code of this file.

Functions

status_t init_dfw (evContext ctx)
void shutdown_dfw (void)
boolean dfw_ready (void)
void reset_all_filters (boolean new_filter_mode)
void create_policer (policer_info_t *policer)
void apply_default_int_policy (const char *int_name, const char *ingress_pol, const char *egress_pol)
int apply_subscriber_policer (const char *int_name, const char *sub_name, in_addr_t address, const char *pol_name)
int revoke_subscriber_policer (const char *int_name, const char *sub_name)


Detailed Description

Relating to managing the firewall filters.

These functions and types will manage the firewall filters.

Definition in file dpm-ctrl_dfw.h.


Function Documentation

void apply_default_int_policy ( const char *  int_name,
const char *  ingress_pol,
const char *  egress_pol 
)

Add an ingress and egress filter to the interface using the given policiers as actions

Parameters:
[in] int_name The interface (IFL) name
[in] ingress_pol The policier to use in the ingress filter
[in] egress_pol The policier to use in the egress filter

Definition at line 409 of file dpm-ctrl_dfw.c.

References dfw_handle, dpm_cid, LOG, and use_classic_filters.

Referenced by configuration_complete().

int apply_subscriber_policer ( const char *  int_name,
const char *  sub_name,
in_addr_t  address,
const char *  pol_name 
)

Add a term to the ingress and egress filter where the subscriber's traffic gets routed through in order to police their traffic with their specific policer

Parameters:
[in] int_name The interface the subscriber's traffic gets routed through
[in] sub_name The subscriber name
[in] address The subscriber's address
[in] pol_name The policier to apply on subscriber traffic
Returns:
0 upon success, -1 on failure (with error logged)

Definition at line 630 of file dpm-ctrl_dfw.c.

References dfw_handle, dpm_cid, FULL_PREFIX_LEN, LOG, and use_classic_filters.

Referenced by apply_policy().

void create_policer ( policer_info_t policer  ) 

Create a policer using the DFWD

Parameters:
[in] policer The policer's information

Definition at line 307 of file dpm-ctrl_dfw.c.

References policer_info_s::action, pol_conf_s::bandwidth_limit, pol_conf_s::bandwidth_percent, pol_conf_s::burst_size_limit, pol_conf_s::bw_in_percent, pol_conf_s::bw_u, dfw_handle, pol_action_s::discard, dpm_cid, policer_info_s::if_exceeding, KB_BYTES, LOG, and policer_info_s::name.

Referenced by configuration_complete().

boolean dfw_ready ( void   ) 

Is the module ready to start using (sending requests)

Returns:
TRUE or FALSE

Definition at line 273 of file dpm-ctrl_dfw.c.

References ready.

Referenced by dpm_init(), and wait_for_dfw().

status_t init_dfw ( evContext  ctx  ) 

Initialize the connection to the dfwd

Parameters:
[in] ctx event context
Returns:
SUCCESS if successful; otherwise EFAIL with an error message.

Definition at line 196 of file dpm-ctrl_dfw.c.

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

Referenced by dpm_init().

void reset_all_filters ( boolean  new_filter_mode  ) 

Purge filters and reset mode

Parameters:
[in] new_filter_mode Use classic filters

Definition at line 286 of file dpm-ctrl_dfw.c.

References dfw_handle, dpm_cid, LOG, ready, and use_classic_filters.

Referenced by configuration_complete().

int revoke_subscriber_policer ( const char *  int_name,
const char *  sub_name 
)

Delete terms in the ingress and egress filter where the subscriber's traffic gets routed through in order to police their traffic with their specific policer

Parameters:
[in] int_name The interface the subscriber's traffic gets routed through
[in] sub_name The subscriber name
Returns:
0 upon success, -1 on failure (with error logged)

Definition at line 802 of file dpm-ctrl_dfw.c.

References dfw_handle, dpm_cid, LOG, and use_classic_filters.

Referenced by remove_policy().

void shutdown_dfw ( void   ) 

Close down and free all resources

Definition at line 255 of file dpm-ctrl_dfw.c.

References dfw_handle, and ready.

Referenced by dpm_quit().


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:26:54 2010 for SDK Your Net Corporation Dynamic Policy Manager Example: dpm-ctrl 1.0 by Doxygen 1.5.1