psd_ipc.h

Go to the documentation of this file.
00001 /*
00002  * $Id: psd_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) 2007-2008, Juniper Networks, Inc.
00011  * All rights reserved.
00012  */
00013 
00024 #ifndef SYNC_IPC_H_
00025 #define SYNC_IPC_H_
00026 
00027 /*** Constants ***/
00028 
00029 /*
00030  * We reserve IPC types values from 0 to 1023 for IPC messages interpreted
00031  * by the kernel and pfeman. 1024 will be kept reserved for the maximum value
00032  * of IPC_MSG_TYPE_MAX.
00033  *
00034  * The IPC types used outside the kernel PIC to PIC, PIC to APP, APP to APP
00035  * will use numbers starting from 1025 to 60000. Types from 60001 to 65535
00036  * are reserved for third party applications.
00037  */
00038 #define IPC_MSG_TYPE_PSD 60001   
00039 
00040 /*
00041  * Port that the PSD listens on:
00042  */
00043 #define PSD_PORT_NUM 7077   
00044 
00045 /*
00046  * IP Address for the clients to connect to:
00047  * 
00048  * Must be defined.
00049  * As seen in inet0 (default routing instance/table):
00050  * this should be the address of the RE 
00051  */
00052 #define PSD_CONNECT_ADDRESS "127.0.0.1" 
00053 
00054 /*
00055  * Constants:
00056  */
00057 #define MAX_IF_NAME_LEN     64   
00058 #define MAX_POLICY_NAME_LEN 64   
00059 #define MAX_FILTER_NAME_LEN 64   
00060 #define MAX_COND_NAME_LEN   64   
00061 
00062 
00063 /*** Data Structures ***/
00064 
00065 
00070 typedef struct policy_req_msg_s {
00071     char        ifname[MAX_IF_NAME_LEN + 1];     
00072     uint8_t     af;                              
00073 } policy_req_msg_t;
00074 
00075 
00082 typedef struct policy_filter_msg_s {
00083     char        ifname[MAX_IF_NAME_LEN + 1];     
00084     uint8_t     af;                              
00085     char        input_filter[MAX_FILTER_NAME_LEN + 1];   
00086     char        output_filter[MAX_FILTER_NAME_LEN + 1];  
00087 } policy_filter_msg_t;
00088 
00089 
00096 typedef struct policy_route_msg_s {
00097     char        ifname[MAX_IF_NAME_LEN + 1]; 
00098     uint8_t     af;                          
00099     in_addr_t   route_addr;                  
00100     size_t      route_addr_prefix;           
00101     in_addr_t   nh_addr;                     
00102     uint8_t     nh_type;                     
00103     uint32_t    metrics;                     
00104     uint32_t    preferences;                 
00105 } policy_route_msg_t;
00106 
00107 
00111 typedef enum {
00112     MSG_POLICY_REQ = 1, 
00113     MSG_FILTER,         
00114     MSG_ROUTE,          
00115     MSG_POLICY_NA,      
00116     MSG_POLICY_UPDATE,  
00117     MSG_UPDATE_DONE,    
00118     MSG_HB              
00119 } msg_type_e;
00120 
00121 #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:27:07 2010 for SDK Your Net Corporation Policy Manager Example: Policy Server Daemon 1.0 by Doxygen 1.5.1