equilibrium2-classify_entry.c

Go to the documentation of this file.
00001 /*
00002  * $Id: equilibrium2-classify_entry.c 346460 2009-11-14 05:06:47Z ssiano $
00003  *
00004  * This code is provided as is by Juniper Networks SDK Developer Support.
00005  * It is provided with no warranties or guarantees, and Juniper Networks
00006  * will not provide support or maintenance of this code in any fashion.
00007  * The code is provided only to help a developer better understand how
00008  * the SDK can be used.
00009  *
00010  * Copyright (c) 2008, Juniper Networks, Inc.
00011  * All rights reserved.
00012  */
00013 
00020 /* The Application and This Plug-in's Documentation: */
00021 
00036 #include <sync/equilibrium2.h>
00037 #include <sync/equilibrium2_svc.h>
00038 #include "equilibrium2-classify.h"
00039 
00040 #include <jnx/multi-svcs/msvcs_plugin.h>
00041 
00048 int
00049 equilibrium2_classify_entry (void)
00050 {
00051     msvcs_plugin_params_t params;
00052 
00053     strlcpy(params.spp_name, EQ2_CLASSIFY_SVC_NAME, sizeof(params.spp_name));
00054     params.spp_data_evh = equilibrium2_classify_data_hdlr;
00055     params.spp_control_evh = equilibrium2_classify_ctrl_hdlr;
00056     params.spp_plugin_app_id = CLASSIFY_PLUGIN;
00057     /* Plugin class will be determined by mspmand automatically according to
00058      * the provided ID.
00059      */
00060     params.spp_class = MSVCS_PLUGIN_CLASS_EXTERNAL;
00061     classify_pid = msvcs_plugin_register(&params);
00062 
00063     if (classify_pid < 0) {
00064         logging(LOG_ERR, "%s: Register service ERROR!", __func__);
00065     } else {
00066         logging(LOG_INFO, "%s: Service was registered.", __func__);
00067         if (msvcs_plugin_register_event_class(classify_pid, EV_CLASS_CLASSIFY,
00068                 &classify_ev_class) < 0) {
00069             msp_log(LOG_ERR, "%s: Register event class ERROR!", __func__);
00070         }
00071     }
00072     return classify_pid;
00073 }
00074 

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