pfd_config.h File Reference

Relating to getting and setting the configuration data coming from the CPD. More...

#include <time.h>
#include <isc/eventlib.h>
#include <jnx/aux_types.h>
#include <jnx/bits.h>
#include <jnx/patricia.h>
#include <netinet/in.h>

Go to the source code of this file.

Data Structures

struct  pfd_auth_user_t

Functions

status_t init_config (evContext ctx)
void clear_config (void)
void add_auth_user_addr (in_addr_t addr)
void delete_auth_user_addr (in_addr_t addr)
boolean is_auth_user (in_addr_t addr)
in_addr_t get_pfd_address (void)
void set_pfd_address (in_addr_t addr)
in_addr_t get_cpd_address (void)
void set_cpd_address (in_addr_t addr)
time_t get_current_time (void)


Detailed Description

Relating to getting and setting the configuration data coming from the CPD.

These functions will store and provide access to the configuration data which is the set of authorized users.

Definition in file pfd_config.h.


Function Documentation

void add_auth_user_addr ( in_addr_t  addr  ) 

Add an authorized user from the configured set

Parameters:
[in] addr The user's IP address in network byte order

Definition at line 184 of file pfd_config.c.

References pfd_auth_user_t::address, config_lock, first_byte, fourth_byte, LOG, pfd_auth_user_t::node, root, second_byte, and third_byte.

Referenced by cpd_client_message().

void clear_config ( void   ) 

Clear the configuration data

Definition at line 148 of file pfd_config.c.

References config_lock, first_byte, fourth_byte, LOG, root, second_byte, and third_byte.

Referenced by cpd_client_connection(), pfd_quit(), and pfd_shutdown().

void delete_auth_user_addr ( in_addr_t  addr  ) 

Delete an authorized user from the configured set

Parameters:
[in] addr The user's IP address in network byte order

Definition at line 221 of file pfd_config.c.

References config_lock, first_byte, fourth_byte, LOG, root, second_byte, and third_byte.

Referenced by cpd_client_message().

in_addr_t get_cpd_address ( void   ) 

Get the CPD address

Returns:
The CPD address in network-byte order

Definition at line 322 of file pfd_config.c.

References cpd_address.

Referenced by cpd_client_connection().

time_t get_current_time ( void   ) 

Get the currently cached time

Returns:
Current time

Definition at line 348 of file pfd_config.c.

References current_time.

Referenced by nat_packet(), and reverse_nat_packet().

in_addr_t get_pfd_address ( void   ) 

Get the PFD address

Returns:
The PFD address in network-byte order

Definition at line 296 of file pfd_config.c.

References pfd_address.

Referenced by cpd_client_connection().

status_t init_config ( evContext  ctx  ) 

Init the data structure that will store configuration info, or in other words, the set of authorized users

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

Definition at line 115 of file pfd_config.c.

References config_lock, cpd_address, current_time, first_byte, fourth_byte, LOG, pfd_address, root, second_byte, third_byte, and update_time().

Referenced by pfd_init().

boolean is_auth_user ( in_addr_t  addr  ) 

Is a user authorized

Parameters:
[in] addr The user's IP address in network byte order
Returns:
TRUE if authorized or FALSE otherwise

Definition at line 269 of file pfd_config.c.

References config_lock, first_byte, fourth_byte, root, second_byte, and third_byte.

Referenced by pfd_process_packet().

void set_cpd_address ( in_addr_t  addr  ) 

Set the CPD address

Parameters:
[in] addr The new CPD address in network-byte order

Definition at line 335 of file pfd_config.c.

References cpd_address.

Referenced by ped_client_message().

void set_pfd_address ( in_addr_t  addr  ) 

Set the PFD address

Parameters:
[in] addr The new PFD address in network-byte order

Definition at line 309 of file pfd_config.c.

References pfd_address.

Referenced by ped_client_message().


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:07 2010 for SDK Your Net Corporation Policy Manager Example: Packet Filtering Daemon (pfd) 1.0 by Doxygen 1.5.1