dnxNebMain.h

Go to the documentation of this file.
00001 /*--------------------------------------------------------------------------
00002  
00003    Copyright (c) 2006-2010, Intellectual Reserve, Inc. All rights reserved.
00004  
00005    This program is free software; you can redistribute it and/or modify
00006    it under the terms of the GNU General Public License version 2 as 
00007    published by the Free Software Foundation.
00008  
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013  
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software
00016    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  
00018   --------------------------------------------------------------------------*/
00019 
00031 #ifndef _DNXNEBMAIN_H_
00032 #define _DNXNEBMAIN_H_
00033 
00034 #include <stddef.h>
00035 #include <time.h>
00036 
00037 /* File descriptors used on server side of pipe. */
00038 #define DNX_SRVFD                4  
00039 #define DNX_SAKFD                5  
00040 #define DNX_PLGFD                6  
00041 #define DNX_PAKFD                7  
00042 
00043 /* Various field values for sanity checking */
00044 #define DNX_MAX_XFER_SIZE        (64 * 1024) 
00045 #define DNX_MSG_SIGNATURE        0xFEED5000  
00046 
00047 /* Transfer message types */
00048 #define DNX_MSG_RESERVE_NODEREQ  0  
00049 #define DNX_MSG_JOB_TRANSFER     1  
00050 #define DNX_MSG_RESULT_TRANSFER  2  
00051 #define DNX_MSG_TERMINATE        3  
00052 
00053 
00054 typedef struct DnxMsgHeader
00055 {
00056    size_t structsz;                 
00057    unsigned signature;              
00058    int msgtype;                     
00059 } DnxMsgHeader;
00060 
00062 typedef struct DnxJobTransfer
00063 {
00064    DnxMsgHeader hdr;                
00065    unsigned long serial;            
00066    void * payload;                  
00067    void * svc;                      
00068    time_t start_time;               
00069    int timeout;                     
00070    time_t expires;                  
00071    int chkopts;                     
00072    int schedule;                    
00073    int reschedule;                  
00074    char cmd[1];                     
00075 } DnxJobTransfer;
00076 
00078 typedef struct DnxResultTransfer
00079 {
00080    DnxMsgHeader hdr;                
00081    unsigned long serial;            
00082    void * payload;                  
00083    time_t start_time;               
00084    unsigned delta;                  
00085    int early_timeout;               
00086    int res_code;                    
00087    char res_data[1];                
00088 } DnxResultTransfer;
00089 
00090 #endif   /* _DNXNEBMAIN_H_ */
00091 

Generated on Tue Apr 13 15:48:07 2010 for DNX by  doxygen 1.5.6