Go to the source code of this file.
Functions | |
int | server_init (evContext ctx) |
void | notify_all_clients (void) |
int | server_shutdown (void) |
Functions to initialize the server functionality and lookup a policy
Definition in file psd_server.h.
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. |
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)
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.