#include <jnx/patricia.h>
#include <sync/psd_ipc.h>
Go to the source code of this file.
Data Structures | |
struct | ped_cond_s |
Typedefs | |
typedef ped_cond_s | ped_cond_t |
Functions | |
void | init_config (void) |
void | clear_config (void) |
ped_cond_t * | first_condition (void) |
ped_cond_t * | next_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) |
These functions and variables will parse, load, hold, and return the configuration data.
Definition in file ped_config.h.
typedef struct ped_cond_s ped_cond_t |
The structure we use to store our configuration information in the patricia tree:
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 |
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.
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
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
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
Definition at line 96 of file ped_config.c.
References pfd_interface.
char* get_pfd_nat_interface | ( | void | ) |
Get the PFD NAT interface
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. |
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. |
< 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().