dpm_ipc.h

Go to the documentation of this file.
00001 /*
00002  * $Id: dpm_ipc.h 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 
00023 #ifndef __DPM_IPC_H__
00024 #define __DPM_IPC_H__
00025 
00026 
00027 /*** Constants ***/
00028 
00029 #define MAX_POL_NAME 63     
00030 #define MAX_INT_NAME 255    
00031 #define MAX_SUB_NAME 255    
00032 #define MAX_CLASS_NAME 255  
00033 
00034 #define DPM_PORT_NUM 7082   
00035 
00036 
00037 /*** Data Structures ***/
00038 
00039 
00044 typedef enum {
00045     MSG_CONF_RESET = 1,   
00046     MSG_CONF_COMP,        
00047     MSG_POLICER,          
00048     MSG_INTERFACE,        
00049     MSG_SUBSCRIBER        
00050 } conf_msg_type_e;
00051 
00052 
00056 typedef struct reset_info_s {
00057     uint8_t    use_classic_filters;  
00058 } reset_info_t;
00059 
00060 
00069 typedef struct pol_conf_s {
00070     uint32_t pad1;                      
00071     uint16_t pad2;                      
00072     uint8_t  pad3;                      
00073 
00074     uint8_t  bw_in_percent;             
00075     union {
00076         uint64_t bandwidth_limit;       
00077         uint32_t bandwidth_percent;     
00078     } bw_u;                             
00079     uint64_t burst_size_limit;          
00080 } pol_conf_t;
00081 
00082 
00091 typedef struct pol_action_s {
00092     uint8_t  discard;             
00093     uint8_t  loss_priority;       
00094     uint8_t  forwarding_class;    
00095     uint8_t  pad1;                
00096     uint32_t pad2;                
00097 } pol_action_t;
00098 
00099 
00103 typedef struct policer_info_s {
00104     char           name[MAX_POL_NAME + 1];  
00105     pol_conf_t     if_exceeding;            
00106     pol_action_t   action;                  
00107 } policer_info_t;
00108 
00109 
00113 typedef struct int_info_s {
00114     char         name[MAX_INT_NAME + 1];       
00115     uint32_t     subunit;                      
00116     uint32_t     index;                        
00117     char         input_pol[MAX_POL_NAME + 1];  
00118     char         output_pol[MAX_POL_NAME + 1]; 
00119 } int_info_t;
00120 
00124 typedef struct sub_info_s {
00125     char   name[MAX_SUB_NAME + 1];        
00126     char   password[MAX_SUB_NAME + 1];    
00127     char   class[MAX_CLASS_NAME + 1];     
00128     char   policer[MAX_POL_NAME + 1];     
00129 } sub_info_t;
00130 
00131 
00136 typedef enum {
00137     MSG_SUBSCRIBER_LOGIN = 1,       
00138     MSG_SUBSCRIBER_LOGOUT,          
00139 } status_msg_type_e;
00140 
00141 
00145 typedef struct subscriber_status_s {
00146     char   name[MAX_SUB_NAME + 1];    
00147     char   class[MAX_CLASS_NAME + 1]; 
00148 } subscriber_status_t;
00149 
00150 #endif

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:55 2010 for SDK Your Net Corporation Dynamic Policy Manager Example: dpm-mgmt 1.0 by Doxygen 1.5.1