msvcs_events.h File Reference

Functions to send events to various plugins. More...


Data Structures

struct  msvcs_ha_info_hdr_s
 Header followed by data. More...

Defines

#define MSVCS_EV_CLASS_NAME_APPID   "jnx_event_class_appid"
 Event class name of Application Identification plugin.
#define MSVCS_EVENT_MODE_SYNC   0
 Event Send Mode for data events.
#define MSVCS_EVENT_MODE_ASYNC   1
#define MSVCS_EVENT_MODE_ASYNC_POLL   2
#define MSVCS_HA_INFO_HDR_DATA(x)   (x)->data
 Define to extract the data from msvcs_ha_info_hdr_t.

Typedefs

typedef msvcs_ha_info_hdr_s msvcs_ha_info_hdr_t
 Header followed by data.

Enumerations

enum  msvcs_ha_info_subtype_t { MSVCS_HA_INFO_REDUNDANCY_INFO }
 Possible subtypes, which can be carried as part of msvcs_ha_info_hdr_s. More...

Functions

int msvcs_plugin_dispatch_data_event_by_plugin_id (msvcs_data_event_t event, void *data, int dst_plugin_id, uint8_t mode)
 Dispatch an event to the specified plugin id.
int msvcs_plugin_dispatch_data_event (msvcs_data_event_t event, void *data, char *dst_plugin, uint8_t mode, int src_plugin_id, msvcs_copy_data_t copy_func, void *copy_ctx)
 Dispatch an event to one or all plugins.


Detailed Description

Functions to send events to various plugins.


Typedef Documentation

typedef struct msvcs_ha_info_hdr_s msvcs_ha_info_hdr_t
 

Header followed by data.

Sent as part of the MSVCS_CONTROL_EV_HA_INFO_BLOB control event to all plugins to notify them about RMS switchover


Enumeration Type Documentation

enum msvcs_ha_info_subtype_t
 

Possible subtypes, which can be carried as part of msvcs_ha_info_hdr_s.

Enumerator:
MSVCS_HA_INFO_REDUNDANCY_INFO  Subtype for redundancy info when switchover happens on RMS.


Function Documentation

int msvcs_plugin_dispatch_data_event msvcs_data_event_t  event,
void *  data,
char *  dst_plugin,
uint8_t  mode,
int  src_plugin_id,
msvcs_copy_data_t  copy_func,
void *  copy_ctx
 

Dispatch an event to one or all plugins.

To dispatch an event, MSVCS_EV_SET_EVENT(event_class, event_type) has to be used to construct event with event class and event type.

Parameter copy_func and copy_ctx are only for dispatching event to all plugins. copy_func is an user provided function. When sending event to all other plugins, copy_func copies data to a newly allocated memory for each plugin and passes the pointer of copied data to the plugin. It's the responsibility of other plugin to free data that is copied. copy_ctx points to the parameter that may be needed by copy_func.

Parameters:
[in] event The event being transmitted
[in] data Pointer to the data to be transmitted with event
[in] dst_plugin The plugin where the event will be dispatched, the event will be dispatched to all plugins if this is NULL
[in] mode Dispatch mode, sync or async
[in] src_plugin_id The local plugin ID
[in] copy_func Function to copy data
[in] copy_ctx Context required by copy function
Returns:
0 on success, -1 on failure

int msvcs_plugin_dispatch_data_event_by_plugin_id msvcs_data_event_t  event,
void *  data,
int  dst_plugin_id,
uint8_t  mode
 

Dispatch an event to the specified plugin id.

To dispatch an event, MSVCS_EV_SET_EVENT(event_class, event_type) has to be used to construct event with event class and event type.

Parameters:
[in] event The event being transmitted
[in] data Pointer to the data to be transmitted with event
[in] dst_plugin_id The plugin id where the event will be dispatched
[in] mode Dispatch mode, sync or async
Returns:
0 on success, -1 on failure


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:24:53 2010 for libmsp-svcs by Doxygen 1.4.5