ped_config.h File Reference

Relating to loading and storing the configuration data. More...

#include <jnx/patricia.h>
#include <sync/psd_ipc.h>

Go to the source code of this file.

Data Structures

struct  ped_cond_s


typedef ped_cond_s ped_cond_t


void init_config (void)
void clear_config (void)
ped_cond_tfirst_condition (void)
ped_cond_tnext_condition (ped_cond_t *data)
boolean find_matching_condition (char *ifname, uint8_t af)
char * get_pfd_interface (void)
char * get_pfd_nat_interface (void)
in_addr_t get_pfd_address (void)
in_addr_t get_cpd_address (void)
int ped_config_read (int check)

Detailed Description

Relating to loading and storing the configuration data.

These functions and variables will parse, load, hold, and return the configuration data.

Definition in file ped_config.h.

Typedef Documentation

typedef struct ped_cond_s ped_cond_t

The structure we use to store our configuration information in the patricia tree:

Function Documentation

void clear_config ( void   ) 

Clear the configuration info completely from the patricia tree

Definition at line 162 of file ped_config.c.

References delete_condition(), and first_condition().

Referenced by ped_config_read().

boolean find_matching_condition ( char *  ifname,
uint8_t  af 

Tells whether or not a condition matches this interface name/family pair

[in] ifname interface name to match
[in] af address family to match
TRUE if and only if this interface name matches a configured condition's matching expression for interface names AND if the family matches the configured family for that condition unless the family is marked as any (in which case just the name matters); otherwise FALSE

Definition at line 219 of file ped_config.c.

References ped_cond_s::af, first_condition(), ped_cond_s::ifname, and next_condition().

Referenced by update_interface().

ped_cond_t* first_condition ( void   ) 

Get the first condition from configuration.

The first condition, or NULL if no conditions.

Definition at line 180 of file ped_config.c.

References root.

Referenced by clear_config(), and find_matching_condition().

in_addr_t get_cpd_address ( void   ) 

Get the CPD address

The CPD address in network-byte order

Definition at line 135 of file ped_config.c.

References cpd_address.

Referenced by send_addresses().

in_addr_t get_pfd_address ( void   ) 

Get the PFD address

The PFD address in network-byte order

Definition at line 122 of file ped_config.c.

References pfd_address.

Referenced by send_addresses().

char* get_pfd_interface ( void   ) 

Get the PFD interface

The PFD interface (IFL)

Definition at line 96 of file ped_config.c.

References pfd_interface.

char* get_pfd_nat_interface ( void   ) 

Get the PFD NAT interface

The PFD NAT interface (IFL)

Definition at line 109 of file ped_config.c.

References pfd_nat_interface.

void init_config ( void   ) 

Init the data structure that will store configuration info, or in other words, the condition(s)

Definition at line 146 of file ped_config.c.

References cpd_address, MAX_COND_NAME_LEN, pfd_address, pfd_interface, pfd_nat_interface, and root.

Referenced by ped_init().

ped_cond_t* next_condition ( ped_cond_t data  ) 

Get (iterator-style) the next condition from configuration.

[in] data The previously returned data from this function or NULL for the first condition.
The next condition, or NULL if no more conditions.

Definition at line 197 of file ped_config.c.

References ped_cond_s::node, and root.

Referenced by find_matching_condition().

int ped_config_read ( int  check  ) 

Read configuration from the database.

[in] check SDK_CONFIG_READ_CHECK(1) if this function was called to check configuration, or SDK_CONFIG_READ_LOAD(0) if it's called to load configuration.
SUCCESS, or -1 on error.
Do not use ERRMSG during config check.

< CPD's address

Definition at line 252 of file ped_config.c.

References add_pfd_service_route(), add_service_route(), ped_cond_s::af, clean_service_routes(), clear_config(), ped_cond_s::condition_name, cpd_address, delete_pfd_service_route(), delete_service_route(), FULL_INET_ADDR_MASK, get_serviceroute_ready(), ped_cond_s::ifname, init_pfd_filter(), INT_NAME_STR_SIZE, ped_cond_s::node, ped_top_config, pfd_address, pfd_interface, pfd_nat_interface, pfd_ri_created(), reconfigure_peers(), root, turn_off_pfd_filter(), turn_on_pfd_filter(), and update_policies().

Referenced by main().

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