msp_policy_db.h File Reference

API to support policy-database related operations from plugins. More...


Data Structures

struct  msp_policy_db_add_params_s
 msp_policy_db_add_params_t More...
struct  msp_policy_db_del_params_s
 msp_policy_db_del_params_t More...
struct  msp_policy_db_get_params_s
 msp_policy_db_get_params_t More...
struct  msp_policy_db_params_s
 msp_policy_db_params_s More...
struct  msp_policy_db_svc_set_key_s
 msp_policy_db_svc_set_key_s More...

Constants used in policy database operations.

#define MSP_POLICY_DB_POLICY_ADD   0
#define MSP_POLICY_DB_POLICY_DEL   1
#define MSP_POLICY_DB_POLICY_GET   2

Defines

#define MSP_PLUGIN_NAME_LEN   64
#define MSP_SVC_ID_SERVICES   0x2

Typedefs

typedef msp_policy_db_add_params_s msp_policy_db_add_params_t
 msp_policy_db_add_params_t
typedef msp_policy_db_del_params_s msp_policy_db_del_params_t
 msp_policy_db_del_params_t
typedef msp_policy_db_get_params_s msp_policy_db_get_params_t
 msp_policy_db_get_params_t
typedef msp_policy_db_params_s msp_policy_db_params_t
 msp_policy_db_params_s
typedef msp_policy_db_svc_set_key_s msp_policy_db_svc_set_key_t
 msp_policy_db_svc_set_key_s

Enumerations

enum  { MSP_POLICY_FLAGS_SSET_PACKET = 0x1 }

Functions

status_t msp_policy_db_attach (msp_policy_db_handle_t *handle)
 Request to attach to the policy database.
status_t msp_policy_db_op (msp_policy_db_params_t *params)
 Request to add/delete/get the policy from the policy database.
u_int32_t msp_policy_db_get_max_svc_set (msp_policy_db_handle_t handle)
 Requests the maximum number of service sets supported.
status_t msp_policy_db_get_next_svc_set_id (msp_policy_db_handle_t handle, msp_policy_db_svc_set_key_t *key, msp_policy_db_svc_set_key_t *next_key)
 Requests the next service set key given a particular key.


Detailed Description

API to support policy-database related operations from plugins.

This file provides the APIs for plugins to access the policy database, to:


Typedef Documentation

typedef struct msp_policy_db_add_params_s msp_policy_db_add_params_t
 

msp_policy_db_add_params_t

Structure to define the policy add parameters.

typedef struct msp_policy_db_del_params_s msp_policy_db_del_params_t
 

msp_policy_db_del_params_t

Structure to define the policy delete parameters.

typedef struct msp_policy_db_get_params_s msp_policy_db_get_params_t
 

msp_policy_db_get_params_t

Structure to define the policy get parameters.

typedef struct msp_policy_db_params_s msp_policy_db_params_t
 

msp_policy_db_params_s

Structure to define the policy database parameters.

typedef struct msp_policy_db_svc_set_key_s msp_policy_db_svc_set_key_t
 

msp_policy_db_svc_set_key_s

Structure to define the policy database parameters.


Enumeration Type Documentation

anonymous enum
 

Enumerator:
MSP_POLICY_FLAGS_SSET_PACKET  Default is flow-based service set; a plugin can request packet-based by setting this flag.


Function Documentation

status_t msp_policy_db_attach msp_policy_db_handle_t *  handle  ) 
 

Request to attach to the policy database.

This API is called by plugins that run their control functionality as a separate daemon. This API enables the control daemons to access the policy database.

Parameters:
[out] handle Handle of the policy database.
Returns:
MSP_OK on success; otherwise, returns one of the error codes listed below: MSP_POLICY_DB_ATTACH_FAIL MSP_POLICY_DB_NOT_CONFIGURED

u_int32_t msp_policy_db_get_max_svc_set msp_policy_db_handle_t  handle  ) 
 

Requests the maximum number of service sets supported.

This API is called by plugins to request the maximum number of service sest supported.

Parameters:
[in] handle Policy database handle.
Returns:
max service set

status_t msp_policy_db_get_next_svc_set_id msp_policy_db_handle_t  handle,
msp_policy_db_svc_set_key_t key,
msp_policy_db_svc_set_key_t next_key
 

Requests the next service set key given a particular key.

This API is called to walk the service set table. If the key is NULL, the first service set key is returned; otherwise, the key of the next service set is returned.

Parameters:
[in] handle Policy database handle.
[in] key Key of the service set.
[out] next_key Key of the next service set.
Returns:
MSP_OK on success; otherwise, returns one of the error codes listed below: MSP_ERROR MSP_INVALID_ARG

status_t msp_policy_db_op msp_policy_db_params_t params  ) 
 

Request to add/delete/get the policy from the policy database.

This API is called by plugins to add/delete/get the policy handle for a particular service set.

Parameters:
[in] params Pointer to an msp_policy_db_params_t structure.
Returns:
MSP_OK on success; otherwise, returns one of the error codes listed below: MSP_ERROR MSP_INVALID_ARG


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