equilibrium-mgmt_kcom.c File Reference

Init kcom and register handler. More...

#include <sync/common.h>
#include <jnx/junos_kcom_pub_blob.h>
#include <jnx/provider_info.h>
#include "equilibrium-mgmt_kcom.h"
#include "equilibrium-mgmt_config.h"
#include "equilibrium-mgmt_conn.h"
#include "equilibrium-mgmt_logging.h"

Go to the source code of this file.

Defines

#define MSP_IFD_NAME_PATTERN   "ms-"
 common part of MS PIC interface names

Functions

static int ifd_down_async_handler (kcom_ifdev_t *msg, void *user_info __unused)
static int ssrb_async_handler (junos_kcom_pub_blob_msg_t *kpb_msg, void *arg __unused)
static int process_initial_ssrb (junos_kcom_pub_blob_t *pub_blob, void *arg __unused)
static int gencfg_async_handler (junos_kcom_gencfg_t *gencfg, void *arg __unused)
int kcom_init (evContext ctx)
void kcom_shutdown (void)


Detailed Description

Init kcom and register handler.

Initialize KCOM and register a handlers

Definition in file equilibrium-mgmt_kcom.c.


Function Documentation

static int gencfg_async_handler ( junos_kcom_gencfg_t *  gencfg,
void *arg  __unused 
) [static]

GENCFG notification handler (does nothing)

Parameters:
[in] gencfg GENCFG message
[in] arg cookie passed in registration
Returns:
KCOM_OK (0) on success

Definition at line 197 of file equilibrium-mgmt_kcom.c.

Referenced by kcom_init().

static int ifd_down_async_handler ( kcom_ifdev_t *  msg,
void *user_info  __unused 
) [static]

Gets called for all ifds. Watch for MS PIC which we are connected to going down

Parameters:
[in] msg The ifd we want to know about
[in] user_info User info that was registered to be passed to this callback
Returns:
0 upon successful completion, otherwise -1

Definition at line 53 of file equilibrium-mgmt_kcom.c.

References MSP_IFD_NAME_PATTERN, and mspic_offline().

Referenced by kcom_init().

int kcom_init ( evContext  ctx  ) 

Init KCOM library and register handlers for asynchronous KCOM messages

Parameters:
[in] ctx Newly created event context
Returns:
KCOM_OK (0) on success, or -1 on error.

Definition at line 217 of file equilibrium-mgmt_kcom.c.

References gencfg_async_handler(), ifd_down_async_handler(), LOG, process_initial_ssrb(), and ssrb_async_handler().

Referenced by equilibrium_init().

void kcom_shutdown ( void   ) 

Shutdown KCOM library and register handlers for asynchronous KCOM messages

Definition at line 292 of file equilibrium-mgmt_kcom.c.

Referenced by equilibrium_init(), and equilibrium_shutdown().

static int process_initial_ssrb ( junos_kcom_pub_blob_t *  pub_blob,
void *arg  __unused 
) [static]

Handler to get initial SSRBs

Parameters:
[in] pub_blob the SSR blob
[in] arg cookie passed in registration
Returns:
KCOM_OK (0) on success, -1 on failure

Definition at line 161 of file equilibrium-mgmt_kcom.c.

References add_ssrb(), and LOG.

Referenced by kcom_init().

static int ssrb_async_handler ( junos_kcom_pub_blob_msg_t *  kpb_msg,
void *arg  __unused 
) [static]

Notification handler for SSRB events

Parameters:
[in] kpb_msg KCOM Public Blob Message, contains the SSRB
[in] arg cookie passed in registration
Returns:
KCOM_OK (0) on success, -1 on failure

Definition at line 86 of file equilibrium-mgmt_kcom.c.

References add_ssrb(), delete_ssrb_by_id(), and LOG.

Referenced by kcom_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:57 2010 for SDK Your Net Corporation Equilibrium Load Balancer Example: equilibrium-mgmt 1.0 by Doxygen 1.5.1