equilibrium2-mgmt_server.c File Reference

The manager server to keep track of all services and query status. More...

#include <sync/equilibrium2.h>
#include "equilibrium2-mgmt.h"
#include <stdlib.h>
#include <string.h>
#include <jnx/pconn.h>
#include <jnx/trace.h>
#include <jnx/junos_trace.h>

Go to the source code of this file.

Functions

static client_tclient_get (pconn_session_t *session)
 Get a client.
static int client_add (pconn_session_t *session)
 Add a client.
static void client_del (pconn_session_t *session)
 Delete a clinet.
static void server_event_hdlr (pconn_session_t *session, pconn_event_t event, void *cookie __unused)
 Server event handler.
static status_t server_msg_hdlr (pconn_session_t *session, ipc_msg_t *msg, void *cookie __unused)
 Server message handler.
client_tclient_get_next (client_t *client)
 Get the next client.
int server_open (evContext ctx)
 Open the manager server.
void server_close (void)
 Close existing connections and shutdown server.

Variables

static pconn_server_t * server_hdl
static client_head_t client_head


Detailed Description

The manager server to keep track of all services and query status.

These functions will create the server, handle client messages and query service status.

Definition in file equilibrium2-mgmt_server.c.


Function Documentation

static int client_add ( pconn_session_t *  session  )  [static]

Add a client.

Parameters:
[in] session Client session

Definition at line 67 of file equilibrium2-mgmt_server.c.

References client_get(), client_head, EQ2_LOG, client_s::info, and client_s::session.

Referenced by server_event_hdlr().

static void client_del ( pconn_session_t *  session  )  [static]

Delete a clinet.

Parameters:
[in] session Client session

Definition at line 92 of file equilibrium2-mgmt_server.c.

References client_get(), and EQ2_LOG.

Referenced by server_event_hdlr().

static client_t* client_get ( pconn_session_t *  session  )  [static]

Get a client.

Parameters:
[in] session Client session
Returns:
Pointer to the client data on success, NULL on failure

Definition at line 47 of file equilibrium2-mgmt_server.c.

References client_head, and client_s::session.

Referenced by client_add(), client_del(), and server_msg_hdlr().

client_t* client_get_next ( client_t client  ) 

Get the next client.

Parameters:
[in] client Client
Returns:
Pointer to the next client on success, NULL on failure

Definition at line 178 of file equilibrium2-mgmt_server.c.

References client_head.

Referenced by eq2_show_status().

int server_open ( evContext  ctx  ) 

Open the manager server.

Parameters:
[in] ctx Event context
Returns:
0 on success; -1 on failure

Definition at line 192 of file equilibrium2-mgmt_server.c.

References client_head, EQ2_LOG, EQ2_MGMT_SERVER_PORT, EQ2_TRACE, server_event_hdlr(), server_hdl, and server_msg_hdlr().

Referenced by main_init().


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:26:58 2010 for SDK Your Net Corporation Equilibrium II: equilibrium2-mgmt 1.0 by Doxygen 1.5.1