psd_server.h File Reference

Interface for the policy server. More...

Go to the source code of this file.


int server_init (evContext ctx)
void notify_all_clients (void)
int server_shutdown (void)

Detailed Description

Interface for the policy server.

Functions to initialize the server functionality and lookup a policy

Definition in file psd_server.h.

Function Documentation

void notify_all_clients ( void   ) 

Notify all currently connected clients to update policies.

Definition at line 590 of file psd_server.c.

References connect_table, MAX_IPC_CONN, MSG_POLICY_UPDATE, and send_msg().

Referenced by psd_config_read().

int server_init ( evContext  ctx  ) 

Initialize the server socket and start listening for new connections. It binds to inet0 and listens on port PSD_PORT_NUM. It also calls evListen which registers psd_ipc_connect as the callback function to accept new incoming connections.

[in] ctx Eventlib context for this application.
SUCCESS if successful, or EFAIL if failed.

Definition at line 511 of file psd_server.c.

References BUFFER_SIZE, connect_table_init(), evInitID, MAX_IPC_WAIT_CONN, psd_ctx, psd_ipc_connect(), PSD_PORT_NUM, and server_conn_id.

Referenced by psd_init().

int server_shutdown ( void   ) 

Shutdown the server socket that accecpts new connections (only used when stopping/restarting the daemon)

SUCCESS if the server connection id wasn't set because the initial call to listen failed, or if it was, then if we successfully stop listening for connections; or EFAIL if we were listening, but the attempt to stop listening for connections failed.

Definition at line 615 of file psd_server.c.

References connect_table, evInitID, evTestID, MAX_IPC_CONN, psd_ctx, psd_ipc_shutdown_conn(), and server_conn_id.

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: Policy Server Daemon 1.0 by Doxygen 1.5.1